@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; }
}
