/* =====================================================================
   Suriname Football Challenge 2026 — styles
   Mobile-first. Colours drawn from the Suriname flag (green/red/yellow).
   ===================================================================== */
:root {
  --green: #377e3f;
  --green-d: #2b6431;
  --red: #c8102e;
  --yellow: #f7d417;
  --ink: #14241a;
  --paper: #f4f6f3;
  --card: #ffffff;
  --muted: #6b7a70;
  --line: #e4e9e4;

  --platinum: #8b93a7;
  --gold: #d4a02a;
  --silver: #9aa0a6;
  --bronze: #b07a3c;

  --shadow: 0 2px 10px rgba(20, 36, 26, .07);
  --radius: 16px;
  --maxw: 520px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  padding-bottom: 78px; /* room for bottom nav */
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .3em; line-height: 1.15; }

/* ---- App shell ---- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(120deg, var(--green), var(--green-d));
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.appbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.appbar .brand .star { color: var(--yellow); font-size: 20px; }
.appbar .pts-chip {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 5px 12px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
}
.appbar .pts-chip small { font-weight: 500; opacity: .85; margin-left: 4px; }

#view { max-width: var(--maxw); margin: 0 auto; padding: 16px 14px 24px; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(150deg, var(--green) 0%, var(--green-d) 55%, #1f4a26 100%);
  color: #fff; border-radius: var(--radius);
  padding: 26px 22px 22px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "⚽"; position: absolute; right: -14px; bottom: -22px;
  font-size: 130px; opacity: .10; transform: rotate(-12deg);
}
.hero-badge {
  display: inline-block; background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 12px; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 8px; margin-bottom: 12px;
}
.hero h1 { font-size: 30px; font-weight: 800; }
.hero h1 span { color: var(--yellow); }
.hero p { margin: 6px 0 16px; opacity: .92; }
.hero-points { display: flex; align-items: baseline; gap: 8px; }
.hero-points .big { font-size: 40px; font-weight: 800; color: var(--yellow); }
.hero-points .lbl { font-size: 13px; opacity: .85; }
.presented { margin-top: 14px; font-size: 13px; opacity: .9; }
.presented strong { color: var(--yellow); }
.presented.small { margin-top: 8px; font-size: 12px; }

/* ---- Tiles ---- */
.tile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px;
}
.tile {
  background: var(--card); border-radius: var(--radius); padding: 16px 14px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .12s ease;
}
.tile:active { transform: scale(.97); }
.tile-ic { font-size: 26px; }
.tile h3 { font-size: 15px; margin-top: 8px; }
.tile p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* ---- Cards & sections ---- */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 16px; margin-top: 12px;
}
.card.stack .btn { width: 100%; margin-top: 8px; }
.section-head h2 { font-size: 22px; }
.section-head p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.sub { font-size: 15px; margin: 18px 0 6px; color: var(--ink); }
.hint { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; width: 100%; text-align: center;
  background: var(--green); color: #fff; border: none;
  padding: 12px 16px; border-radius: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 12px; transition: filter .12s, transform .12s;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: #eef3ee; color: var(--green-d); }
.btn.saved { background: var(--green-d); }
.btn:disabled { opacity: .7; cursor: default; }

/* ---- Match predictor ---- */
.rules-card .rules { display: flex; flex-wrap: wrap; gap: 8px; }
.rules span {
  background: #eef5ef; color: var(--green-d); font-size: 12px;
  padding: 5px 9px; border-radius: 8px;
}
.rules b { color: var(--ink); }
.match-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.match-head .stage { font-weight: 700; color: var(--green-d); }
.match-teams {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; margin: 12px 0;
}
.team { text-align: center; font-weight: 600; font-size: 14px; }
.team .fl { display: block; font-size: 30px; line-height: 1; }
.score-in { display: flex; align-items: center; gap: 6px; }
.score-in input {
  width: 46px; height: 46px; text-align: center; font-size: 20px; font-weight: 700;
  border: 2px solid var(--line); border-radius: 12px; background: #fafcfa;
}
.score-in input:focus { outline: none; border-color: var(--green); }
.score-in .dash { font-weight: 800; color: var(--muted); }
.bonus-q { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.bonus-q select {
  display: block; width: 100%; margin-top: 5px; padding: 9px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: #fff;
}

/* ---- Quiz ---- */
.sponsor-banner {
  background: var(--yellow);
  color: var(--ink); font-weight: 700; font-size: 13px;
  padding: 12px 14px; border-radius: 12px; margin: 4px 0 6px;
  border: 1px dashed rgba(20, 36, 26, .25);
}
.q-progress { font-size: 12px; color: var(--muted); font-weight: 700; }
.q-text { font-size: 18px; margin: 6px 0 14px; }
.q-opts { display: grid; gap: 10px; }
.opt {
  text-align: left; background: #f6f9f6; border: 2px solid var(--line);
  padding: 13px 14px; border-radius: 12px; font-size: 15px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.opt:hover { border-color: var(--green); }
.opt.right { background: #e3f6e6; border-color: var(--green); }
.opt.wrong { background: #fde7e9; border-color: var(--red); }
.done { text-align: center; padding: 14px 8px; font-size: 16px; }
.done .earned { color: var(--green-d); font-weight: 800; font-size: 20px; display: block; margin-top: 4px; }

/* ---- Leaderboards ---- */
.league-grid, .sponsor-grid, .prize-grid { display: grid; gap: 10px; }
.league-card.lead { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(247, 212, 23, .35), var(--shadow); }
.league-row { display: flex; align-items: center; gap: 12px; }
.league-row .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.league-meta { flex: 1; display: flex; flex-direction: column; }
.league-meta small { color: var(--muted); font-size: 12px; }
.league-pts { font-weight: 800; }
.league-pts small { font-weight: 500; color: var(--muted); margin-left: 3px; font-size: 11px; }

.board { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); margin-top: 6px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: none; }
.board-row .pos { width: 22px; font-weight: 800; color: var(--muted); text-align: center; }
.board-row .who { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.board-row .who small { color: var(--muted); font-weight: 500; font-size: 12px; }
.board-row .pts { font-weight: 800; }
.board-row.you { background: #eef7ef; }
.board-row.you .pos { color: var(--green-d); }

/* ---- QR hunt ---- */
.qr-row { display: flex; align-items: center; gap: 12px; }
.qr-ic { font-size: 24px; }
.qr-meta { flex: 1; display: flex; flex-direction: column; }
.qr-meta small { color: var(--muted); font-size: 12px; }
.qr-pts { font-weight: 800; color: var(--green-d); }

/* ---- Prizes ---- */
.qualify { text-align: center; font-size: 15px; }
.qualify.ok { color: var(--green-d); }
.qualify .bar { height: 10px; background: #e8eee8; border-radius: 999px; margin: 10px 0 4px; overflow: hidden; }
.qualify .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); transition: width .4s; }
.qualify small { color: var(--muted); font-size: 12px; }
.prize-grid { grid-template-columns: 1fr 1fr; }
.prize { display: flex; flex-direction: column; text-align: center; }
.prize .val { font-weight: 800; color: var(--green-d); margin: 2px 0; }
.prize small { color: var(--muted); font-size: 12px; }

/* ---- Sponsors ---- */
.sponsor-grid { grid-template-columns: 1fr 1fr; }
.sponsor-card { text-align: center; }
.sponsor-logo {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 14px;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: var(--ink); background: #fafcfa;
}
.sponsor-card small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.cta { text-align: center; }
.cta .pkgs { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.cta .pkgs div { background: #f4f8f4; border-radius: 10px; padding: 8px 4px; display: flex; flex-direction: column; }
.cta .pkgs b { font-size: 12px; }
.cta .pkgs span { font-size: 12px; color: var(--green-d); font-weight: 700; }

/* ---- Bottom nav ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 6px 4px env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(20, 36, 26, .06);
}
.nav-item {
  flex: 1; text-align: center; padding: 6px 2px; font-size: 10px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav-item .ic { font-size: 20px; }
.nav-item.active { color: var(--green-d); font-weight: 700; }

/* ---- Toast ---- */
#toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 540px) {
  .tile-grid { grid-template-columns: 1fr 1fr 1fr; }
}
