/* Player of the Day — 2026 World Cup. Dark theme, zero deps.
   Design tokens shared with the sibling "Battle of the Boots" app. */

:root {
  --bg: #0a0e14;
  --bg2: #0f1520;
  --card: #131b28;
  --card2: #182233;
  --line: #24324a;
  --ink: #eaf0fb;
  --ink-dim: #93a2bd;
  --ink-faint: #61708c;
  --accent: #2dd4bf;
  --accent2: #38bdf8;
  --gold: #ffcc47;
  --goal: #34d399;
  --assist: #38bdf8;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --maxw: 520px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 50% -8%, #16233a 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #10202a 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

.topbar { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 26px clamp(14px,4vw,24px) 6px; text-align: center; }
.title-wrap h1 {
  margin: 0; font-size: clamp(24px, 6vw, 38px); font-weight: 900; letter-spacing: -0.02em;
  background-image:
    linear-gradient(100deg, transparent 42%, rgba(255,255,255,0.92) 50%, transparent 58%),
    linear-gradient(90deg, #ffffff, #9fb4ff 55%, #ffcf6b);
  background-size: 250% 100%, 100% 100%;
  background-position: 220% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: sheen 5s linear infinite;
}
.title-wrap h1 .adidas {
  height: 0.74em; width: auto; margin-right: 0.34em;
  vertical-align: 0.02em;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
@keyframes sheen { 0% { background-position: 220% 0, 0 0; } 100% { background-position: -120% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .title-wrap h1 { animation: none; } }
.subtitle { margin: 6px 0 0; color: var(--ink-dim); font-size: 13px; }

.stage { flex: 1; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 14px clamp(14px,4vw,24px) 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ---------- loader ---------- */
.loader { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; color: var(--ink-dim); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body:not(.is-loading) .loader { display: none; }

/* ---------- the card ---------- */
.potd {
  width: 100%;
  background: linear-gradient(180deg, var(--card2), var(--card) 60%, var(--bg2));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative;
  animation: rise 0.5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px 12px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(255,204,71,0.10), transparent);
  border-bottom: 1px solid var(--line);
}

.hero { position: relative; padding: 26px 20px 6px; text-align: center; }
.photo-wrap { position: relative; width: 168px; height: 168px; margin: 0 auto 6px; }
.photo-wrap .halo {
  position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(45,212,191,0.30), transparent 68%);
  filter: blur(2px);
}
.photo {
  position: relative; width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); box-shadow: 0 10px 26px rgba(0,0,0,.5);
  background: var(--bg2);
}
.rating-badge {
  position: absolute; top: 4px; right: 6px; z-index: 2;
  min-width: 42px; height: 42px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #06231f;
  background: linear-gradient(160deg, #7ff0dd, var(--accent)); border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.25);
}
.rating-badge small { font-size: 9px; font-weight: 800; opacity: .7; margin-left: 1px; align-self: flex-start; margin-top: 4px; }
.flag-chip {
  position: absolute; bottom: -6px; left: -16px; z-index: 2;
  width: 60px; height: 42px; border-radius: 9px; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.18); background: var(--bg2);
}
.flag-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }

.name { margin: 10px 0 2px; font-size: clamp(22px, 6vw, 30px); font-weight: 900; letter-spacing: -0.01em; }
.meta { color: var(--ink-dim); font-size: 13.5px; margin: 0; }
.meta .dot { opacity: .5; margin: 0 6px; }
.nation-line { color: var(--ink); font-weight: 700; }

/* performance banner */
.perf {
  margin: 18px 16px 20px; padding: 16px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); text-align: center;
}
.perf.scored { background: linear-gradient(180deg, rgba(52,211,153,0.12), rgba(52,211,153,0.02)); border-color: rgba(52,211,153,0.35); }
.perf-stats { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 8px; flex-wrap: wrap; }
.stat { display: flex; align-items: baseline; gap: 6px; font-weight: 900; font-size: 22px; }
.stat .lab { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
.stat.goal { color: var(--goal); }
.stat.assist { color: var(--assist); }
.perf-why { font-size: 13.5px; color: var(--ink-dim); margin: 0; }
.perf-why b { color: var(--ink); }
.match-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ink); font-weight: 600; }
.match-line .score { padding: 1px 8px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-weight: 800; }

.reason-tag {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-dim);
  background: var(--bg2); border: 1px solid var(--line);
}

.card-foot { padding: 0 16px 18px; text-align: center; color: var(--ink-faint); font-size: 12px; }

/* ---------- boot ---------- */
.boot {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 0 16px 18px; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
}
.boot-img { height: 92px; width: auto; max-width: 200px; object-fit: contain; flex: 0 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.boot-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.boot-lab { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.boot-name { font-size: 15px; font-weight: 800; color: var(--ink); }

/* ---------- empty / no-match states ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--ink-dim); max-width: 420px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }
.empty h2 { margin: 0 0 8px; font-size: 20px; color: var(--ink); }
body.is-loading .empty, body.is-loading .potd { display: none; }

/* ---------- footer ---------- */
.footer {
  width: 100%; max-width: 1000px; margin: 0 auto; padding: 28px clamp(14px,4vw,24px) 44px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  border-top: 1px solid var(--line);
}
.footer-heading {
  margin: 0; color: var(--ink-dim); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.promo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; }
.promo-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.promo-card:hover { transform: translateY(-3px); border-color: #9fb4ff; box-shadow: 0 16px 38px rgba(0,0,0,.5); }
.promo-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 32 / 15;
  object-fit: cover; border-bottom: 1px solid var(--line);
}
.promo-body { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 16px; }
.promo-title {
  font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(90deg, #fff, #9fb4ff 60%, #ff8a5c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.promo-desc { font-size: 12.5px; line-height: 1.45; color: var(--ink-dim); }
.promo-go { margin-top: 5px; font-size: 12.5px; font-weight: 800; color: #9fb4ff; letter-spacing: .02em; }
.promo-card:hover .promo-go { text-decoration: underline; }
.footer-meta {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  color: var(--ink-faint); font-size: 11.5px;
}
@media (max-width: 620px) { .promo { grid-template-columns: 1fr; max-width: 400px; } }
.disclaimer { position: fixed; bottom: 8px; left: 8px; font-size: 9px; line-height: 1.3; color: var(--ink-faint); opacity: .5; }
