/* ============================================================
   WCCE 2026 — style.css
   DO NOT EDIT — skeleton file
   ============================================================ */

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

:root {
  --bg:       #0a0c0f;
  --bg2:      #111318;
  --bg3:      #181c23;
  --border:   #1f2530;
  --gold:     #c9a84c;
  --gold2:    #e8c97a;
  --green:    #2d6a4f;
  --green2:   #52b788;
  --red:      #c1121f;
  --blue:     #1d3557;
  --blue2:    #457b9d;
  --text:     #e8eaf0;
  --text2:    #8b919e;
  --text3:    #555d6b;
  --mono:     'JetBrains Mono', monospace;
  --display:  'Barlow Condensed', sans-serif;
  --body:     'Inter', sans-serif;
  --radius:   6px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius:3px; }

/* ── NAV ── */
nav {
  position: sticky; top:0; z-index:200;
  background: rgba(10,12,15,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; gap:1.5rem;
  height: 52px;
}
.nav-brand {
  font-family: var(--display);
  font-weight:900; font-size:18px;
  color: var(--gold); letter-spacing:0.05em;
  text-decoration:none; white-space:nowrap;
}
.nav-links {
  display:flex; gap:1.2rem; margin-left:auto;
  align-items:center; flex-wrap:wrap;
}
.nav-links a {
  color:var(--text2); font-size:13px;
  text-decoration:none; transition:color 0.2s;
  white-space:nowrap;
}
.nav-links a:hover { color:var(--gold); }
.nav-btn {
  padding:5px 12px; border-radius:var(--radius);
  font-size:12px; font-weight:600; cursor:pointer;
  border:1px solid var(--border); background:var(--bg2);
  color:var(--text2); transition:all 0.15s;
  display:flex; align-items:center; gap:5px;
  font-family:var(--body); white-space:nowrap;
}
.nav-btn:hover { border-color:var(--gold); color:var(--gold); }
.nav-btn.primary { border-color:var(--gold); color:var(--gold); }
.nav-hamburger {
  display:none; background:none; border:none;
  cursor:pointer; color:var(--text2); padding:4px;
}

/* ── HERO ── */
.hero {
  position:relative; padding:4rem 1.5rem 3rem;
  text-align:center; overflow:hidden;
  border-bottom:1px solid var(--border);
}
.hero::before {
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,168,76,0.10), transparent),
    radial-gradient(ellipse 50% 40% at 80% 110%, rgba(45,106,79,0.07), transparent);
  pointer-events:none;
}
.hero-eyebrow {
  font-family:var(--mono); font-size:11px;
  letter-spacing:0.15em; color:var(--gold);
  text-transform:uppercase; margin-bottom:0.8rem;
}
.hero-title {
  font-family:var(--display);
  font-size:clamp(2.8rem, 8vw, 7rem);
  font-weight:900; line-height:0.92;
  letter-spacing:-0.01em; margin-bottom:0.8rem;
}
.hero-title span { color:var(--gold); }
.hero-sub {
  font-size:15px; color:var(--text2);
  max-width:500px; margin:0 auto 2rem;
}
.hero-stats {
  display:flex; justify-content:center;
  flex-wrap:wrap; gap:0;
  border:1px solid var(--border); border-radius:var(--radius);
  max-width:680px; margin:0 auto 1.2rem;
  overflow:hidden;
}
.hero-stat {
  flex:1; min-width:100px;
  padding:1rem 0.8rem;
  border-right:1px solid var(--border);
  background:var(--bg2);
}
.hero-stat:last-child { border-right:none; }
.hero-stat-n {
  font-family:var(--display); font-size:2rem;
  font-weight:900; color:var(--gold); line-height:1;
}
.hero-stat-l {
  font-size:10px; color:var(--text2);
  text-transform:uppercase; letter-spacing:0.08em;
  margin-top:3px;
}
.hero-btns {
  display:flex; justify-content:center;
  gap:10px; flex-wrap:wrap; margin-top:1.5rem;
}
.btn {
  padding:8px 18px; border-radius:var(--radius);
  font-size:13px; font-weight:600; cursor:pointer;
  border:1px solid var(--border); background:var(--bg2);
  color:var(--text2); transition:all 0.15s;
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--body); text-decoration:none;
}
.btn:hover { border-color:var(--gold); color:var(--gold); }
.btn-gold {
  background:var(--gold); color:var(--bg);
  border-color:var(--gold); font-weight:700;
}
.btn-gold:hover { background:var(--gold2); border-color:var(--gold2); color:var(--bg); }
.lock-badge {
  display:inline-flex; align-items:center; gap:6px;
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); padding:4px 10px;
  font-family:var(--mono); font-size:11px; color:var(--text2);
}
.lock-dot { width:6px; height:6px; border-radius:50%; background:var(--green2); }

/* ── SECTION ── */
.section { padding:2.5rem 1.5rem; max-width:1200px; margin:0 auto; }
.section-title {
  font-family:var(--display); font-size:1.6rem;
  font-weight:700; letter-spacing:0.02em;
  margin-bottom:0.2rem;
  display:flex; align-items:center; gap:0.75rem;
}
.section-title::after {
  content:''; flex:1; height:1px; background:var(--border);
}
.section-sub { color:var(--text2); font-size:12px; margin-bottom:1.5rem; }

/* ── GROUPS ── */
.groups-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:10px;
}
.group-card {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden;
}
.group-header {
  padding:7px 12px; background:var(--bg3);
  border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center;
}
.group-name {
  font-family:var(--display); font-weight:700;
  font-size:14px; color:var(--gold);
}
.group-table { width:100%; border-collapse:collapse; }
.group-table th {
  font-size:9px; text-transform:uppercase;
  letter-spacing:0.08em; color:#8fadc4;
  padding:4px 8px; text-align:right;
  background:var(--bg3);
}
.group-table th:nth-child(2) { text-align:left; }
.group-table td {
  padding:5px 8px; font-size:12px;
  border-top:1px solid var(--border);
  text-align:right;
}
.group-table td:first-child { color:var(--text3); font-size:10px; width:16px; }
.group-table td:nth-child(2) { text-align:left; }
.group-table tr:hover td { background:rgba(201,168,76,0.03); }
.engine-cell { font-weight:600; }
.fifa-cell { font-size:11px; color:#7eb8d4; font-weight:500; }
.pts-cell { font-weight:700; color:var(--gold); }
.gd-pos { color:var(--green2); }
.gd-neg { color:var(--red); }

/* ── MATCH RESULTS ── */
.match-list { display:flex; flex-direction:column; gap:6px; }
.match-row {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); padding:10px 14px;
  display:grid;
  grid-template-columns:auto 1fr auto auto auto auto;
  gap:10px; align-items:center;
  transition:background 0.15s;
}
.match-row:hover { background:var(--bg3); }
.match-grp {
  font-family:var(--display); font-weight:700;
  font-size:13px; color:var(--gold);
  background:var(--bg3); border:1px solid var(--border);
  padding:2px 8px; border-radius:3px;
}
.match-engines { font-weight:600; font-size:13px; }
.match-vs { color:var(--text3); font-size:11px; }
.match-score {
  font-family:var(--mono); font-size:13px;
  font-weight:700; color:var(--gold2);
  white-space:nowrap;
}
.match-seq {
  font-family:var(--mono); font-size:10px;
  color:var(--text3); letter-spacing:0.05em;
}
.match-pct { font-size:11px; color:var(--text2); }
.match-pgn {
  font-size:10px; color:var(--blue2);
  cursor:pointer; text-decoration:underline;
}
.match-pgn:hover { color:var(--gold); }

/* ── STATS BAR ── */
.stats-bar {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); padding:10px 14px;
  display:flex; gap:2rem; flex-wrap:wrap; align-items:center;
  font-size:12px; margin-top:1rem;
}
.stat-item { display:flex; align-items:center; gap:6px; }
.stat-dot { width:8px; height:8px; border-radius:50%; }
.stat-val { font-weight:700; font-family:var(--mono); }
.stat-label { color:var(--text2); }

/* ── ENGINE TABLE ── */
.engine-table { width:100%; border-collapse:collapse; }
.engine-table th {
  font-size:10px; text-transform:uppercase;
  letter-spacing:0.08em; color:var(--text3);
  padding:7px 10px; text-align:left;
  border-bottom:1px solid var(--border);
  background:var(--bg2); position:sticky; top:52px;
}
.engine-table td {
  padding:6px 10px; font-size:12px;
  border-bottom:1px solid var(--border);
}
.engine-table tr:hover td { background:var(--bg2); }
.rank-cell { color:var(--text3); font-family:var(--mono); font-size:11px; }
.elo-cell { font-family:var(--mono); font-weight:600; color:var(--gold2); }
.group-badge {
  display:inline-block; padding:1px 7px;
  border-radius:3px; font-size:11px; font-weight:700;
  font-family:var(--display);
  background:var(--bg3); color:var(--gold);
  border:1px solid var(--border);
}

/* ── OPENINGS ── */
.op-header {
  display:grid; grid-template-columns:28px 52px 1fr 1fr;
  gap:1rem; padding:5px 12px;
  font-size:9px; text-transform:uppercase;
  letter-spacing:0.08em; color:var(--text3);
  margin-bottom:2px;
}
.opening-row {
  display:grid; grid-template-columns:28px 52px 1fr 1fr;
  gap:1rem; align-items:center;
  padding:9px 12px; background:var(--bg2);
  border-bottom:1px solid var(--border);
  transition:background 0.15s;
}
.opening-row:first-child { border-radius:var(--radius) var(--radius) 0 0; }
.opening-row:last-child { border-radius:0 0 var(--radius) var(--radius); border-bottom:none; }
.opening-row:hover { background:var(--bg3); }
.op-num { font-family:var(--mono); font-size:11px; color:var(--text3); text-align:center; }
.op-eco { font-family:var(--mono); font-size:11px; color:var(--gold); font-weight:600; }
.op-name { font-size:12px; font-weight:600; }
.op-var { color:var(--text3); font-weight:400; font-size:11px; }
.op-moves { font-family:var(--mono); font-size:10px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── PHASE TABLE ── */
.phase-table { width:100%; border-collapse:collapse; }
.phase-table th {
  font-size:10px; text-transform:uppercase;
  letter-spacing:0.08em; color:var(--text3);
  padding:7px 12px; text-align:left;
  border-bottom:1px solid var(--border);
}
.phase-table td { padding:7px 12px; font-size:13px; border-bottom:1px solid var(--border); }
.phase-table tr:hover td { background:var(--bg2); }
.games-cell { font-family:var(--mono); font-weight:700; color:var(--gold2); }
.tc-cell { font-family:var(--mono); font-size:12px; color:var(--text2); }

/* ── RULES GRID ── */
.rule-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:10px; margin-bottom:1.5rem; }
.rule-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:1rem; }
.rule-card-title { font-size:10px; text-transform:uppercase; letter-spacing:0.1em; color:var(--text3); margin-bottom:8px; }
.rule-item { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px solid var(--border); font-size:12px; }
.rule-item:last-child { border-bottom:none; }
.rule-val { font-weight:600; color:var(--gold2); font-family:var(--mono); font-size:11px; }

/* ── MODAL ── */
.modal-overlay {
  display:none; position:fixed; inset:0; z-index:500;
  background:rgba(0,0,0,0.75); backdrop-filter:blur(4px);
  align-items:center; justify-content:center; padding:1rem;
}
.modal-overlay.open { display:flex; }
.modal {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); width:100%; max-width:640px;
  max-height:90vh; overflow-y:auto;
}
.modal-header {
  padding:1rem 1.2rem; border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center;
  position:sticky; top:0; background:var(--bg2); z-index:1;
}
.modal-title { font-family:var(--display); font-size:1.3rem; font-weight:700; }
.modal-close {
  background:none; border:none; cursor:pointer;
  color:var(--text2); font-size:20px; line-height:1;
  padding:2px 6px; border-radius:3px;
}
.modal-close:hover { color:var(--text); background:var(--bg3); }
.modal-body { padding:1.2rem; }
.modal-section { margin-bottom:1.2rem; }
.modal-section-title {
  font-size:10px; text-transform:uppercase;
  letter-spacing:0.1em; color:var(--gold);
  margin-bottom:8px; font-weight:600;
}
.info-row { display:flex; justify-content:space-between; padding:5px 0; border-bottom:1px solid var(--border); font-size:12px; }
.info-row:last-child { border-bottom:none; }
.info-val { font-weight:600; font-family:var(--mono); font-size:11px; color:var(--text); }

/* ── DOWNLOAD MENU ── */
.download-menu {
  display:none; position:absolute; top:100%; right:0;
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); min-width:200px;
  box-shadow:0 8px 24px rgba(0,0,0,0.4); z-index:300;
  margin-top:4px; overflow:hidden;
}
.download-menu.open { display:block; }
.download-item {
  padding:9px 14px; font-size:12px; cursor:pointer;
  display:flex; align-items:center; gap:8px;
  border-bottom:1px solid var(--border);
  transition:background 0.15s;
}
.download-item:last-child { border-bottom:none; }
.download-item:hover { background:var(--bg3); color:var(--gold); }
.download-icon { font-size:14px; }
.dl-wrapper { position:relative; }

/* ── FOOTER ── */
footer {
  border-top:1px solid var(--border); padding:1.5rem;
  text-align:center; font-size:12px; color:var(--text3);
}
footer a { color:var(--gold); text-decoration:none; }
footer .claude { color:#c1121f; font-weight:700; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .nav-links { display:none; }
  .nav-links.open {
    display:flex; flex-direction:column;
    position:absolute; top:52px; left:0; right:0;
    background:var(--bg2); border-bottom:1px solid var(--border);
    padding:1rem 1.5rem; gap:0.8rem; z-index:199;
  }
  .nav-hamburger { display:block; margin-left:auto; }
  .hero { padding:2.5rem 1rem 2rem; }
  .hero-stat-n { font-size:1.6rem; }
  .hero-stat { min-width:80px; padding:0.8rem 0.5rem; }
  .groups-grid { grid-template-columns:1fr; }
  .match-row {
    grid-template-columns:auto 1fr auto;
    grid-template-rows:auto auto;
    gap:6px;
  }
  .match-seq, .match-pct { display:none; }
  .op-header, .opening-row { grid-template-columns:28px 52px 1fr; }
  .op-moves { display:none; }
  .engine-table th:nth-child(5),
  .engine-table td:nth-child(5),
  .engine-table th:nth-child(6),
  .engine-table td:nth-child(6) { display:none; }
  .rule-grid { grid-template-columns:1fr 1fr; }
  .section { padding:1.5rem 1rem; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction:row; }
  .hero-stat { min-width:60px; }
  .rule-grid { grid-template-columns:1fr; }
  .stats-bar { gap:1rem; }
}
