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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(160deg, #071a0e 0%, #0d2818 40%, #071a0e 100%);
  background-attachment: fixed;
  color: #f0fdf4;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.main { flex: 1; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(11,31,18,0.9);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; gap: 1rem; flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 0.5rem; }
.nav-icon { font-size: 1.5rem; }
.nav-title { font-weight: 700; color: #fff; line-height: 1.2; }
.nav-subtitle { font-size: 0.75rem; color: rgba(110,231,183,0.7); }
.nav-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-link {
  padding: 0.375rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  color: rgba(209,250,229,0.8); transition: background 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: #10b981; color: #fff; }

/* Layout */
.container { max-width: 72rem; margin: 0 auto; padding: 2rem 1rem; }
.container-narrow { max-width: 56rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.875rem; font-weight: 700; color: #fff; }
.subtitle { margin-top: 0.25rem; color: rgba(110,231,183,0.6); font-size: 0.95rem; }
.hint { font-size: 0.875rem; font-weight: 400; color: rgba(110,231,183,0.5); }
.fine-print { margin-top: 0.75rem; font-size: 0.75rem; color: rgba(110,231,183,0.4); }
.muted { color: rgba(209,250,229,0.5); }
.section-block { margin-bottom: 2.5rem; }
.section-block h2 { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
.section-head h2 { margin-bottom: 0; }

/* Grids */
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  border: 1px solid rgba(255,255,255,0.1); border-radius: 0.75rem;
  background: rgba(255,255,255,0.05); padding: 1rem; text-align: center;
}
.stat-icon { font-size: 1.5rem; }
.stat-value { margin-top: 0.25rem; font-size: 1.5rem; font-weight: 700; color: #fff; }
.stat-label { font-size: 0.75rem; color: rgba(110,231,183,0.5); }

.grid-2 { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.mt { margin-top: 2rem; }

/* Badges */
.badge { border-radius: 9999px; background: rgba(255,255,255,0.1); padding: 0.125rem 0.5rem; font-size: 0.75rem; }
.badge-violet {
  border-radius: 9999px; border: 1px solid rgba(167,139,250,0.3);
  background: rgba(139,92,246,0.1); padding: 0.25rem 0.75rem;
  font-size: 0.75rem; color: #ddd6fe;
}
.notice {
  margin-bottom: 1rem; border-radius: 0.5rem;
  border: 1px solid rgba(16,185,129,0.3); background: rgba(16,185,129,0.1);
  padding: 0.5rem 1rem; font-size: 0.875rem; color: #a7f3d0;
}
.notice-violet {
  border-radius: 0.75rem; border: 1px solid rgba(167,139,250,0.2);
  background: rgba(139,92,246,0.05); padding: 0.75rem 1rem;
  font-size: 0.875rem; color: rgba(221,214,254,0.7);
}

/* Table */
.table-wrap { overflow-x: auto; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { padding: 0.75rem 1rem; text-align: left; color: rgba(110,231,183,0.7); font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.1); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.table .center { text-align: center; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  background: rgba(255,255,255,0.1); font-size: 0.75rem; font-weight: 700;
}
.player-name { font-weight: 600; color: #fff; }
.ai-name { color: #ddd6fe; font-weight: 600; }
.pts-badge {
  display: inline-block; border-radius: 9999px;
  background: rgba(16,185,129,0.2); padding: 0.125rem 0.75rem;
  font-weight: 700; color: #6ee7b7;
}
.row-gold { background: rgba(245,158,11,0.1); }
.row-silver { background: rgba(156,163,175,0.05); }
.row-bronze { background: rgba(194,65,12,0.1); }
.row-ai { background: rgba(139,92,246,0.1); }
.text-gold { color: #fcd34d; }

/* Fixture cards */
.fixture-list { display: grid; gap: 0.75rem; }
.fixture-card {
  border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); padding: 1rem;
  transition: border-color 0.15s;
}
.fixture-card:hover { border-color: rgba(255,255,255,0.2); }
.fixture-card.played { border-color: rgba(16,185,129,0.3); background: rgba(6,78,59,0.3); }
.fixture-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem; font-size: 0.75rem; color: rgba(110,231,183,0.6);
}
.fixture-teams { display: flex; align-items: center; gap: 0.75rem; }
.team { flex: 1; font-weight: 600; color: #fff; }
.team-right { text-align: right; }
.fixture-score { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; }
.score { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.score.final { color: #6ee7b7; }
.score.pending { color: rgba(255,255,255,0.4); }
.final-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(52,211,153,0.7); }

.predictions { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); }
.predictions-label {
  margin-bottom: 0.5rem; font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em; color: rgba(110,231,183,0.5);
}
.prediction-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.875rem; padding: 0.125rem 0;
}
.prediction-row.ai-row {
  border-radius: 0.375rem; background: rgba(139,92,246,0.1);
  padding: 0.125rem 0.5rem; margin: 0 -0.5rem;
}
.pred-score { font-variant-numeric: tabular-nums; color: rgba(255,255,255,0.9); }
.pts-chip {
  margin-left: 0.5rem; border-radius: 0.25rem; padding: 0.125rem 0.375rem;
  font-size: 0.75rem; font-weight: 700;
}
.pts-chip.gold { background: rgba(245,158,11,0.3); color: #fcd34d; }
.pts-chip.green { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.pts-chip.zero { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); }

/* Stat boxes & trophies */
.stat-box {
  border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); padding: 1rem;
}
.stat-box h3 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.stat-box-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: rgba(110,231,183,0.7); }
.stat-box-head .uppercase { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(110,231,183,0.5); }
.stat-winner { font-weight: 700; color: #fff; font-size: 1rem; }
.stat-detail { margin-top: 0.25rem; font-size: 0.75rem; color: rgba(209,250,229,0.5); }
.vs-ai-list { list-style: none; }
.vs-ai-list li { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.25rem 0; }
.positive { font-weight: 700; color: #6ee7b7; font-variant-numeric: tabular-nums; }
.negative { font-weight: 700; color: rgba(252,165,165,0.8); font-variant-numeric: tabular-nums; }
.story-text { font-size: 0.875rem; color: rgba(209,250,229,0.7); }
.trophy-card {
  border-radius: 0.75rem; border: 1px solid rgba(251,191,36,0.2);
  background: linear-gradient(135deg, rgba(245,158,11,0.1), transparent);
  padding: 1rem;
}
.trophy-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: #fcd34d; margin-bottom: 0.5rem; }
.trophy-winner { font-size: 1.125rem; font-weight: 700; color: #fff; }
.trophy-sub { margin-top: 0.25rem; font-size: 0.75rem; color: rgba(209,250,229,0.5); }

/* Tabs */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab {
  border-radius: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
  background: rgba(255,255,255,0.05); color: rgba(209,250,229,0.7); transition: background 0.15s;
}
.tab:hover { background: rgba(255,255,255,0.1); }
.tab.active { background: #10b981; color: #fff; }
.tab-count { font-size: 0.75rem; opacity: 0.6; }

/* Admin */
.admin-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.score-input {
  width: 3.5rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1); padding: 0.5rem; text-align: center;
  font-size: 1.125rem; font-weight: 700; color: #fff;
}
.score-input:focus { outline: none; border-color: #34d399; }
.dash { color: rgba(255,255,255,0.4); font-weight: 700; }
.btn {
  border: none; border-radius: 0.5rem; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.btn-primary { background: #10b981; color: #fff; }
.btn-primary:hover { background: #34d399; }
.btn-secondary {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* Rules & bars */
.rules-list { list-style: none; }
.rules-list li {
  display: flex; justify-content: space-between; gap: 0.75rem;
  font-size: 0.875rem; color: rgba(209,250,229,0.7); padding: 0.375rem 0;
}
.rules-list strong { color: #6ee7b7; flex-shrink: 0; }
.bar-row { margin-bottom: 0.75rem; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.25rem; }
.bar-label span { color: rgba(255,255,255,0.8); }
.bar-label strong { color: #6ee7b7; }
.bar-track { height: 0.5rem; border-radius: 9999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #059669, #34d399); }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem; text-align: center;
  font-size: 0.75rem; color: rgba(110,231,183,0.4);
}

/* Responsive table cols */
@media (max-width: 639px) { .hide-sm { display: none; } }
@media (max-width: 767px) { .hide-md { display: none; } }
@media (max-width: 1023px) { .hide-lg { display: none; } }
