/* Global Prediction — globalprediction.ai
   One stylesheet, no dependencies, no CDN. */

:root {
  --bg:        #070b14;
  --bg-2:      #0b1120;
  --card:      rgba(255, 255, 255, 0.045);
  --card-hi:   rgba(255, 255, 255, 0.075);
  --line:      rgba(255, 255, 255, 0.10);
  --line-hi:   rgba(255, 255, 255, 0.22);
  --txt:       #eaf0ff;
  --muted:     #8e9cbb;
  --lime:      #b6ff3d;
  --violet:    #8b5cf6;
  --cyan:      #22d3ee;
  --pink:      #ff5cad;
  --amber:     #ffb020;
  --green:     #2ee06a;
  --red:       #ff5470;
  --radius:    18px;
  --shadow:    0 24px 60px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── ambient background ─────────────────────────────────────────── */

.bg-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-field::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: drift 22s ease-in-out infinite alternate;
}
.orb.a { width: 520px; height: 520px; background: var(--violet); top: -180px; left: -120px; }
.orb.b { width: 460px; height: 460px; background: var(--cyan);   top: 10%; right: -160px; animation-delay: -6s; }
.orb.c { width: 400px; height: 400px; background: var(--lime);   bottom: -200px; left: 30%; animation-delay: -12s; opacity: 0.22; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, -50px, 0) scale(1.18); }
}

/* ── shared bits ────────────────────────────────────────────────── */

.wrap { position: relative; z-index: 1; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--txt);
}

.logo-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--lime), var(--cyan) 55%, var(--violet));
  color: #06101f;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.30);
}

.logo-text { font-size: 19px; line-height: 1.05; }
.logo-text small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.975); }

.btn-primary {
  background: linear-gradient(135deg, var(--lime), #6ef2b0 60%, var(--cyan));
  color: #05121f;
  padding: 15px 22px;
  font-size: 16px;
  width: 100%;
  box-shadow: 0 14px 34px rgba(182, 255, 61, 0.22);
}
.btn-primary:hover { box-shadow: 0 18px 44px rgba(182, 255, 61, 0.34); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-size: 13.5px;
}
.btn-ghost:hover { color: var(--txt); border-color: var(--line-hi); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ── app shell ──────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(16px);
}

.spacer { flex: 1; }

.coins {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(182, 255, 61, 0.35);
  background: rgba(182, 255, 61, 0.08);
  font-weight: 800;
  font-size: 14px;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease;
}
.coins.bump { animation: bump 0.5s cubic-bezier(0.2, 1.4, 0.3, 1); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px; height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  display: grid; place-items: center;
}
.icon-btn:hover { color: var(--txt); border-color: var(--line-hi); }

main { max-width: 1180px; margin: 0 auto; padding: 34px 22px 90px; }

.hero { margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: -0.035em;
  margin: 12px 0 8px;
  line-height: 1.05;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--lime), var(--cyan) 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); font-size: 15.5px; max-width: 620px; margin: 0; line-height: 1.6; }
.hero #count {
  color: var(--lime);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 26px 0 22px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
}
.tab:hover { color: var(--txt); border-color: var(--line-hi); }
.tab.on {
  background: var(--txt);
  color: #06101f;
  border-color: var(--txt);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-items: start;   /* cards keep their natural height, no dead space */
  gap: 18px;
}

.market {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  animation: cardIn 0.45s ease both;
}
.market:hover {
  border-color: var(--line-hi);
  background: var(--card-hi);
  transform: translateY(-2px);
}
.market.settled { border-color: rgba(46, 224, 106, 0.5); }

.m-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.league {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  color: #06101f;
}
.league.nfl  { background: var(--amber); }
.league.epl  { background: var(--pink); }
.league.ucl  { background: var(--cyan); }
.league.fiba { background: var(--green); }
.league.wnba { background: var(--violet); color: #fff; }

.when { font-size: 12px; color: var(--muted); }

.live {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(1.5); }
}

.m-title {
  font-size: 17.5px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0;
}
.m-q { font-size: 13.5px; color: var(--muted); margin: -6px 0 0; line-height: 1.45; }

.picks { display: flex; flex-direction: column; gap: 8px; }

.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--txt);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.16s ease;
}
.pick:hover {
  border-color: var(--lime);
  background: rgba(182, 255, 61, 0.10);
  transform: translateX(2px);
}
.pick .bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.30), rgba(34, 211, 238, 0.16));
  z-index: 0;
  transition: width 0.5s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.pick > * { position: relative; z-index: 1; }
.pick .label { flex: 1; }
.pick .pct {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 15px;
  color: var(--lime);
}
.pick.chosen {
  border-color: var(--green);
  background: rgba(46, 224, 106, 0.14);
}
.pick.chosen .pct { color: var(--green); }
.pick.chosen::after {
  content: "✓ LOCKED";
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--green);
}

.m-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #6b7997;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 22px;
  text-align: center;
  color: #5f6d8a;
  font-size: 12.5px;
  line-height: 1.7;
}

/* ── celebration overlay ────────────────────────────────────────── */

#celebrate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(12, 18, 34, 0.86), rgba(3, 6, 12, 0.96));
  backdrop-filter: blur(6px);
  cursor: pointer;
  overflow: hidden;
}
#celebrate.on { display: grid; }

#confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

.shake { animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 1px, 0) rotate(-0.35deg); }
  20%, 80% { transform: translate3d(6px, -2px, 0) rotate(0.5deg); }
  30%, 50%, 70% { transform: translate3d(-9px, 2px, 0) rotate(-0.6deg); }
  40%, 60% { transform: translate3d(9px, -1px, 0) rotate(0.6deg); }
}

.cel-box {
  position: relative;
  z-index: 3;            /* always above the confetti canvas */
  text-align: center;
  max-width: 640px;
  pointer-events: none;
}
/* a soft scrim so a falling basketball never eats a word */
.cel-box::before {
  content: "";
  position: absolute;
  inset: -70px -90px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(4, 7, 14, 0.92) 38%, rgba(4, 7, 14, 0) 74%);
}

.orbmoji {
  font-size: 76px;
  line-height: 1;
  display: inline-block;
  animation: boing 1.1s cubic-bezier(0.2, 1.6, 0.3, 1) infinite alternate;
  filter: drop-shadow(0 12px 30px rgba(139, 92, 246, 0.6));
}
@keyframes boing {
  from { transform: translateY(0) rotate(-9deg) scale(1); }
  to   { transform: translateY(-22px) rotate(9deg) scale(1.1); }
}

/* Each letter carries its own colour: a transformed child cannot inherit the
   parent's background-clip:text, so a gradient on the <h2> would render blank. */
.cel-head {
  font-size: clamp(44px, 11vw, 104px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.94;
  margin: 12px 0 6px;
  animation: hueshift 3.2s linear infinite;
}
@keyframes hueshift {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}
.cel-head span {
  display: inline-block;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.65), 0 0 34px currentColor;
  animation: pop 0.5s cubic-bezier(0.2, 1.7, 0.35, 1) both,
             bobble 1.6s ease-in-out infinite alternate;
}
@keyframes bobble {
  from { transform: translateY(0) rotate(-2deg); }
  to   { transform: translateY(-9px) rotate(2deg); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(38px) rotate(-18deg) scale(0.4); }
  to   { opacity: 1; transform: none; }
}

.cel-pick {
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 800;
  color: var(--txt);
  margin: 2px 0 12px;
}
.cel-pick b { color: var(--lime); }

.cel-say {
  font-size: clamp(14px, 2.2vw, 18px);
  color: #b9c6e4;
  line-height: 1.5;
  margin: 0 auto 20px;
  max-width: 480px;
  animation: fadeUp 0.6s 0.35s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.stamp {
  display: inline-block;
  border: 4px dashed var(--green);
  color: var(--green);
  border-radius: 14px;
  padding: 9px 20px;
  font-size: clamp(12px, 2vw, 16px);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-9deg);
  animation: slam 0.55s 0.5s cubic-bezier(0.2, 1.5, 0.3, 1) both;
  text-shadow: 0 2px 12px rgba(46, 224, 106, 0.5);
}
@keyframes slam {
  from { opacity: 0; transform: rotate(-9deg) scale(6); }
  70%  { opacity: 1; transform: rotate(-9deg) scale(0.9); }
  to   { opacity: 1; transform: rotate(-9deg) scale(1); }
}

.meter {
  width: min(420px, 84vw);
  margin: 22px auto 6px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  border: 1px solid var(--line);
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--cyan), var(--pink));
  animation: fill 1.7s 0.6s cubic-bezier(0.15, 0.9, 0.2, 1) forwards;
}
@keyframes fill { to { width: 100%; } }

.meter-cap {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.coin-fly {
  position: fixed;
  z-index: 120;
  font-weight: 900;
  font-size: 26px;
  color: var(--lime);
  text-shadow: 0 4px 18px rgba(182, 255, 61, 0.55);
  pointer-events: none;
  animation: fly 1.5s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
@keyframes fly {
  0%   { opacity: 0; transform: translateY(10px) scale(0.6); }
  22%  { opacity: 1; transform: translateY(-10px) scale(1.18); }
  100% { opacity: 0; transform: translateY(-130px) scale(0.9); }
}

.cel-hint {
  margin-top: 20px;
  font-size: 12.5px;
  color: #7c89a8;
  letter-spacing: 0.04em;
  animation: fadeUp 0.6s 1.4s ease both;
}

@media (max-width: 640px) {
  .topbar { padding: 12px 14px; gap: 10px; }
  main { padding: 24px 14px 70px; }
  .grid { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
