@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

/* ── RESET & TOKENS ─────────────────────────────────────── */
:root {
  --bg:       #07070f;
  --surface:  #0e0e1c;
  --card:     #111122;
  --border:   #1a1a2e;
  --gold:     #c9973a;
  --gold2:    #e8b84b;
  --accent:   #1557ff;
  --red:      #d63031;
  --green:    #00b894;
  --amber:    #e09c00;
  --text:     #eaeaf5;
  --muted:    #5a5a82;
  --radius:   12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Ambient glow (Stadium Lights / Mesh) */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(201,151,58,0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(21,87,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0,184,148,0.08) 0%, transparent 55%);
  filter: blur(60px);
  transform: translateZ(0); /* fast render */
}

/* Noise Texture (Tangible Depth) */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.035; mix-blend-mode: overlay;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.site-wrap { position: relative; z-index: 1; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── NAV ────────────────────────────────────────────────── */
.site-nav {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,15,.85);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 20px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 0.06em;
  flex-shrink: 0;
}

.nav-brand .brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); display: inline-block;
  box-shadow: 0 0 8px var(--gold);
}

.nav-links {
  display: flex; gap: 2px; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}

.nav-links a {
  display: block; padding: 6px 14px;
  text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 500;
  border-radius: 20px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.nav-links a.active { color: var(--gold2); }

/* ── HERO ───────────────────────────────────────────────── */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

.hero-eyebrow::before {
  content: ''; width: 24px; height: 2px;
  background: var(--gold); border-radius: 2px;
}

.page-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(52px, 9vw, 96px);
  line-height: .95; letter-spacing: -0.01em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, #a0a0c0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px; color: var(--muted);
  max-width: 520px; line-height: 1.7;
}

.hero-meta {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px; flex-wrap: wrap;
}

.badge {
  background: rgba(201,151,58,.1);
  border: 1px solid rgba(201,151,58,.25);
  color: var(--gold);
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .05em;
}

.updated-tag {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ── SECTIONS ───────────────────────────────────────────── */
.section { padding: 52px 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }

.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 16px;
  margin-bottom: 28px; flex-wrap: wrap;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  font-size: 38px; letter-spacing: 0;
  display: flex; align-items: center; gap: 12px;
}

.section-title .icon { font-size: 22px; }

.section-link {
  font-size: 13px; color: var(--gold);
  text-decoration: none; font-weight: 500;
  opacity: .8; transition: opacity .2s;
}
.section-link:hover { opacity: 1; }

/* ── EDITORIAL BLOCK ────────────────────────────────────── */
.editorial {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.8;
  color: #cccce8;
  font-style: italic;
  position: relative;
}

.editorial::before {
  content: '"';
  position: absolute; top: 12px; left: 14px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 52px; color: var(--gold);
  opacity: .3; line-height: 1;
}

.editorial-skeleton {
  height: 72px;
  background: linear-gradient(90deg, var(--border) 25%, var(--card) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ── STANDINGS TABLE ────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.standings-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}

.standings-table thead tr {
  border-bottom: 1px solid var(--border);
}

.standings-table th {
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 10px;
  text-align: center; white-space: nowrap;
}

.standings-table th:nth-child(2) { text-align: left; }

.standings-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s;
}

.standings-table tbody tr:hover { background: rgba(255,255,255,.025); }

.standings-table td {
  padding: 11px 10px; text-align: center;
}

.standings-table td:nth-child(2) { text-align: left; }

.rank-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; color: var(--muted);
}

.rank-num.top { color: var(--gold); }

.zone-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; margin-right: 8px; flex-shrink: 0;
}
.z-cl   { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.z-uel  { background: var(--amber); }
.z-uecl { background: var(--green); }
.z-rel  { background: var(--red); }

.team-name-cell {
  display: flex; align-items: center; gap: 8px;
  min-width: 160px;
}

.team-logo {
  width: 22px; height: 22px;
  object-fit: contain; flex-shrink: 0;
}

.team-name { font-weight: 500; }

.pts { font-family: 'Bebas Neue', sans-serif; font-size: 18px; color: var(--gold2); }

.form-badges { display: flex; gap: 3px; justify-content: center; }
.fb {
  width: 17px; height: 17px; border-radius: 3px;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
}
.fb-W { background: rgba(0,184,148,.2); color: var(--green); }
.fb-D { background: rgba(200,200,80,.15); color: #c8c840; }
.fb-L { background: rgba(214,48,49,.2); color: var(--red); }

.gd-pos { color: var(--green); }
.gd-neg { color: var(--red); }
.gd-neu { color: var(--muted); }

/* ── TABLE LEGEND ───────────────────────────────────────── */
.table-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 16px; font-size: 12px; color: var(--muted);
}
.tl-item { display: flex; align-items: center; gap: 6px; }

/* ── PLAYER CARDS ───────────────────────────────────────── */
.player-list { display: flex; flex-direction: column; gap: 8px; }

.player-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center; gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  animation: riseUp .4s ease both;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-card:hover {
  border-color: rgba(201,151,58,.3);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

@keyframes riseUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.player-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; line-height: 1;
  color: var(--muted); text-align: center;
}
.player-rank.r1 { color: #FFD700; }
.player-rank.r2 { color: #C0C0C0; }
.player-rank.r3 { color: #CD7F32; }

.player-photo {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.player-info { display: flex; flex-direction: column; }
.player-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.player-club { font-size: 12px; color: var(--muted); }

.player-stat { text-align: right; }
.stat-big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px; color: var(--gold2); line-height: 1;
}
.stat-unit {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ── SKELETON ───────────────────────────────────────────── */
.skeleton-row {
  height: 70px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 8px;
}

/* ── ERROR STATE ────────────────────────────────────────── */
.error-box {
  background: rgba(214,48,49,.08);
  border: 1px solid rgba(214,48,49,.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #e07070;
  font-size: 14px;
  display: none;
}
.error-box.show { display: block; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 0;
}

.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: .06em;
  color: var(--muted);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 13px; color: var(--muted);
  text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 12px; color: var(--muted); opacity: .6; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { max-width: 100%; padding: 0 16px; }
  .standings-table { font-size: 14px; }
}

@media (max-width: 768px) {
  .standings-table thead { display: none; }
  .standings-table tr {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    padding: 12px;
    margin-bottom: 8px;
  }
  .standings-table td {
    border: none;
    padding: 0;
  }
  .team-name-cell { min-width: auto; }
}

@media (max-width: 640px) {
  .player-card { grid-template-columns: 38px 1fr auto; gap: 10px; padding: 12px 14px; }
  .stat-big { font-size: 28px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .page-hero { padding: 44px 0 36px; }
  .hero-eyebrow { font-size: 12px; }
  .hero-desc { font-size: 14px; }
  .editorial { padding: 16px; }
  .editorial h2 { font-size: 22px; }
}
/* ── FIXTURE CARDS ──────────────────────────────────────── */
.fixtures-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fixture-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  animation: riseUp .35s ease both;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.fixture-card:hover { 
  border-color: rgba(201,151,58,.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.fixture-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
}

.fixture-team.home { justify-content: flex-end; text-align: right; }
.fixture-team.away { justify-content: flex-start; text-align: left; }

.fixture-logo {
  width: 26px; height: 26px;
  object-fit: contain; flex-shrink: 0;
}

.fixture-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 14px;
  min-width: 80px;
}

.score-sep { color: var(--muted); margin: 0 4px; }

.fixture-upcoming {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  min-width: 100px;
}

/* ── MATCHDAY NAV ───────────────────────────────────────── */
.matchday-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.md-nav-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .2s, color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  cursor: pointer;
}

.md-nav-btn:hover { 
  border-color: var(--gold); 
  color: var(--gold);
  box-shadow: 0 4px 12px rgba(201,151,58,0.2);
  transform: translateY(-1px);
}

.md-nav-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.md-nav-current {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: var(--muted);
  letter-spacing: .05em;
}

/* ── TEAM STAT TILES ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-tile:hover { 
  border-color: rgba(201,151,58,.3);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.stat-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tile-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--gold2);
  line-height: 1;
  margin-bottom: 4px;
}

.tile-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.record-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.record-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
}

/* ── TEAM LINK ──────────────────────────────────────────── */
a.team-link {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
a.team-link:hover { color: var(--gold); }

/* ── JOURNEE INDEX ──────────────────────────────────────── */
.journee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.journee-btn {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  transition: border-color .2s, color .2s, transform .15s;
}

.journee-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.journee-btn .jb-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}

/* ── CLUB GRID (for clubs index page) ───────────────────── */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.club-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.club-card:hover {
  border-color: rgba(201,151,58,.35);
  transform: translateY(-3px);
}

.club-card img {
  width: 44px; height: 44px;
  object-fit: contain;
}

.club-card-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .fixture-card {
    grid-template-columns: 1fr auto 1fr;
    padding: 12px 12px;
    gap: 8px;
  }
  .fixture-team { font-size: 12px; gap: 6px; }
  .fixture-logo { width: 20px; height: 20px; }
  .fixture-score { font-size: 20px; padding: 4px 10px; min-width: 64px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .journee-grid { grid-template-columns: repeat(auto-fill, minmax(80px,1fr)); }
}

/* ── LOADING SPINNER ────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ── TOAST NOTIFICATIONS ────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s ease both;
  min-width: 280px;
  max-width: 420px;
}

.toast.success {
  border-color: var(--green);
  background: rgba(0,184,148,0.1);
}

.toast.error {
  border-color: var(--red);
  background: rgba(214,48,49,0.1);
}

.toast.warning {
  border-color: var(--amber);
  background: rgba(224,156,0,0.1);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--amber); }

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  transition: color .2s;
}

.toast-close:hover { color: var(--text); }

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── EDITORIAL HIERARCHY ────────────────────────────────── */
.editorial {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.editorial h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: var(--gold2);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.editorial p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 12px;
}

.editorial p:last-child {
  margin-bottom: 0;
}

.editorial strong {
  color: var(--gold2);
  font-weight: 600;
}

/* ── BUTTON VARIANTS ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: #000;
}

.btn-primary:hover {
  background: var(--gold2);
  box-shadow: 0 4px 12px rgba(201,151,58,0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,151,58,0.05);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── SEARCH INPUT ENHANCED ──────────────────────────────── */
.search-input-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,58,0.15);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}
/* ── COOKIE BANNER ──────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #0d0d1f;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 40px rgba(0,0,0,.6);
  animation: slideUp .35s ease;
}

#cookie-banner.cb-hide {
  animation: slideDown .35s ease forwards;
}

@keyframes slideUp   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { transform: translateY(0); }    to { transform: translateY(100%); } }

.cb-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}

.cb-text { flex: 1; min-width: 260px; }
.cb-text strong { font-size: 15px; display: block; margin-bottom: 4px; }
.cb-text p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.cb-link { font-size: 12px; color: var(--gold); text-decoration: none; margin-top: 4px; display: inline-block; }
.cb-link:hover { text-decoration: underline; }

.cb-actions {
  display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0;
}

.cb-btn {
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s; white-space: nowrap;
}

.cb-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.cb-btn-ghost:hover { border-color: var(--text); color: var(--text); }

.cb-btn-primary {
  background: var(--gold);
  color: #000;
}
.cb-btn-primary:hover { background: var(--gold2); }

/* ── COOKIE MODAL ───────────────────────────────────────── */
#cookie-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}

.cm-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}

.cm-box {
  position: relative; z-index: 1;
  background: #0e0e1c;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%; max-width: 520px;
  margin: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.cm-box h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: .04em;
  margin-bottom: 24px;
}

.cm-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cm-row:last-of-type { border-bottom: none; }
.cm-row > div:first-child { flex: 1; }
.cm-row strong { font-size: 14px; display: block; margin-bottom: 4px; }
.cm-row p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }

.cm-toggle {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.cm-toggle-on { background: rgba(0,184,148,.15); color: var(--green); }
.cm-disabled { opacity: .6; pointer-events: none; }

/* Toggle switch */
.cm-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cm-switch input { opacity: 0; width: 0; height: 0; }
.cm-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 24px;
  cursor: pointer; transition: .25s;
}
.cm-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; left: 3px; bottom: 3px;
  transition: .25s;
}
.cm-switch input:checked + .cm-slider { background: var(--gold); }
.cm-switch input:checked + .cm-slider::before { transform: translateX(20px); }

.cm-footer {
  display: flex; justify-content: flex-end;
  gap: 10px; margin-top: 24px;
}

/* ── INTERLINK BLOCK ────────────────────────────────────── */
.interlink-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 40px;
}

.interlink-block h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: .05em;
  margin-bottom: 16px; color: var(--muted);
  text-transform: uppercase;
}

.interlink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.interlink-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px; font-weight: 500;
  transition: border-color .2s, color .2s;
}
.interlink-card:hover { border-color: rgba(201,151,58,.35); color: var(--gold); }
.interlink-card .il-icon { font-size: 18px; flex-shrink: 0; }

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 0;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .bc-sep { color: var(--border); }
.breadcrumb .bc-current { color: var(--text); }

/* ── LEGAL PAGES ────────────────────────────────────────── */
.legal-content {
  max-width: 740px;
  line-height: 1.85;
}

.legal-content h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: .04em;
  margin: 36px 0 12px;
  color: var(--text);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p {
  color: var(--muted);
  margin-bottom: 14px;
}

.legal-content a { color: var(--gold); }
.legal-content strong { color: var(--text); }

.legal-content ul {
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 14px;
  line-height: 2;
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
  font-size: 14px;
}

.legal-toc h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: .06em;
  margin-bottom: 12px; color: var(--muted);
}

.legal-toc ol {
  padding-left: 18px;
  line-height: 2;
}

.legal-toc a { color: var(--gold); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

/* ── ABOUT PAGE ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative; overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.about-card .ac-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.about-card h3 { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: .04em; margin-bottom: 8px; }
.about-card p { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }

@media (max-width: 600px) {
  .cb-inner { flex-direction: column; }
  .cb-actions { width: 100%; justify-content: stretch; }
  .cb-btn { flex: 1; text-align: center; }
  .interlink-grid { grid-template-columns: 1fr 1fr; }
}
