/* Guess the Football Star — styles. Big, colorful, kid-friendly, portrait-first. */
:root {
  --brand: #2C3A43;
  --brand-2: #517485;
  --accent: #E84E0F;
  --green: #2E9E4F;
  --gold: #FFD700;
  --danger: #D2434D;
  --bg: #eaf2f6;
  --card: #ffffff;
  --ink: #1e2b33;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(44, 58, 67, 0.14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(160deg, #dbe9f0 0%, #eaf2f6 45%, #f4e9dd 100%);
  color: var(--ink);
  min-height: 100%;
}
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- home ---------- */
.home-topbar { display: flex; justify-content: flex-end; padding: 4px 0; }
.mascot { font-size: 96px; text-align: center; line-height: 1; animation: bob 2.2s ease-in-out infinite; margin-top: 2vh; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.15)); }
.home-title { font-size: clamp(26px, 6vw, 40px); font-weight: 800; text-align: center; color: var(--brand); letter-spacing: -0.5px; }
.home-mode-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.home-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mode-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 130px; padding: 16px 10px; border: none; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease; font: inherit;
  border-bottom: 4px solid var(--brand-2);
}
.mode-card:active { transform: scale(0.96); }
.mode-ico { font-size: 46px; line-height: 1; }
.mode-label { font-weight: 800; font-size: 18px; color: var(--brand); text-align: center; }
.mode-desc { font-size: 13px; color: var(--brand-2); text-align: center; opacity: .85; }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; } 
.topbar-title { font-weight: 800; font-size: 18px; color: var(--brand); flex: 1; text-align: center; }

/* ---------- buttons ---------- */
.btn { min-height: 58px; padding: 12px 20px; border: none; border-radius: 14px; background: var(--brand-2); color: #fff; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; box-shadow: var(--shadow); min-width: 80px; }
.btn:active { transform: scale(0.97); }
.btn.small { min-height: 46px; font-size: 15px; padding: 8px 14px; background: var(--brand); }
.btn.warn { background: var(--danger); }
.btn.primary { background: var(--accent); }

/* ---------- question ---------- */
.question-area { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.q-clue { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 140px; justify-content: center; }
.q-prompt { font-size: clamp(22px, 5vw, 30px); font-weight: 800; text-align: center; color: var(--brand); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.streak-pip-wrap { display: inline-flex; }
.streak-pip { background: var(--accent); color: #fff; font-size: 15px; padding: 4px 10px; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow); }
.q-choices { display: grid; gap: 12px; }
.choice {
  min-height: 64px; padding: 16px; border: none; border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow); font: inherit; font-weight: 700; font-size: 20px; color: var(--brand);
  cursor: pointer; border-left: 5px solid var(--brand-2); transition: transform .1s ease, background .2s;
}
.choice:active { transform: scale(0.98); }
.choice.is-answer { background: var(--green); color: #fff; border-left-color: #1b6a37; }
.choice.is-picked { background: #f7d9d9; color: var(--danger); border-left-color: var(--danger); }
.choice:disabled { cursor: default; opacity: .9; }
.q-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* clue bits */
.clue-team { display: flex; align-items: center; gap: 18px; }
.flag { width: 96px; height: 64px; border-radius: 8px; box-shadow: var(--shadow); object-fit: cover; background: #fff; }
.badge, .crest {
  width: 84px; height: 84px; border-radius: 50%; position: relative;
  background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 20px; text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.badge span { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.85) 40%, var(--c1)); }
.clue-player { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar { width: 120px; height: 120px; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow); }
.player-meta { font-weight: 800; font-size: 22px; color: var(--brand); }
.clue-club { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.crest-img { width: 84px; height: 84px; border-radius: 12px; object-fit: contain; background: #fff; box-shadow: var(--shadow); }
.clue-anthem .disc { width: 100px; height: 100px; border-radius: 50%; background: var(--brand-2); color: #fff; font-size: 46px; display: flex; align-items: center; justify-content: center; animation: spin 6s linear infinite; }

/* ---------- feedback ---------- */
.feedback { margin-top: 12px; text-align: center; }
.feedback.good { animation: pop-in .35s ease; }
.feedback-title { font-size: 34px; font-weight: 900; color: var(--green); }
.feedback.ok .feedback-title { color: var(--accent); }
.feedback-sub { font-size: 18px; color: var(--brand-2); margin-top: 4px; }
.sticker-pop { width: 150px; margin: 18px auto 8px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.sticker-pop span { font-size: 54px; display: block; }
.sticker-pop-label { font-weight: 800; font-size: 18px; color: var(--brand); margin-top: 6px; }
.sticker-pop-rarity { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.sticker-pop.rare { border: 3px solid #b06ab3; }
.sticker-pop.shiny { border: 3px solid var(--gold); animation: glow 1.4s ease-in-out infinite; }
.feedback-bonus { margin-top: 8px; font-weight: 800; color: var(--gold); }
.feedback-actions { margin-top: 14px; }

/* ---------- album ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel h2 { color: var(--brand); margin: 0 0 12px; }
.album-progress { height: 22px; background: #e3ecf1; border-radius: 999px; overflow: hidden; }
.album-progress .bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .5s ease; }
.album-grid { margin-top: 16px; }
.album-section { margin-bottom: 16px; }
.album-section h3 { color: var(--brand-2); margin: 0 0 8px; font-size: 17px; }
.album-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.sticker { background: #fff; border: 2px solid #e0e8ee; border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.sticker.rare { border-color: #b06ab3; }
.sticker.shiny { border-color: var(--gold); animation: glow 1.6s ease-in-out infinite; }
.sticker-emoji { font-size: 40px; display: block; text-align: center; }
.sticker-label { font-size: 12px; font-weight: 700; color: var(--brand); text-align: center; margin-top: 4px; overflow-wrap: anywhere; }

/* ---------- settings ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.setting-row label { font-weight: 700; color: var(--brand); }
.seg { display: inline-flex; gap: 6px; }
.seg-btn { min-height: 48px; padding: 6px 16px; border: 2px solid var(--brand-2); background: #fff; color: var(--brand-2); border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.seg-btn.on { background: var(--brand-2); color: #fff; }
.muted { color: var(--brand-2); opacity: .8; }
.center { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti span { position: absolute; top: -20px; display: block; border-radius: 3px; animation: fall linear forwards; }

/* ---------- animations ---------- */
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes pop-in { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 6px var(--gold); } 50% { box-shadow: 0 0 22px var(--gold); } }
@keyframes fall { 0% { transform: translateY(-30px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: 0; } }

@media (min-width: 520px) {
  .home-modes { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
