:root {
  --bg: #070b14;
  --panel: #0e1626;
  --panel-2: #131d31;
  --line: #22304a;
  --text: #e9eef8;
  --muted: #9aa8c0;
  --messi: #75aadb;
  --messi-ink: #07121f;
  --ronaldo: #ef4444;
  --green: #10b981;
  --focus: #fbbf24;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Impact, "Arial Narrow Bold", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(117, 170, 219, 0.14), transparent 60%),
    radial-gradient(900px 500px at 92% -10%, rgba(239, 68, 68, 0.13), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--messi); }
a:hover { color: #a9c9ea; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(7, 11, 20, 0.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { font-family: var(--display); font-size: 26px; letter-spacing: 1.5px; color: var(--text); text-decoration: none; }
.brand span { color: var(--messi); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }

/* hero */
.hero { text-align: center; padding: 44px 0 18px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(42px, 9vw, 92px); line-height: 0.98; letter-spacing: 0.5px; text-transform: uppercase; }
.lede { margin: 16px auto 0; max-width: 520px; color: var(--muted); font-size: 18px; }

/* scoreboard */
.scoreboard { padding: 22px 0 8px; }
.score-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; }
.score-side { display: flex; flex-direction: column; }
.score-side.ronaldo { align-items: flex-end; text-align: right; }
.score-name { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.score-pct { font-family: var(--display); font-size: clamp(40px, 8vw, 68px); line-height: 1; }
.messi .score-pct { color: var(--messi); }
.ronaldo .score-pct { color: var(--ronaldo); }
.score-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.bar-messi { background: var(--messi); width: 50%; transition: width 0.7s ease; }
.bar-ronaldo { background: var(--ronaldo); width: 50%; transition: width 0.7s ease; }
.score-total { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

/* player picks */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 0 8px; }
.pick {
  position: relative; overflow: hidden; text-align: left; cursor: pointer; color: var(--text);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; min-height: 230px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  font-family: inherit; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pick-messi { background: linear-gradient(160deg, #123055 0%, #0a1424 70%); }
.pick-ronaldo { background: linear-gradient(160deg, #5a1414 0%, #0a1f1a 78%); }
.pick:hover { transform: translateY(-3px); }
.pick-messi:hover, .pick-messi[aria-pressed="true"] { border-color: var(--messi); box-shadow: 0 10px 36px rgba(117, 170, 219, 0.25); }
.pick-ronaldo:hover, .pick-ronaldo[aria-pressed="true"] { border-color: var(--ronaldo); box-shadow: 0 10px 36px rgba(239, 68, 68, 0.25); }
.pick-num { position: absolute; top: -14px; right: 6px; font-family: var(--display); font-size: clamp(110px, 22vw, 190px); line-height: 1; opacity: 0.14; pointer-events: none; }
.pick-name { font-family: var(--display); font-size: clamp(28px, 6vw, 46px); line-height: 1; text-transform: uppercase; letter-spacing: 0.5px; position: relative; }
.pick-cta { position: relative; display: inline-flex; align-self: flex-start; font-weight: 700; font-size: 15px; padding: 10px 16px; border-radius: 999px; }
.pick-messi .pick-cta { background: var(--messi); color: var(--messi-ink); }
.pick-ronaldo .pick-cta { background: var(--ronaldo); color: #fff; }
.pick-cta-on { display: none; }
.pick[aria-pressed="true"] .pick-cta-off { display: none; }
.pick[aria-pressed="true"] .pick-cta-on { display: inline; }
.pick:disabled { cursor: default; opacity: 0.55; transform: none; }

/* panel */
.panel-wrap { padding: 12px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 560px; margin-inline: auto; }
.panel h2 { margin: 0 0 6px; font-size: 22px; }
.hint { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.hint strong { color: var(--text); word-break: break-all; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; font-family: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
input::placeholder { color: #5d6c87; }
.code-input { text-align: center; font-size: 30px !important; letter-spacing: 10px; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 16px 0 8px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--messi); flex: none; }
.turnstile-slot { min-height: 70px; margin: 10px 0 14px; display: flex; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 20px; font-size: 16px; font-weight: 700; font-family: inherit;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}
.btn:hover { background: #1a2742; }
.btn:active { transform: scale(0.98); }
.btn.primary { width: 100%; background: linear-gradient(90deg, var(--messi), #f08a8a 55%, var(--ronaldo)); color: #0a0f1a; border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.link { background: none; border: 0; color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: underline; width: 100%; margin-top: 8px; min-height: 44px; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.status { margin: 14px 0 0; min-height: 22px; font-size: 15px; font-weight: 600; }
.status.error { color: #fca5a5; }
.status.ok { color: #6ee7b7; }
.status:empty { margin: 0; min-height: 0; }

.share-canvas { display: block; width: 100%; max-width: 360px; height: auto; margin: 6px auto 16px; border-radius: 14px; border: 1px solid var(--line); }
.share-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.share-actions .btn:not(.primary) { width: 100%; }
@media (min-width: 520px) { .share-actions { grid-template-columns: 1.4fr 1fr 1fr; } }
.share-links { display: flex; justify-content: center; gap: 22px; margin: 14px 0 4px; font-size: 15px; }

/* how */
.how { padding: 36px 0 18px; max-width: 700px; }
.how h2 { font-size: 22px; margin: 0 0 12px; }
.how ol { padding-left: 20px; color: var(--muted); }
.how li { margin-bottom: 8px; }
.how li strong { color: var(--text); }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; }
.honest { background: var(--panel); border-left: 4px solid var(--focus); padding: 14px 16px; border-radius: 8px; color: var(--muted); }
.honest strong { color: var(--text); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 28px; padding: 26px 0 40px; font-size: 13px; color: var(--muted); text-align: center; }
.site-footer p { max-width: 720px; margin: 0 auto 10px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }
.made { opacity: 0.7; }

/* legal pages */
.legal { max-width: 740px; padding: 36px 0 20px; }
.legal h1 { font-size: clamp(34px, 7vw, 54px); margin-bottom: 6px; }
.legal h2 { margin: 28px 0 8px; font-size: 20px; }
.legal p, .legal li { color: #c3cde0; }
.legal .updated { color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .picks { gap: 10px; }
  .pick { min-height: 200px; padding: 14px; }
  .pick-cta { font-size: 14px; padding: 9px 12px; }
  .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
