/* ── TOKENS ── */
:root {
  --bg:        #21252e;
  --surface:   #2a2f3a;
  --border:    #3c4250;
  --muted:     #545a6b;
  --text:      #ecedf2;
  --subtle:    #b8bdd0;
  --accent:    #f0c040;
  --accent2:   #4af0a0;
  --danger:    #f04060;
  --gold:      #f0c040;
  --silver:    #a0b0c0;
  --bronze:    #d08040;
  --radius:    10px;
  --font-head: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: hidden; max-width: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.6;
  min-height: 100vh;
  isolation: isolate;
}

main { position: relative; z-index: 1; }

/* Globaal: geen paarse visited-links op donkere achtergrond.
   Buttons/badges uitsluiten zodat die hun eigen kleur houden. */
a:not(.btn):not(.badge):not(.fav-btn):not(.nav-logo),
a:not(.btn):not(.badge):not(.fav-btn):not(.nav-logo):visited { color: var(--accent); }
a:not(.btn):not(.badge):not(.fav-btn):not(.nav-logo):hover   { color: var(--text); }

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  min-height: 60px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--muted); background: var(--surface); }

.nav-logo {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo span { color: var(--text); }

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--subtle);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--surface); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
}

.btn-primary { background: var(--accent); color: #21252e; }
.btn-primary:hover { background: #f5d060; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--muted); background: var(--surface); }
.btn-sm { padding: 8px 16px; font-size: 14px; min-height: 44px; }
.btn { min-height: 46px; }

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── HERO ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(240,192,64,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero-title em { color: var(--accent); font-style: normal; }

.hero-sub {
  color: var(--subtle);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── GROUP CARDS ── */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 32px 0;
}

.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: block;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.group-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.group-card:hover::before { transform: scaleX(1); }

.group-card-name {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.group-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 16px;
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-public  { background: rgba(74,240,160,0.12); color: var(--accent2); }
.badge-private { background: rgba(240,64,96,0.12);  color: var(--danger); }
.badge-gold    { background: rgba(240,192,64,0.15); color: var(--gold); }

/* ── AVATAR ── */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* ── LEADERBOARD ── */
.leaderboard { display: flex; flex-direction: column; }

.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 80px 80px 80px 80px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(255,255,255,0.02); }

.lb-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.lb-rank { font-family: var(--font-head); font-size: 22px; color: var(--muted); text-align: center; }
.lb-rank.gold   { color: var(--gold); }
.lb-rank.silver { color: var(--silver); }
.lb-rank.bronze { color: var(--bronze); }

.lb-player { display: flex; align-items: center; gap: 10px; }
.lb-name   { font-weight: 600; font-size: 15px; }
.lb-sub    { font-size: 12px; color: var(--subtle); }

.lb-stat { text-align: right; font-family: var(--font-mono); font-size: 14px; }
.lb-stat.accent { color: var(--accent); font-weight: 600; }

/* ── GAME PICKER (zoek-dropdown) ── */
.game-picker { position: relative; }
.game-picker-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  list-style: none;
  padding: 4px;
  margin: 0;
  z-index: 20;
}
.game-picker-list li {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s;
}
.game-picker-list li:hover,
.game-picker-list li.active {
  background: var(--bg);
  color: var(--accent);
}
.game-picker-empty {
  padding: 12px !important;
  color: var(--subtle);
  cursor: default !important;
  font-size: 13px;
}
.game-picker-empty:hover { background: none !important; color: var(--subtle) !important; }

/* "Deed niet mee" toggle — pill rechts van de naam, icoon + label */
.skip-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 0.85;
  transition: all 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.skip-toggle > span:last-child { font-size: 12px; }
.skip-toggle input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.skip-toggle:hover { opacity: 1; border-color: var(--accent); }
.skip-toggle:has(input:checked) {
  opacity: 1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 0 3px rgba(240,192,64,0.15);
}
.skip-toggle:has(input:checked) > span:last-child { color: var(--bg); }

@media (max-width: 640px) {
  .skip-toggle { height: 38px; padding: 0 10px; font-size: 16px; }
}

/* "Deed niet mee": rij grijs en score/winnaar uit */
.score-row-skipped .score-player-name { text-decoration: line-through; color: var(--subtle); }
.score-row-skipped .avatar             { opacity: 0.5; }
.score-row-skipped input[type="number"],
.score-row-skipped .toggle-btn         { opacity: 0.4; pointer-events: none; }

/* ── SESSIE UITSLAG ── */
.uitslag-list { display: flex; flex-direction: column; }
.uitslag-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.uitslag-row:last-child { border-bottom: none; }
.uitslag-rank { font-size: 20px; }
.uitslag-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-width: 0;
  flex-wrap: wrap;
}
.uitslag-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.uitslag-score { text-align: right; font-size: 18px; white-space: nowrap; }

@media (max-width: 640px) {
  .uitslag-row {
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 14px 0;
  }
  .uitslag-name { gap: 8px; font-size: 14px; }
  .uitslag-name .avatar { width: 28px; height: 28px; font-size: 10px; }
  .uitslag-name .badge { font-size: 9px !important; padding: 2px 6px; }
  .uitslag-score { font-size: 16px; }
  .uitslag-rank { font-size: 18px; }
}

/* ── FORMS ── */
.form-section  { margin-bottom: 20px; }
.form-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--subtle);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px; /* 16px voorkomt auto-zoom in iOS Safari */
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }

select.form-input { appearance: none; cursor: pointer; }

/* ── SCORE ROWS ── */
.score-row {
  display: grid;
  grid-template-columns: 1fr auto 140px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* Winnaar-knop in een spelersrij: pill met icoon + label.
   Niet van toepassing op het cirkel-icoontje binnen .team-winner-label. */
.toggle-btn[data-ref] {
  width: auto;
  min-width: 46px;
  padding: 0 14px;
  height: 46px;
  border-radius: 999px;
  gap: 6px;
  font-size: 16px;
  white-space: nowrap;
}
.toggle-btn[data-ref] > span:last-child { font-size: 13px; }

.score-row:last-child { border-bottom: none; }

.score-player {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-weight: 500;
  min-width: 0;
}
.score-player-name { min-width: 0; overflow-wrap: anywhere; }

.toggle-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.toggle-btn.active,
.team-winner-check:checked + .toggle-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #21252e;
  box-shadow: 0 0 0 3px rgba(240,192,64,0.20);
}

.team-winner-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--subtle);
  user-select: none;
}
.team-winner-label:hover .toggle-btn { border-color: var(--muted); }
.team-winner-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.team-winner-check:checked ~ .team-winner-text { color: var(--accent); }

/* ── STATS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--subtle);
}

/* ── FORM RESULTS ── */
.form-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.form-result.W { background: rgba(74,240,160,0.15); color: var(--accent2); }
.form-result.L { background: rgba(240,64,96,0.12);  color: var(--danger); }

/* ── WIN BAR ── */
.win-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.win-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.page-header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: 48px;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 8px;
}

.page-header-sub {
  color: var(--subtle);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: 0.5px;
}

/* ── GAME CHIPS ── */
.game-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.game-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--subtle);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.game-chip:hover,
.game-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240,192,64,0.06);
}

/* ── INVITE BOX ── */
.invite-box {
  background: rgba(240,192,64,0.06);
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.invite-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 4px;
}

.invite-link { font-family: var(--font-mono); font-size: 13px; }

.invite-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── FLASH ── */
.flash {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  margin: 16px auto;
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-success { background: rgba(74,240,160,0.1); border: 1px solid rgba(74,240,160,0.2); color: var(--accent2); }
.flash-error   { background: rgba(240,64,96,0.1);  border: 1px solid rgba(240,64,96,0.2);  color: var(--danger); }

/* ── RECENT ── */
.recent-list { display: flex; flex-direction: column; }

.recent-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 80px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.recent-row:last-child { border-bottom: none; }
.recent-row:hover { background: rgba(255,255,255,0.02); }

.recent-date { font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }

/* ── RIVALRY ── */
.rivalry-bar { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.rivalry-name { font-weight: 600; font-size: 15px; width: 100px; }
.rivalry-name.right { text-align: right; }

.rivalry-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.rivalry-score {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 2px;
  text-align: center;
}

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 60px 20px; color: var(--subtle); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty h3 { font-family: var(--font-head); font-size: 24px; color: var(--text); margin-bottom: 8px; }

/* ── ACHIEVEMENTS ── */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.achievement.earned {
  border-color: rgba(240, 192, 64, 0.35);
  background: rgba(240, 192, 64, 0.05);
}

.achievement.tier-bronze { border-color: rgba(208, 128, 64, 0.45); background: rgba(208, 128, 64, 0.06); }
.achievement.tier-silver { border-color: rgba(160, 176, 192, 0.45); background: rgba(160, 176, 192, 0.06); }
.achievement.tier-gold   { border-color: rgba(240, 192, 64, 0.55); background: rgba(240, 192, 64, 0.10); }

.achievement-tier {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.achievement-tier.tier-bronze { color: var(--bronze); border-color: rgba(208, 128, 64, 0.4); }
.achievement-tier.tier-silver { color: var(--silver); border-color: rgba(160, 176, 192, 0.4); }
.achievement-tier.tier-gold   { color: var(--gold);   border-color: rgba(240, 192, 64, 0.4); }

/* ── RIVALS ── */
.rival-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.rival-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.rival-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.rival-card.rival-nemesis  { border-color: rgba(240, 64, 96, 0.35); background: rgba(240, 64, 96, 0.05); }
.rival-card.rival-favorite { border-color: rgba(74, 240, 160, 0.35); background: rgba(74, 240, 160, 0.05); }
.rival-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--subtle);
}
.rival-name { font-weight: 600; font-size: 15px; margin-top: 2px; }
.rival-stat { font-size: 12px; color: var(--subtle); font-family: var(--font-mono); }

.achievement-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
  filter: grayscale(1);
  opacity: 0.45;
}

.achievement.earned .achievement-icon { filter: none; opacity: 1; }

.achievement-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.2;
}

.achievement.earned .achievement-name { color: var(--accent); }

.achievement-desc {
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.3;
  margin-bottom: 10px;
}

.achievement-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: auto;
  overflow: hidden;
}

.achievement-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

.achievement-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--subtle);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--subtle);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.1s;
}
.footer-links a:hover { color: var(--accent); }

/* ── UTILITIES ── */
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-danger  { color: var(--danger); }
.text-subtle  { color: var(--subtle); font-size: 14px; }

/* Info-banner: vriendelijke uitlegstrook met zachte accent-tint */
.info-banner {
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.info-banner strong { color: var(--accent); }

/* Flash close button */
.flash { position: relative; padding-right: 44px; font-size: 15px; }
.flash-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flash-close:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.text-mono    { font-family: var(--font-mono); }
.text-head    { font-family: var(--font-head); }
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .stat-grid, .form-grid { grid-template-columns: 1fr; }
  nav { padding: 8px 16px; min-height: 56px; }
  .container { padding: 0 16px; }
  .page-header { padding: 24px 0 18px; margin-bottom: 20px; }
  .page-header h1 { font-size: 36px; }
  .hero { padding: 48px 0 36px; }

  /* Nav hamburger */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    right: 12px;
    left: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 6px;
  }
  .nav-links form { width: 100%; }
  .nav-links .btn,
  .nav-links form button { width: 100%; justify-content: center; }

  /* Leaderboard rows: 2 kolommen weg, groter tap target */
  .lb-row { grid-template-columns: 36px 1fr 60px 70px; padding: 14px 12px; }
  .lb-row > :nth-child(5),
  .lb-row > :nth-child(6) { display: none; }
  .lb-header.lb-row { padding: 8px 12px; }

  .recent-row { grid-template-columns: 60px 1fr 100px; padding: 14px 12px; }
  .recent-row > div:last-child { display: none; }

  /* Score-row stacken: naam bovenaan, beide knoppen op rij 2, score full-width */
  .score-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    row-gap: 10px;
    padding: 12px 0;
  }
  .score-row > .score-player        { grid-column: 1 / 3; grid-row: 1; }
  .score-row > .skip-toggle         { grid-column: 1 / 2; grid-row: 2; justify-self: start; margin-left: 0; }
  .score-row > .toggle-btn          { grid-column: 2 / 3; grid-row: 2; justify-self: end; }
  .score-row > input[type="number"] { grid-column: 1 / 3; grid-row: 3; }
  .score-row-header { display: none; }

  /* Invite box stacken op mobiel */
  .invite-box { flex-direction: column; align-items: stretch; }
  .invite-actions { width: 100%; }
  .invite-actions .btn { flex: 1; justify-content: center; min-width: 0; }
  .invite-link { word-break: break-all; }

  /* Game chips wat groter voor tap */
  .game-chip { padding: 6px 12px; font-size: 14px; }

  /* Toggle btn (🏆) — cirkelvariant 44x44, pill-variant houdt auto-breedte */
  .toggle-btn { width: 44px; height: 44px; }
  .toggle-btn.score-final { width: auto; height: 44px; padding: 0 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .page-header h1 { font-size: 30px; }
  .card { padding: 18px; }
  .hero-title { font-size: clamp(40px, 11vw, 60px); }
  .hero-sub { font-size: 15px; }

  /* Leaderboard nog compacter */
  .lb-row { grid-template-columns: 30px 1fr 56px 60px; gap: 6px; }
  .lb-rank { font-size: 18px; }

  .recent-row { grid-template-columns: 50px 1fr 90px; gap: 6px; }
}

/* ── FEEDBACK FORM ── */
.fb-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.fb-type { cursor: pointer; }
.fb-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fb-type-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  height: 100%;
}
.fb-type-card:hover { border-color: var(--muted); }
.fb-type input:focus-visible + .fb-type-card {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.fb-type input:checked + .fb-type-card {
  border-color: var(--accent);
  background: rgba(240, 192, 64, 0.08);
}
.fb-type-icon { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.fb-type-label { font-weight: 600; font-size: 15px; color: var(--text); }
.fb-type-desc  { font-size: 12px; color: var(--subtle); }

.fb-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
  font-size: 32px;
  line-height: 1;
}
.fb-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fb-stars label {
  cursor: pointer;
  color: var(--border);
  transition: color .12s ease, transform .12s ease;
  user-select: none;
}
.fb-stars label:hover,
.fb-stars label:hover ~ label,
.fb-stars input:checked ~ label {
  color: var(--accent);
}
.fb-stars label:hover { transform: scale(1.1); }
.fb-stars input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .fb-types { grid-template-columns: 1fr; }
  .fb-stars { font-size: 38px; }
}

/* ── VRIENDEN ── */
.fr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fr-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fr-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.friend-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.friend-pick { cursor: pointer; }
.friend-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.friend-pick-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.friend-pick-card:hover { border-color: var(--muted); }
.friend-pick input:checked + .friend-pick-card {
  border-color: var(--accent);
  background: rgba(240, 192, 64, 0.08);
}

/* VS-balk (head-to-head) */
.vs-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--border);
}
.vs-bar-u1   { background: var(--accent); }
.vs-bar-u2   { background: var(--accent2); }
.vs-bar-draw { background: var(--muted); }

/* ── FAVORIET-KNOP (hart/ster) ── */
.fav-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .15s, transform .15s, background .15s;
}
.fav-btn:hover { color: var(--accent); background: rgba(240, 192, 64, 0.08); }
.fav-btn.is-fav { color: var(--accent); }
.fav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── PWA standalone: zwevende terug/vooruit-knoppen ── */
#pwa-nav { display: none; }
body.is-standalone #pwa-nav {
  display: flex;
  gap: 10px;
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
}
#pwa-nav button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev, var(--card-bg, #2a2f3b));
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
#pwa-nav button:active { transform: scale(0.94); }
#pwa-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── PWA pull-to-refresh indicator ── */
#pwa-ptr {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -40px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elev, var(--card-bg, #2a2f3b));
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 95;
  transition: transform 0.15s ease-out;
  pointer-events: none;
}
body.is-standalone #pwa-ptr { display: flex; }
#pwa-ptr .pwa-ptr-spinner {
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  transition: transform 0.1s ease-out;
}
#pwa-ptr.ready .pwa-ptr-spinner { color: var(--accent); }
#pwa-ptr.refreshing .pwa-ptr-spinner {
  animation: pwa-ptr-spin 0.8s linear infinite;
}
@keyframes pwa-ptr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Speluitslag feature-kleuren (consistent met landing-page) ── */
.sui-grad-live      { background:linear-gradient(135deg, #1a237e 0%, #3949ab 100%); color:#fff; }
.sui-grad-suggest   { background:linear-gradient(135deg, #00695c 0%, #00897b 100%); color:#fff; }
.sui-grad-wrapped   { background:linear-gradient(135deg, #6a1b9a 0%, #c2185b 60%, #ff6e40 100%); color:#fff; }
.sui-grad-streaks   { background:linear-gradient(135deg, #b71c1c 0%, #ef6c00 100%); color:#fff; }
.sui-grad-scorekaart{ background:linear-gradient(135deg, #004d40 0%, #006064 100%); color:#fff; }
.sui-grad-loan      { background:linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%); color:#fff; }
.sui-grad-campaign  { background:linear-gradient(135deg, #1b5e20 0%, #43a047 100%); color:#fff; }
.sui-grad-heat      { background:linear-gradient(135deg, #0d47a1 0%, #00838f 100%); color:#fff; }
.sui-grad-friends   { background:linear-gradient(135deg, #ad1457 0%, #c2185b 100%); color:#fff; }

/* Banner — klikbare strook bovenaan een sectie of pagina */
.sui-banner {
  display:flex; align-items:center; gap:14px;
  padding:14px 18px; border-radius:12px;
  text-decoration:none; color:#fff;
  transition:transform .12s, box-shadow .12s, filter .12s;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}
.sui-banner:hover { transform:translateY(-2px); filter:brightness(1.08); box-shadow:0 8px 20px rgba(0,0,0,0.18); }
.sui-banner-icon { font-size:28px; line-height:1; flex-shrink:0; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.sui-banner-text { flex:1; display:flex; flex-direction:column; gap:2px; min-width:0; }
.sui-banner-text strong { font-size:15px; font-weight:700; }
.sui-banner-text span { font-size:12px; opacity:0.92; }
.sui-banner-arrow { font-size:24px; font-weight:700; opacity:0.85; }

/* Page-hero — gekleurde header voor feature-pagina's */
.sui-hero {
  border-radius:16px; padding:28px 24px; margin-bottom:24px;
  position:relative; overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,0.12);
}
.sui-hero::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 50%);
  pointer-events:none;
}
.sui-hero-eyebrow {
  font-family:var(--font-mono); font-size:11px; letter-spacing:2px;
  opacity:0.85; margin-bottom:6px; text-transform:uppercase;
  position:relative;
}
.sui-hero h1 {
  font-family:var(--font-head); font-size:28px;
  margin:0; letter-spacing:0.5px; line-height:1.15;
  position:relative;
}
.sui-hero p {
  font-size:14px; margin:8px 0 0; opacity:0.92;
  max-width:640px; line-height:1.5; position:relative;
}
