/* ==========================================================================
   GOLDEN BOOT ’26 — “Matchday under floodlights”
   Deep pitch green, chalk lines, scoreboard numerals, trophy gold.
   ========================================================================== */

:root {
  --pitch-900: #07150d;
  --pitch-800: #0a1f14;
  --pitch-700: #102b1c;
  --pitch-600: #173a26;
  --chalk: #f2f7ef;
  --chalk-dim: rgba(242, 247, 239, 0.55);
  --chalk-line: rgba(242, 247, 239, 0.12);
  --gold: #ffc83d;
  --gold-deep: #c98f00;
  --grass-glow: #35d07f;
  --red: #ff5f45;
  --font-display: "Anton", sans-serif;
  --font-body: "Chivo", sans-serif;
  --font-score: "Chivo Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 30rem at 85% -5%, rgba(53, 208, 127, 0.10), transparent 60%),
    radial-gradient(50rem 28rem at 10% -8%, rgba(255, 200, 61, 0.07), transparent 60%),
    linear-gradient(180deg, var(--pitch-800), var(--pitch-900) 60%);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* --- atmosphere -------------------------------------------------------- */

.floodlight {
  position: fixed; top: -18rem; width: 70rem; height: 42rem;
  pointer-events: none; z-index: 0; opacity: 0.5;
}
.floodlight-left  { left: -30rem; background: conic-gradient(from 130deg at 50% 0, transparent 0deg, rgba(242,247,239,0.05) 14deg, transparent 30deg); }
.floodlight-right { right: -30rem; background: conic-gradient(from 215deg at 50% 0, transparent 0deg, rgba(242,247,239,0.05) 14deg, transparent 30deg); }

.pitch-circle {
  position: fixed; left: 50%; top: 38rem; transform: translateX(-50%);
  width: 110rem; height: 110rem; border-radius: 50%;
  border: 2px solid var(--chalk-line);
  pointer-events: none; z-index: 0;
}
.pitch-circle::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: 50%; border: 2px dashed rgba(242, 247, 239, 0.04);
  margin: 2.5rem;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page { position: relative; z-index: 1; max-width: 62rem; margin: 0 auto; padding: 2.5rem 1.25rem 7rem; }

/* --- load-in ----------------------------------------------------------- */

.reveal { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reveal-2 { animation-delay: 0.12s; }
.reveal-3 { animation-delay: 0.24s; }
.reveal-4 { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-2, .reveal-3, .reveal-4 { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- toasts ------------------------------------------------------------ */

.toasts { position: sticky; top: 0.75rem; z-index: 60; display: grid; gap: 0.5rem; max-width: 42rem; margin: 0.75rem auto 0; padding: 0 1.25rem; }
.toast {
  padding: 0.7rem 1rem; border-radius: 0.4rem; font-weight: 600; font-size: 0.95rem;
  background: var(--pitch-600); border: 1px solid var(--chalk-line);
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.45);
  animation: rise 0.4s ease both;
}
.toast-success { border-left: 4px solid var(--grass-glow); }
.toast-error   { border-left: 4px solid var(--red); }
.toast-info    { border-left: 4px solid var(--gold); }

/* --- typography blocks -------------------------------------------------- */

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 0.04em; text-transform: uppercase;
  margin: 0 0 1rem; color: var(--chalk);
}

/* ==========================================================================
   INVITE PAGE
   ========================================================================== */

.hero { text-align: center; padding: 3.5rem 0 1rem; }
.hero-kicker {
  font-family: var(--font-score); font-size: 0.85rem; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--grass-glow); margin: 0 0 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.92; margin: 0;
  text-transform: uppercase;
  text-shadow: 0 0.5rem 3rem rgba(0, 0, 0, 0.6);
}
.hero-title-accent {
  color: var(--gold);
  text-shadow: 0 0 4rem rgba(255, 200, 61, 0.35);
}
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img {
  width: min(34rem, 92vw);
  border-radius: 1.2rem;
  border: 1px solid var(--chalk-line);
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.55), 0 0 6rem rgba(255, 200, 61, 0.12);
}
.hero-sub { color: var(--chalk-dim); font-size: 1.05rem; margin: 1.5rem auto 0; max-width: 36rem; }
@media (max-width: 40rem) { .wide-only { display: none; } }

/* ticket form */
.ticket {
  display: flex; align-items: stretch; gap: 0;
  max-width: 38rem; margin: 2.5rem auto;
  background: linear-gradient(135deg, var(--pitch-600), var(--pitch-700));
  border: 1px solid var(--chalk-line); border-radius: 0.8rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.ticket-stub {
  display: grid; place-items: center; font-size: 2rem; padding: 0 1.25rem;
  background: rgba(255, 200, 61, 0.08);
  border-right: 2px dashed var(--chalk-line);
}
.ticket-form { padding: 1.4rem 1.5rem; flex: 1; }
.ticket-label { display: block; font-weight: 700; margin-bottom: 0.8rem; }
.ticket-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ticket-row input {
  flex: 1; min-width: 12rem;
  background: var(--pitch-900); color: var(--chalk);
  border: 1px solid var(--chalk-line); border-radius: 0.4rem;
  padding: 0.75rem 0.9rem; font: inherit;
}
.ticket-row input:focus { outline: 2px solid var(--grass-glow); outline-offset: 1px; border-color: transparent; }
.ticket-row button {
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer;
  color: #1d1400; background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: 0; border-radius: 0.4rem; padding: 0.75rem 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ticket-row button:hover { transform: translateY(-2px); box-shadow: 0 0.7rem 1.6rem rgba(255, 200, 61, 0.3); }
.ticket-hint { color: var(--chalk-dim); font-size: 0.85rem; margin: 0.8rem 0 0; }

/* rule cards */
.rules { margin-top: 4rem; }
.rule-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.rule-card {
  position: relative; padding: 1.5rem 1.25rem 1.25rem;
  background: var(--pitch-700); border: 1px solid var(--chalk-line); border-radius: 0.6rem;
  overflow: hidden;
}
.rule-card:nth-child(even) { transform: rotate(0.4deg); }
.rule-card:nth-child(odd)  { transform: rotate(-0.4deg); }
.rule-num {
  position: absolute; top: -1.2rem; right: -0.4rem;
  font-family: var(--font-display); font-size: 5.5rem; line-height: 1;
  color: rgba(242, 247, 239, 0.06);
}
.rule-card h3 { font-family: var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; margin: 0 0 0.5rem; font-size: 1.1rem; }
.rule-card p { margin: 0; color: var(--chalk-dim); font-size: 0.95rem; }

.pts { font-family: var(--font-score); }
.pts-exact { color: var(--gold); }
.pts-tendency { color: var(--grass-glow); }

.fairplay {
  margin: 3rem auto 0; max-width: 44rem; text-align: center;
  padding: 1.75rem; border: 2px dashed var(--chalk-line); border-radius: 0.8rem;
}
.fairplay p { color: var(--chalk-dim); margin: 0; }

/* ==========================================================================
   PLAYER PAGE
   ========================================================================== */

.topbar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem; border-bottom: 2px solid var(--chalk-line); margin-bottom: 1.5rem;
}
.topbar-brand { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: 0.04em; }
.topbar-brand span { color: var(--gold); }
.topbar-player { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.topbar-playing { color: var(--chalk-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; }
.topbar-name { font-family: var(--font-display); font-size: 1.3rem; color: var(--grass-glow); }

.namechange summary {
  cursor: pointer; color: var(--chalk-dim); font-size: 0.85rem; text-decoration: underline dotted;
  list-style: none;
}
.namechange summary::-webkit-details-marker { display: none; }
.namechange-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.namechange-form input {
  background: var(--pitch-900); color: var(--chalk); border: 1px solid var(--chalk-line);
  border-radius: 0.35rem; padding: 0.45rem 0.6rem; font: inherit; width: 12rem;
}
.namechange-form button {
  cursor: pointer; border: 0; border-radius: 0.35rem; padding: 0.45rem 0.9rem;
  background: var(--grass-glow); color: #04150b; font-weight: 700; font-family: inherit;
}

.futurama-note { color: var(--chalk-dim); font-size: 0.95rem; margin: -0.5rem 0 1.5rem; }
.futurama-note strong { color: var(--gold); }

/* my stats strip */
.mystats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.stat {
  flex: 1; min-width: 7.5rem; text-align: center;
  background: var(--pitch-700); border: 1px solid var(--chalk-line); border-radius: 0.6rem;
  padding: 0.9rem 0.5rem;
}
.stat-value { display: block; font-family: var(--font-score); font-weight: 700; font-size: 1.9rem; color: var(--gold); }
.stat-label { color: var(--chalk-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; }

/* leaderboard */
.board-details summary { cursor: pointer; list-style: none; }
.board-details summary::-webkit-details-marker { display: none; }
.board-details summary .section-title { display: inline-block; }
.board-details summary::after { content: " ▾"; color: var(--chalk-dim); }
.board-details[open] summary::after { content: " ▴"; color: var(--chalk-dim); }

.board-table {
  width: 100%; border-collapse: collapse; margin-bottom: 1rem;
  background: var(--pitch-700); border: 1px solid var(--chalk-line); border-radius: 0.6rem; overflow: hidden;
}
.board-table th, .board-table td { padding: 0.55rem 0.9rem; text-align: left; }
.board-table thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--chalk-dim);
  border-bottom: 2px solid var(--chalk-line); font-weight: 600;
}
.board-table tbody tr + tr td { border-top: 1px solid rgba(242, 247, 239, 0.05); }
.t-num, .t-rank { text-align: center !important; font-family: var(--font-score); }
.t-points { font-weight: 700; color: var(--gold); }
.board-top td { background: rgba(255, 200, 61, 0.04); }
.board-me td { background: rgba(53, 208, 127, 0.1); }
.you-tag {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--grass-glow); color: #04150b; border-radius: 0.25rem; padding: 0.1rem 0.4rem; margin-left: 0.4rem;
}

/* round nav */
.roundnav { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.roundnav a {
  color: var(--chalk); text-decoration: none; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--chalk-line); border-radius: 2rem; padding: 0.35rem 0.9rem;
  background: var(--pitch-700); transition: border-color 0.15s ease, color 0.15s ease;
}
.roundnav a:hover { border-color: var(--grass-glow); color: var(--grass-glow); }

/* rounds + matches */
.round { margin-bottom: 2.75rem; scroll-margin-top: 1rem; }
.round-title {
  font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem;
}
.round-title::after { content: ""; flex: 1; height: 2px; background: var(--chalk-line); }

.match {
  background: var(--pitch-700); border: 1px solid var(--chalk-line); border-radius: 0.6rem;
  padding: 0.8rem 1.1rem; margin-bottom: 0.6rem;
  transition: border-color 0.15s ease;
}
.match:hover { border-color: rgba(242, 247, 239, 0.25); }
.match-locked { opacity: 0.92; background: var(--pitch-800); }

.match-meta {
  display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: baseline;
  font-size: 0.75rem; color: var(--chalk-dim); margin-bottom: 0.5rem;
}
.match-no { font-family: var(--font-score); color: var(--grass-glow); }
.match-group { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.match-when { font-family: var(--font-score); }

.match-line {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.9rem; align-items: center;
}
.team { font-weight: 700; font-size: 1.02rem; }
.team-home { text-align: right; }
.team-away { text-align: left; }

.scorebox { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-score); }
.scorebox i { font-style: normal; color: var(--chalk-dim); font-weight: 700; }
.scorebox-final {
  font-size: 1.35rem; font-weight: 700; color: var(--gold);
  background: var(--pitch-900); border: 1px solid var(--chalk-line); border-radius: 0.4rem;
  padding: 0.25rem 0.8rem;
}
.scorebox-open input {
  width: 3.1rem; text-align: center;
  font-family: var(--font-score); font-size: 1.25rem; font-weight: 700;
  color: var(--chalk); background: var(--pitch-900);
  border: 1px solid var(--chalk-line); border-radius: 0.4rem;
  padding: 0.35rem 0.2rem;
  -moz-appearance: textfield; appearance: textfield;
}
.scorebox-open input::-webkit-outer-spin-button,
.scorebox-open input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.scorebox-open input:focus { outline: 2px solid var(--grass-glow); outline-offset: 1px; border-color: transparent; }

.match-verdict { display: flex; gap: 0.7rem; align-items: center; justify-content: center; margin-top: 0.5rem; }
.yourtip { font-family: var(--font-score); font-size: 0.85rem; color: var(--chalk-dim); }
.yourtip-none { font-style: italic; }
.ptsbadge {
  font-family: var(--font-score); font-weight: 700; font-size: 0.8rem;
  border-radius: 0.3rem; padding: 0.1rem 0.5rem;
}
.ptsbadge.pts-exact    { background: var(--gold); color: #1d1400; }
.ptsbadge.pts-tendency { background: var(--grass-glow); color: #04150b; }
.ptsbadge.pts-zero     { background: rgba(242, 247, 239, 0.1); color: var(--chalk-dim); }
.ptsbadge.pts-wait     { border: 1px dashed var(--chalk-line); color: var(--chalk-dim); font-weight: 400; }

/* save bar */
.savebar {
  position: sticky; bottom: 0.9rem; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: rgba(16, 43, 28, 0.92); backdrop-filter: blur(6px);
  border: 1px solid var(--chalk-line); border-radius: 0.8rem;
  padding: 0.8rem 1.2rem; box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.55);
}
.savebar-hint { color: var(--chalk-dim); font-size: 0.85rem; }
.savebar-btn {
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; color: #1d1400;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: 0; border-radius: 0.5rem; padding: 0.7rem 1.8rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.savebar-btn:hover { transform: translateY(-2px); box-shadow: 0 0.7rem 1.6rem rgba(255, 200, 61, 0.35); }

/* podium */
.podium-zone { margin-bottom: 2.5rem; text-align: center; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 0.8rem; margin-top: 1.5rem; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 10rem; }
.podium-medal { font-size: 2.4rem; }
.podium-name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.03em; }
.podium-points { font-family: var(--font-score); color: var(--chalk-dim); font-size: 0.9rem; }
.podium-block { width: 100%; border-radius: 0.4rem 0.4rem 0 0; border: 1px solid var(--chalk-line); border-bottom: 0; }
.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }
.podium-1 .podium-block { height: 7rem; background: linear-gradient(180deg, rgba(255, 200, 61, 0.45), rgba(255, 200, 61, 0.08)); }
.podium-2 .podium-block { height: 4.6rem; background: linear-gradient(180deg, rgba(220, 225, 230, 0.35), rgba(220, 225, 230, 0.06)); }
.podium-3 .podium-block { height: 3.2rem; background: linear-gradient(180deg, rgba(205, 127, 50, 0.4), rgba(205, 127, 50, 0.07)); }

/* ==========================================================================
   ROOT / DISABLED
   ========================================================================== */

.void { text-align: center; padding: 22vh 0 0; }
.void-ball { font-size: 4rem; display: inline-block; animation: bounce 1.6s ease-in-out infinite; }
.void-card { font-size: 4rem; display: inline-block; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.4rem) rotate(180deg); }
}
.void-text { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: 0.2em; margin: 1.2rem 0 0.3rem; }
.void-sub { color: var(--chalk-dim); margin: 0; }

/* --- footer ------------------------------------------------------------ */

.footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1rem; justify-content: center;
  padding: 2rem 1.25rem 2.5rem;
  color: var(--chalk-dim); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-align: center;
}
.footer-line { flex: 0 1 6rem; height: 1px; background: var(--chalk-line); }

@media (max-width: 40rem) {
  .match-line { grid-template-columns: 1fr; text-align: center; }
  .team-home, .team-away { text-align: center; }
  .scorebox { justify-content: center; margin: 0 auto; }
  .podium-step { width: 30%; }
}
