@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700&display=swap');

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

:root {
  --green:       #16a34a;
  --green-l:     #22c55e;
  --green-d:     #14532d;
  --pitch:       #0f3d20;
  --pitch-line:  rgba(255,255,255,0.06);
  --navy:        #080f1a;
  --surface:     #0e1a2b;
  --card:        #111e30;
  --card2:       #172538;
  --border:      #1e3047;
  --border-l:    #253d58;
  --text:        #e2ecf6;
  --muted:       #6b87a8;
  --gold:        #f59e0b;
  --red:         #ef4444;
  --blue:        #3b82f6;
  --r:           10px;
  --r-lg:        16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--border-l); border-radius: 3px; }

/* ── Navbar ── */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,15,26,0.9);
  backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex; align-items: center;
  padding: 0 24px; gap: 0;
}
.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px; font-weight: 800; letter-spacing: 0.03em;
  color: var(--green-l);
  cursor: pointer;
  margin-right: 32px;
  user-select: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo-img { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
.nav-logo span { color: var(--text); }
#nav-links { display: flex; gap: 2px; flex: 1; }
.nav-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer; border: none; background: none;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--card); color: var(--text); }
.nav-btn.active { background: rgba(22,163,74,.14); color: var(--green-l); }
.nav-btn .icon { font-size: 15px; }

#nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.notif-btn {
  position: relative; width: 34px; height: 34px; border-radius: 8px;
  background: var(--card2); border: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: white; font-size: 10px; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--navy);
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 22px;
  background: var(--card2); border: 1px solid var(--border); cursor: pointer;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white; flex-shrink: 0;
}
.user-chip .name { font-size: 13px; font-weight: 600; }
.btn-logout {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: none; border: 1px solid var(--border-l); color: var(--muted); cursor: pointer;
}
.btn-logout:hover { color: var(--red); border-color: var(--red); }

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 28px 20px; }

.page-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px; font-weight: 800; letter-spacing: 0.02em; flex: 1;
}
.page-sub { font-size: 14px; color: var(--muted); margin-top: -20px; margin-bottom: 22px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s; border: none; white-space: nowrap;
  font-family: inherit;
}
.btn-primary  { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-d); filter: brightness(1.15); }
.btn-secondary { background: var(--card2); color: var(--text); border: 1px solid var(--border-l); }
.btn-secondary:hover { border-color: var(--green); color: var(--green-l); }
.btn-danger   { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.22); }
.btn-ghost    { background: transparent; color: var(--muted); padding: 6px 12px; font-size: 13px; border: none; }
.btn-sm       { padding: 5px 14px; font-size: 13px; }
.btn-lg       { padding: 12px 28px; font-size: 15px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-sm { padding: 14px 16px; }

/* ── Grid ── */
.g2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── Form elements ── */
.input {
  width: 100%; padding: 10px 14px;
  background: var(--card2); border: 1px solid var(--border-l);
  border-radius: var(--r); color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--green); }
.input::placeholder { color: var(--muted); }
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 80px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-green  { background: rgba(22,163,74,.2); color: #4ade80; }
.badge-gold   { background: rgba(245,158,11,.2); color: #fbbf24; }
.badge-red    { background: rgba(239,68,68,.2);  color: #f87171; }
.badge-blue   { background: rgba(59,130,246,.2); color: #60a5fa; }
.badge-purple { background: rgba(139,92,246,.2); color: #a78bfa; }
.badge-muted  { background: rgba(107,135,168,.15); color: var(--muted); }

/* ── Dashboard Hero ── */
.hero {
  background: linear-gradient(135deg, var(--pitch) 0%, #0a2e16 60%, #0d3b1e 100%);
  border: 1px solid rgba(22,163,74,.18);
  border-radius: 20px; padding: 36px 32px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; border-radius: 20px;
  background:
    repeating-linear-gradient(90deg, var(--pitch-line) 0, var(--pitch-line) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(180deg, var(--pitch-line) 0, var(--pitch-line) 1px, transparent 1px, transparent 60px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--green-l); text-transform: uppercase; margin-bottom: 6px; }
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 44px; font-weight: 800; line-height: 1; margin-bottom: 6px;
}
.hero-sub { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 28px; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hstat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px; font-weight: 800; color: var(--green-l); line-height: 1;
}
.hstat-lbl { font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }

/* ── Competition cards ── */
.comp-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.comp-card:hover { border-color: var(--green); transform: translateY(-2px); }
.comp-icon { font-size: 32px; margin-bottom: 10px; }
.comp-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.comp-meta { font-size: 13px; color: var(--muted); }

/* ── Section title ── */
.sec-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase;
  margin-bottom: 12px; margin-top: 28px;
}

/* ── Pitch ── */
.pitch-outer {
  background: linear-gradient(180deg, #0d4020 0%, #126130 30%, #126130 70%, #0d4020 100%);
  border: 2px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 20px 12px 16px; position: relative;
  min-height: 480px;
}
.pitch-outer::after {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 1px;
  background: rgba(255,255,255,.06);
  transform: translateX(-50%);
  pointer-events: none;
}
.pitch-center-circle {
  position: absolute; left: 50%; top: 50%;
  width: 80px; height: 80px; margin-left: -40px; margin-top: -40px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 50%;
  pointer-events: none;
}
.pitch-row-label {
  text-align: center; font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 6px;
}
.pitch-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 4px; }

.pslot { width: 76px; text-align: center; cursor: pointer; }
.pslot:hover .pcard { transform: translateY(-3px); border-color: rgba(22,163,74,.5); }
.pcard {
  background: rgba(6,14,28,.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 8px 6px; transition: transform .15s, border-color .15s;
  position: relative; min-height: 70px;
}
.pcard.captain::after, .pcard.vice::after {
  position: absolute; top: -7px; right: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--navy);
}
.pcard.captain::after { content: 'C'; background: var(--gold); color: #000; }
.pcard.vice::after    { content: 'V'; background: #6b7280; color: #fff; }
.pcard-shirt { margin: 0 auto 4px; display: block; }
.pcard-name { font-size: 10.5px; font-weight: 700; color: white; line-height: 1.2; }
.pcard-pts  { font-size: 10px; color: #4ade80; font-weight: 700; margin-top: 1px; }
.pcard-price { font-size: 9.5px; color: var(--muted); }
.empty-slot {
  background: rgba(255,255,255,.04); border: 2px dashed rgba(255,255,255,.15);
  border-radius: 10px; padding: 14px 6px; min-height: 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all .15s; cursor: pointer;
}
.empty-slot:hover { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.4); }
.empty-slot-plus { font-size: 20px; color: rgba(255,255,255,.25); }
.empty-slot-pos  { font-size: 9px; color: rgba(255,255,255,.2); font-weight: 600; text-transform: uppercase; }

/* bench area */
.bench-area {
  border-top: 1px dashed rgba(255,255,255,.1);
  padding-top: 10px; margin-top: 8px;
}

/* ── Builder layout ── */
.builder-wrap { display: flex; gap: 16px; align-items: flex-start; }
.builder-sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.builder-pitch { flex: 1; }

.budget-bar-bg { background: var(--navy); border-radius: 20px; height: 6px; overflow: hidden; margin-top: 4px; }
.budget-bar    { height: 6px; border-radius: 20px; background: var(--green); transition: width .3s; }

.squad-list { max-height: 260px; overflow-y: auto; margin-top: 8px; }
.squad-item {
  display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 7px;
  cursor: pointer; font-size: 12px; font-weight: 500;
  transition: background .1s;
}
.squad-item:hover { background: var(--navy); }
.pos-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Players list ── */
.filter-bar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: none; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.filter-chip:hover   { border-color: var(--border-l); color: var(--text); }
.filter-chip.active  { background: rgba(22,163,74,.15); border-color: var(--green); color: var(--green-l); }

.player-list { }
.player-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid rgba(30,48,71,.7);
  transition: background .1s;
}
.player-row:last-child { border-bottom: none; }
.player-row:hover { background: var(--card2); }
.pos-tag {
  width: 26px; height: 26px; border-radius: 6px; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pos-K { background: rgba(245,158,11,.2);  color: #fbbf24; }
.pos-V { background: rgba(59,130,246,.2);  color: #60a5fa; }
.pos-M { background: rgba(139,92,246,.2);  color: #a78bfa; }
.pos-A { background: rgba(239,68,68,.2);   color: #f87171; }
.player-info { flex: 1; min-width: 0; }
.player-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-club { font-size: 12px; color: var(--muted); }
.player-stat { text-align: right; font-size: 13px; font-weight: 700; }
.player-price-tag { text-align: right; font-size: 13px; font-weight: 700; color: var(--green-l); }

/* ── Standings ── */
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.rank-table td { padding: 12px 14px; font-size: 14px; border-bottom: 1px solid rgba(30,48,71,.6); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr:hover td { background: rgba(255,255,255,.02); }
.rank-num { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--muted); }
.rank-1 { color: var(--gold); }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #cd7c3a; }
.rank-pts { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; }

/* ── Poule cards ── */
.poule-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px; transition: border-color .2s, transform .2s; cursor: pointer;
}
.poule-card:hover { border-color: var(--green-l); transform: translateY(-2px); }
.poule-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.poule-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.poule-code {
  font-family: monospace; font-size: 14px; font-weight: 700;
  background: var(--navy); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 6px; letter-spacing: .1em;
  cursor: pointer; user-select: all;
}
.poule-code:hover { border-color: var(--green); }

/* poule detail */
.detail-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; }
.detail-title { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 800; flex: 1; }
.invite-bar {
  background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.2);
  border-radius: var(--r); padding: 14px 18px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.invite-code-big {
  font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 800;
  letter-spacing: .15em; color: var(--green-l); cursor: pointer; user-select: all;
}
.invite-code-big:hover { opacity: .8; }

/* invite form */
.invite-emails { display: flex; flex-direction: column; gap: 8px; }
.invite-email-row { display: flex; gap: 8px; }
.invite-result-row { padding: 6px 10px; border-radius: 6px; font-size: 13px; display: flex; gap: 8px; }
.ir-ok     { background: rgba(22,163,74,.1); color: #4ade80; }
.ir-warn   { background: rgba(245,158,11,.1); color: #fbbf24; }
.ir-error  { background: rgba(239,68,68,.1);  color: #f87171; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(5px);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border-l); border-radius: 18px;
  padding: 28px; width: 100%; max-width: 500px; max-height: 88vh; overflow-y: auto;
  animation: popIn .18s ease;
}
.modal-lg { max-width: 680px; }
@keyframes popIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 800; margin-bottom: 18px; }
.modal-close { float: right; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }

/* ── Auth ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(22,163,74,.09) 0%, transparent 70%),
    var(--navy);
  padding: 20px;
}
.auth-box {
  width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--border-l); border-radius: 20px;
  padding: 40px 36px;
}
.auth-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 38px; font-weight: 900; text-align: center; margin-bottom: 4px;
  color: var(--green-l);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.auth-logo-img { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; }
.auth-tagline { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }
.auth-error { color: #f87171; font-size: 13px; padding: 8px 12px; background: rgba(239,68,68,.1); border-radius: 7px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card2); border: 1px solid var(--border-l);
  padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); max-width: 320px;
  animation: slideUp .25s ease;
}
.toast.success { border-color: var(--green); color: #4ade80; }
.toast.error   { border-color: var(--red);   color: #f87171; }
.toast.info    { border-color: var(--blue);  color: #60a5fa; }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Notifications panel ── */
.notif-panel {
  position: fixed; top: 62px; right: 16px; z-index: 150;
  width: 340px; background: var(--card); border: 1px solid var(--border-l);
  border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.5);
  display: none;
}
.notif-panel.open { display: block; }
.notif-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-head-title { font-weight: 700; font-size: 14px; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid rgba(30,48,71,.6); cursor: pointer; transition: background .1s; }
.notif-item:hover { background: var(--card2); }
.notif-item.unread { border-left: 3px solid var(--green); }
.notif-item-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.notif-item-msg   { font-size: 12px; color: var(--muted); line-height: 1.4; }
.notif-item-time  { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; background: var(--navy); border-radius: 10px; padding: 4px; margin-bottom: 20px; width: fit-content; }
.tab-btn {
  padding: 7px 18px; border-radius: 7px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; border: none; background: none; transition: all .15s;
}
.tab-btn.active { background: var(--card); color: var(--text); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-state .icon { font-size: 52px; margin-bottom: 14px; display: block; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; }

/* ── Divider ── */
.sep { height: 1px; background: var(--border); margin: 18px 0; }

/* ── Stats row ── */
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; min-width: 110px; }
.stat-block-val { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 800; color: var(--green-l); }
.stat-block-lbl { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ── Search ── */
.search-wrap { position: relative; }
.search-wrap .input { padding-left: 38px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ── Responsive ── */
/* ── Hamburger menu ───────────────────────────────────────────── */
#hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 8px;
}
#hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .2s;
}
#mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 299;
}
#mobile-menu-overlay.open { display: block; }
#mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 270px;
  height: 100dvh;
  background: var(--card);
  border-left: 1px solid var(--border);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right .25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
#mobile-menu.open { right: 0; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 2px;
  flex: 1;
}
.mob-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
  width: 100%;
}
.mob-nav-btn:hover, .mob-nav-btn.active { background: var(--navy); color: var(--green-l); }
.mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .g3 { grid-template-columns: repeat(2,1fr); }
  .g4 { grid-template-columns: repeat(2,1fr); }
  .builder-wrap { flex-direction: column; }
  .builder-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 992px) {
  #hamburger-btn { display: flex; }
  #nav-links { display: none; }
  .btn-logout { display: none; }
  .user-chip .name { display: none; }
  .g2,.g3,.g4 { grid-template-columns: 1fr; }

  /* Containers smaller padding */
  .container { padding: 12px 10px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-title { font-size: 20px; }

  /* Cards */
  .card { padding: 12px; }
  .card-sm { padding: 8px 10px; }

  /* Modals als bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-width: 100% !important; width: 100%; max-height: 92dvh; margin: 0; padding: 20px 16px 32px; }

  /* Tables horizontaal scrollbaar */
  .table-wrap, table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Poule leaderboard */
  .leaderboard-rank { display: none; }

  /* Submit bar */
  #pred-submit-bar > div { flex-wrap: wrap; gap: 6px; }
  #pred-submit-bar button { font-size: 12px; padding: 6px 10px; }

  /* Topscorer picks */
  .ts-picks-grid { grid-template-columns: 1fr 1fr !important; }

  /* Footer */
  .app-footer { padding: 12px; font-size: 11px; margin-bottom: 0; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 24px 18px; }
  .hero-title { font-size: 32px; }
  #navbar { padding: 0 12px; }
  .nav-btn .nav-label { display: none; }
  .container { padding: 18px 12px; }

  /* Modal volledig scherm op mobiel */
  .modal-overlay { align-items: flex-end; }
  .modal {
    max-width: 100% !important;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px;
    margin: 0;
  }
  .modal-lg { max-width: 100% !important; }

  /* Kaarten en tabellen */
  .card { padding: 14px; }
  .card-sm { padding: 10px 12px; }
  .sec-title { font-size: 14px; }

  /* Tabel horizontaal scrollbaar */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }

  /* Stat blokken */
  .stat-block { padding: 10px 12px; min-width: 80px; }
  .stat-block-val { font-size: 22px; }

  /* Auth pagina */
  .auth-page { padding: 16px; }
  .auth-box { padding: 20px 16px; }

  /* Navbar labels op smal scherm */
  .nav-btn { padding: 0 8px; min-width: 44px; }

  /* Hero landing */
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* Poule leaderboard tabel */
  .leaderboard-rank { display: none; }

  /* Match cards */
  .match-teams { gap: 4px; }
  .team-name { font-size: 13px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .score-input { width: 38px; height: 38px; font-size: 16px; }
  .actual-score { font-size: 22px; }

  /* Topscorer picks grid */
  #ts-prediction-card .g4 { grid-template-columns: 1fr 1fr; }

  /* Poule ranglijst tabel */
  .rank-table th:nth-child(3),
  .rank-table td:nth-child(3) { display: none; }

  /* Admin match modal */
  .modal { padding: 16px 12px; }
  .modal-title { font-size: 18px; }

  /* Gw-tabs scrollen horizontaal */
  .gw-selector { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .gw-btn { flex-shrink: 0; }

  /* Invite bar */
  .invite-bar { flex-direction: column; gap: 10px; }
  .invite-code-big { font-size: 22px; letter-spacing: 4px; }
}

/* ── Advertenties (AdSense) ── */
.ad-slot-wrap {
  margin: 20px 0; padding: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  text-align: center; overflow: hidden;
}
.ad-slot-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 6px 0 4px; opacity: .6;
}
.ad-slot-wrap ins.adsbygoogle { min-height: 90px; }

/* ── Affiliate links ── */
.affiliate-block {
  margin: 16px 0; padding: 14px;
  background: var(--card2); border: 1px solid var(--border-l); border-radius: var(--r);
}
.affiliate-block-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.affiliate-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 8px; background: var(--navy);
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600;
  margin-bottom: 6px; transition: border-color .15s;
  border: 1px solid transparent;
}
.affiliate-link:last-child { margin-bottom: 0; }
.affiliate-link:hover { border-color: var(--green); color: var(--green-l); }
.affiliate-link-sponsor { font-size: 11px; color: var(--muted); font-weight: 500; flex-shrink: 0; }
