/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg: #0d0f14;
  --surface: #151820;
  --surface2: #1e2230;
  --border: #252a38;
  --border2: #2e3548;
  --text: #eef0f6;
  --text-2: #8990a8;
  --text-3: #545e7a;
  --accent: #37e2a0;
  --accent-dim: rgba(55, 226, 160, 0.12);
  --accent-border: rgba(55, 226, 160, 0.3);
  --red: #ff5a5a;
  --red-dim: rgba(255, 90, 90, 0.12);
  --yellow: #f5c842;
  --yellow-dim: rgba(245, 200, 66, 0.12);
  --blue: #5a9eff;
  --blue-dim: rgba(90, 158, 255, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 62px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-tabs {
  display: flex; gap: 4px; list-style: none; flex: 1;
}
.nav-tab {
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  transition: color 0.18s, background 0.18s;
}
.nav-tab:hover { color: var(--text); background: var(--surface2); }
.nav-tab.active { color: var(--accent); background: var(--accent-dim); }
.nav-budget-pill {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 14px;
}
.budget-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.budget-amount { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--accent); }

/* ─── Main ─────────────────────────────────────────────── */
.main-content { max-width: 1320px; margin: 0 auto; padding: 40px 24px 80px; }
.view { display: none; animation: fadeUp 0.3s ease; }
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 64px 0 80px; min-height: 480px;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 72px); font-weight: 800;
  line-height: 1.05; color: var(--text); margin-bottom: 20px;
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub { color: var(--text-2); font-size: 17px; line-height: 1.6; max-width: 440px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; }
.hero-pitch { display: flex; justify-content: center; align-items: center; }
.pitch-graphic {
  width: 280px; height: 380px;
  background: linear-gradient(160deg, #1a3e2a 0%, #122a1c 100%);
  border-radius: 16px; border: 1px solid rgba(55, 226, 160, 0.2);
  box-shadow: 0 0 60px rgba(55, 226, 160, 0.08);
  position: relative; overflow: hidden;
}
.pitch-graphic::before {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 80px; height: 80px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
}
.pitch-graphic::after {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 1px; background: rgba(255,255,255,0.08);
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; transition: all 0.18s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #0d0f14; }
.btn-primary:hover { background: #4ef5b2; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(55,226,160,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,90,90,0.2); }
.btn-danger:hover { background: rgba(255,90,90,0.2); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Section headers ─────────────────────────────────── */
.section-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.section-sub { color: var(--text-3); font-size: 13px; }

/* ─── Top picks grid ──────────────────────────────────── */
.top-picks-grid { margin-bottom: 56px; }
.player-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.player-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.player-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px); box-shadow: var(--shadow);
  background: var(--surface2);
}
.player-card-pos {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 12px;
}
.pos-GK { background: #3b2a14; color: #f5a623; }
.pos-DEF { background: #1a2c3e; color: var(--blue); }
.pos-MID { background: #1a3e2a; color: var(--accent); }
.pos-FWD { background: #3e1a1a; color: var(--red); }

.player-card-name {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  line-height: 1.2; margin-bottom: 4px;
}
.player-card-team { font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.player-card-stats { display: flex; justify-content: space-between; align-items: flex-end; }
.player-card-pts { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--accent); }
.player-card-pts-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }
.player-card-price { font-size: 13px; font-weight: 600; color: var(--text-2); }
.player-card-add {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-border); cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: monospace; line-height: 1;
}
.player-card-add:hover { background: var(--accent); color: #0d0f14; }
.player-card-add.added { background: var(--red-dim); color: var(--red); border-color: rgba(255,90,90,0.3); }

/* ─── Stats row ────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 6px;
}
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── View headers ─────────────────────────────────────── */
.view-header { margin-bottom: 32px; }
.view-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.view-sub { color: var(--text-2); font-size: 15px; }

/* ─── Filter bar ───────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
  padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 20px;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-input {
  width: 100%; padding: 9px 12px 9px 36px;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 14px;
  outline: none; transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.pos-filter-btns { display: flex; gap: 4px; }
.pos-btn {
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text-2);
  border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.pos-btn:hover { border-color: var(--accent-border); color: var(--accent); }
.pos-btn.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
.price-range {
  display: flex; align-items: center; gap: 8px;
}
.price-range input {
  width: 70px; padding: 7px 10px;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 13px; outline: none;
}
.price-range input:focus { border-color: var(--accent); }
.price-range span { color: var(--text-3); }
.sort-select {
  padding: 7px 28px 7px 10px; background: var(--surface2);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 13px; outline: none;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23545e7a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ─── Player table ─────────────────────────────────────── */
.player-count-bar { padding: 10px 0; font-size: 13px; color: var(--text-3); }
.player-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.player-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.player-table thead {
  background: var(--surface); border-bottom: 1px solid var(--border2);
}
.player-table th {
  padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
}
.player-table th.sortable { cursor: pointer; user-select: none; }
.player-table th.sortable:hover { color: var(--accent); }
.player-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.player-table tbody tr { transition: background 0.12s; cursor: pointer; }
.player-table tbody tr:hover { background: var(--surface2); }
.player-table tbody tr:last-child td { border-bottom: none; }
.table-loading { text-align: center; color: var(--text-3); padding: 48px; font-size: 14px; }

.player-name-cell { display: flex; flex-direction: column; }
.player-name { font-weight: 600; color: var(--text); }
.player-web-name { font-size: 12px; color: var(--text-3); }

.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
}
.status-a .status-dot { background: var(--accent); }
.status-i .status-dot { background: var(--red); }
.status-d .status-dot { background: var(--yellow); }
.status-s .status-dot { background: var(--red); }
.status-u .status-dot { background: var(--text-3); }

.form-sparkline { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.spark-bar {
  width: 10px; border-radius: 2px 2px 0 0;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  transition: background 0.15s;
  min-height: 2px;
}
.spark-bar.high { background: var(--accent); border-color: var(--accent); }
.spark-bar.med { background: rgba(55,226,160,0.4); border-color: rgba(55,226,160,0.4); }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}

/* ─── Squad Builder ────────────────────────────────────── */
.squad-budget-bar {
  display: flex; align-items: center; gap: 16px; margin-top: 16px;
}
.budget-display { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.budget-display strong { color: var(--text); }
.budget-track {
  flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden;
}
.budget-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #5af0c0);
  transition: width 0.4s ease, background 0.3s;
}
.budget-fill.over { background: var(--red); }
.budget-remaining { font-size: 13px; color: var(--text-3); white-space: nowrap; }

.pitch-container {
  background: linear-gradient(180deg, #0e2a1a 0%, #0a1f13 100%);
  border-radius: 16px; border: 1px solid rgba(55, 226, 160, 0.15);
  padding: 32px 24px; margin: 24px 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.3);
  position: relative;
}
.pitch-container::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,0.05);
}
.pitch-container::after {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 90px; height: 90px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}

.pitch-field { display: flex; flex-direction: column; gap: 20px; }
.pitch-row { display: flex; align-items: center; gap: 16px; }
.pitch-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: rgba(255,255,255,0.25);
  text-transform: uppercase; width: 36px; text-align: center; flex-shrink: 0;
}
.pitch-slots { display: flex; gap: 10px; flex: 1; justify-content: center; flex-wrap: wrap; }

.pitch-slot {
  width: 90px; min-height: 80px;
  background: rgba(255,255,255,0.03); border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; padding: 8px;
  position: relative;
}
.pitch-slot.empty:hover {
  border-color: rgba(55,226,160,0.3); background: rgba(55,226,160,0.04);
}
.pitch-slot.filled {
  border-style: solid; border-color: var(--border2); background: var(--surface);
  cursor: default;
}
.pitch-slot.filled:hover { border-color: var(--accent-border); }
.slot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; font-family: var(--font-display);
  color: var(--accent); margin-bottom: 4px;
}
.slot-name { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-price { font-size: 10px; color: var(--text-3); }
.slot-remove {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--red-dim);
  color: var(--red); border: none; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s;
}
.pitch-slot.filled:hover .slot-remove { opacity: 1; }
.slot-empty-icon { font-size: 18px; opacity: 0.2; margin-bottom: 4px; }
.slot-empty-text { font-size: 10px; color: var(--text-3); }

.squad-actions { display: flex; gap: 12px; justify-content: flex-end; margin-bottom: 16px; }

.validation-banner {
  padding: 16px 20px; border-radius: var(--radius-sm); margin-top: 16px; font-size: 14px;
}
.validation-banner.valid { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.validation-banner.invalid { background: var(--red-dim); border: 1px solid rgba(255,90,90,0.2); color: var(--red); }

/* ─── Optimizer ────────────────────────────────────────── */
.optimizer-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 8px; }
.form-hint { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 9px 12px;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 14px; outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-label { font-size: 14px; color: var(--text-2); }

.optimizer-results { min-height: 300px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 300px; color: var(--text-3); gap: 12px;
  background: var(--surface); border: 1px dashed var(--border2); border-radius: var(--radius);
}
.empty-icon { font-size: 36px; }
.empty-state p { font-size: 15px; }

.opt-result-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.opt-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.opt-result-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.opt-badges { display: flex; gap: 8px; }
.opt-badge {
  background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}

.opt-squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.opt-player-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px;
}
.opt-player-chip .chip-pos {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; flex-shrink: 0;
  padding: 2px 6px; border-radius: 3px;
}
.opt-player-info { flex: 1; min-width: 0; }
.opt-player-name { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-player-price { font-size: 11px; color: var(--text-3); }
.opt-player-pts { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 14px; flex-shrink: 0; }

/* ─── Fixtures ─────────────────────────────────────────── */
.fixtures-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.fixture-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
.fixture-gw { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; margin-bottom: 12px; }
.fixture-teams { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fixture-team { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.fixture-vs { font-size: 11px; color: var(--text-3); }
.fixture-diff-row { display: flex; justify-content: space-between; gap: 8px; }
.diff-indicator {
  flex: 1; text-align: center; padding: 5px; border-radius: 6px; font-size: 11px; font-weight: 700;
}
.diff-1 { background: rgba(55,226,160,0.15); color: var(--accent); }
.diff-2 { background: rgba(55,226,160,0.08); color: #7de8bf; }
.diff-3 { background: rgba(245,200,66,0.12); color: var(--yellow); }
.diff-4 { background: rgba(255,90,90,0.12); color: var(--red); }
.diff-5 { background: rgba(255,90,90,0.2); color: #ff3333; }

/* ─── Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 32px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px); transition: transform 0.25s;
  position: relative;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--red-dim); color: var(--red); border-color: rgba(255,90,90,0.3); }
.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.modal-player-badge {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--accent);
  flex-shrink: 0;
}
.modal-player-name { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.modal-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.modal-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
}
.modal-stat { background: var(--surface2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.modal-stat-val { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text); }
.modal-stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.modal-section-title { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.modal-form { margin-bottom: 20px; }
.sparkline-container { display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.modal-spark-bar {
  flex: 1; border-radius: 4px 4px 0 0; background: var(--accent-dim);
  border: 1px solid var(--accent-border); transition: background 0.15s; min-height: 4px;
  position: relative;
}
.modal-spark-bar .spark-val {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap;
}
.modal-spark-bar.high { background: var(--accent); border-color: var(--accent); }
.modal-injury {
  background: var(--yellow-dim); border: 1px solid rgba(245,200,66,0.2);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
  font-size: 13px; color: var(--yellow);
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* ─── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 14px; color: var(--text);
  box-shadow: var(--shadow); transform: translateY(16px);
  opacity: 0; transition: all 0.25s; pointer-events: none;
  max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--accent-border); color: var(--accent); }
.toast.error { border-color: rgba(255,90,90,0.3); color: var(--red); }

/* ─── Skeleton ─────────────────────────────────────────── */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.skeleton-card {
  height: 130px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Spinner ──────────────────────────────────────────── */
.spinner { animation: spin 0.8s linear infinite; }
.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Pitch SVG ────────────────────────────────────────── */
.pitch-svg {
  width: 260px; height: 370px;
  filter: drop-shadow(0 0 40px rgba(55, 226, 160, 0.12));
  border-radius: 12px;
}

/* ─── Hero Image ───────────────────────────────────────── */
.hero-image {
  width: 260px; height: 370px;
  object-fit: cover;
  filter: drop-shadow(0 0 40px rgba(55, 226, 160, 0.12));
  border-radius: 12px;
}

/* ─── Mobile Nav ───────────────────────────────────────── */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: all 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 90;
  width: 260px; background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform 0.25s ease;
  padding: 16px;
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-tab {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-family: var(--font-body); font-size: 15px; font-weight: 500;
  padding: 12px 16px; border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.mobile-nav-tab:hover, .mobile-nav-tab.active {
  background: var(--accent-dim); color: var(--accent);
}
.mobile-nav-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: all; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 56px; }
  .hero-pitch { display: flex; justify-content: center; }
  .pitch-svg { width: 200px; height: 280px; }
  .hero-image { width: 200px; height: 280px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .optimizer-layout { grid-template-columns: 1fr; }
  .nav-tabs { display: none; }
  .nav-hamburger { display: flex; }
  .modal-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-inner { gap: 16px; }
}
@media (max-width: 600px) {
  .main-content { padding: 24px 16px 80px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .filter-bar { padding: 16px; gap: 12px; }
  .hero-title { font-size: 36px; }
  .hero-pitch { display: none; }
  .pitch-container { padding: 20px 12px; }
  .pitch-slot { width: 72px; }
  .opt-squad-grid { grid-template-columns: 1fr; }
}
