/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

:root {
  /* Team colors */
  --fb-yellow: #FFD700; --fb-dark: #003366;
  --gs-red: #E8192C;   --gs-yellow: #F5A623;
  --bjk-black: #1a1a1a; --bjk-white: #ffffff;
  --ts-maroon: #8B1A1A; --ts-blue: #1B3A6B;

  /* Bloomberg/Reuters dark theme */
  --bg-dark:   #0D1117;
  --bg-card:   #161B22;
  --bg-card2:  #1C2128;
  --border:    #30363D;
  --border-subtle: #21262D;

  --text-primary:   #E6EDF3;
  --text-secondary: #8D96A0;
  --text-muted:     #4D5562;

  --accent:  #2F81F7;
  --accent2: #388BFD;
  --accent-subtle: rgba(47,129,247,0.08);

  --positive: #3FB950;
  --negative: #F85149;
  --neutral:  #D29922;

  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 0 24px;
}

.hero-bg {
  position: absolute; inset: 0;
  background: var(--bg-dark);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(47,129,247,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  backdrop-filter: blur(20px);
  background: rgba(13,17,23,0.92);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.logo-icon { font-size: 1.5rem; }

.nav-links {
  display: flex; gap: 32px; list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-block;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 18px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
  font-family: 'DM Mono', monospace;
}

.hero-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
  animation: fadeInUp 0.7s ease 0.1s both;
  letter-spacing: -0.5px;
}

.gradient-text {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 620px; margin: 0 auto 36px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-stats {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 28px;
  display: flex; flex-direction: column; align-items: center;
}

.stat-num {
  font-family: 'DM Mono', monospace;
  font-size: 2rem; font-weight: 500;
  color: var(--text-primary);
}

.stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 4px; }

.scroll-indicator {
  position: absolute; bottom: 32px;
  animation: bounce 2s infinite;
  z-index: 1;
}
.scroll-arrow { font-size: 1.5rem; color: var(--text-secondary); }

/* ===== SECTIONS ===== */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-card); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section-header { text-align: center; margin-bottom: 60px; }

.section-tag {
  display: inline-block;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 4px 14px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
  font-family: 'DM Mono', monospace;
}

.section-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700; margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-desc { color: var(--text-secondary); font-size: 1rem; }

/* ===== SUMMARY CARDS ===== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.summary-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.summary-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.summary-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.card-fenerbahce::before { background: linear-gradient(90deg, #003366, #FFD700); }
.card-galatasaray::before { background: linear-gradient(90deg, #E8192C, #F5A623); }
.card-besiktas::before { background: linear-gradient(90deg, #111, #fff); }
.card-trabzonspor::before { background: linear-gradient(90deg, #8B1A1A, #1B3A6B); }

.card-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}

.team-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
}
.card-fenerbahce .team-badge { background: linear-gradient(135deg, #003366, #0055a4); color: #FFD700; }
.card-galatasaray .team-badge { background: linear-gradient(135deg, #E8192C, #c41224); color: #F5A623; }
.card-besiktas .team-badge { background: linear-gradient(135deg, #111, #333); color: #fff; }
.card-trabzonspor .team-badge { background: linear-gradient(135deg, #8B1A1A, #6b1414); color: #87CEEB; }

.team-name { font-weight: 700; font-size: 1.1rem; }

.card-stats { display: flex; flex-direction: column; gap: 16px; }

.card-stat { display: flex; justify-content: space-between; align-items: center; }

.stat-val {
  font-family: 'DM Mono', monospace; font-size: 1.4rem; font-weight: 500;
}
.stat-val.positive { color: var(--positive); }
.stat-val.negative { color: var(--negative); }
.stat-val.neutral  { color: var(--text-primary); }

.stat-key { font-size: 0.78rem; color: var(--text-secondary); }

/* ===== IMPACT SECTION ===== */
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.impact-item {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.3s;
}
.impact-item:hover { transform: translateY(-4px); }

.impact-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}

.impact-team { font-weight: 600; }

.impact-points {
  font-family: 'DM Mono', monospace; font-size: 1.3rem; font-weight: 500;
}
.impact-points.gained { color: var(--positive); }
.impact-points.lost   { color: var(--negative); }

.impact-bar-wrap { display: flex; flex-direction: column; gap: 8px; }
.impact-label { font-size: 0.75rem; color: var(--text-secondary); }

.impact-bar-bg {
  height: 10px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
}

.impact-bar {
  height: 100%; border-radius: 999px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.bar-gain { background: linear-gradient(90deg, #34d399, #059669); }
.bar-loss { background: linear-gradient(90deg, #f87171, #dc2626); }

/* ===== STANDINGS ===== */
.standings-wrapper {
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}

.standings-table-wrap { flex: 1; min-width: 300px; }

.table-title {
  font-family: 'Oswald', sans-serif; font-size: 1.2rem; font-weight: 600;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.standings-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card2); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}

.standings-table th {
  background: rgba(255,255,255,0.04);
  padding: 12px 16px; text-align: center;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 1px; text-transform: uppercase;
}
.standings-table th:nth-child(2) { text-align: left; }

.standings-table td {
  padding: 14px 16px; text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.standings-table td:nth-child(2) { text-align: left; display: flex; align-items: center; gap: 8px; }

.standings-table tr { transition: background 0.2s; }
.standings-table tr:hover td { background: rgba(255,255,255,0.03); }

.rank-badge {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
}
.rank-badge.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.rank-badge.silver { background: linear-gradient(135deg, #C0C0C0, #a0a0a0); color: #000; }
.rank-badge.bronze { background: linear-gradient(135deg, #CD7F32, #b06820); color: #fff; }

.team-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.dot-fb { background: linear-gradient(135deg, #003366, #FFD700); }
.dot-gs { background: linear-gradient(135deg, #E8192C, #F5A623); }
.dot-bjk { background: #aaa; }
.dot-ts { background: linear-gradient(135deg, #8B1A1A, #1B3A6B); }

.points-cell {
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700;
}
.fair-winner { color: var(--positive); }
.fair-loser { color: var(--negative); }

.vs-divider {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 16px; flex-shrink: 0;
}
.vs-line { width: 2px; height: 60px; background: var(--border); }
.vs-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 0.8rem;
  color: var(--text-muted);
}

/* Notable Changes */
.notable-changes { margin-top: 48px; }
.changes-title { font-family: 'Oswald', sans-serif; font-size: 1.3rem; margin-bottom: 20px; }
.changes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.change-card {
  display: flex; gap: 16px; align-items: center;
  padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.positive-change { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.2); }
.negative-change { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.2); }

.change-icon {
  font-size: 1.5rem; font-weight: 900;
  flex-shrink: 0;
}
.positive-change .change-icon { color: var(--positive); }
.negative-change .change-icon { color: var(--negative); }

.change-info {
  display: flex; flex-direction: column; gap: 2px;
}
.change-info strong { font-weight: 700; }
.change-info span { font-size: 0.8rem; color: var(--text-secondary); }
.change-pts { font-family: 'Oswald', sans-serif; font-size: 0.95rem !important; color: var(--text-primary) !important; font-weight: 600; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 18px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer; font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s;
  font-family: 'IBM Plex Sans', sans-serif;
}
.filter-btn:hover  { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== LOG TABLE ===== */
.log-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.log-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-dark);
  font-size: 0.85rem;
}

.log-table th {
  background: rgba(255,255,255,0.05);
  padding: 14px 16px;
  text-align: left; font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; white-space: nowrap;
}

.log-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.log-table tr { transition: background 0.2s; }
.log-table tr:hover td { background: rgba(255,255,255,0.03); }

.team-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 6px;
  font-family: 'Oswald', sans-serif; font-size: 0.8rem; font-weight: 600;
}
.tag-fb { background: rgba(0,51,102,0.5); color: #FFD700; border: 1px solid rgba(255,215,0,0.3); }
.tag-gs { background: rgba(232,25,44,0.2); color: #F5A623; border: 1px solid rgba(245,166,35,0.3); }
.tag-bjk { background: rgba(50,50,50,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.tag-ts { background: rgba(139,26,26,0.3); color: #87CEEB; border: 1px solid rgba(135,206,235,0.3); }

.impact-tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.impact-favor-fb { background: rgba(0,51,102,0.3); color: #60a5fa; }
.impact-favor-gs { background: rgba(232,25,44,0.2); color: #fca5a5; }
.impact-favor-bjk { background: rgba(80,80,80,0.3); color: #d1d5db; }
.impact-favor-ts { background: rgba(139,26,26,0.2); color: #93c5fd; }
.impact-against { background: rgba(248,113,113,0.12); color: var(--negative); border: 1px solid rgba(248,113,113,0.25); }
.impact-favor   { background: rgba(52,211,153,0.10); color: var(--positive);  border: 1px solid rgba(52,211,153,0.25); }

.score-cell {
  font-family: 'DM Mono', monospace; font-weight: 500; font-size: 0.95rem;
  white-space: nowrap;
}
.score-pos { color: var(--positive); }
.score-neg { color: var(--negative); }
.score-neu { color: var(--text-muted); }

.desc-cell { max-width: 360px; font-size: 0.82rem; color: #cbd5e1; line-height: 1.5; }

/* ===== PTS BADGE ===== */
.pts-badge {
  display: inline-block; padding: 4px 12px; border-radius: 8px;
  font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700;
}
.pts-gain { background: rgba(52,211,153,0.15); color: var(--positive); border: 1px solid rgba(52,211,153,0.3); }
.pts-loss { background: rgba(248,113,113,0.15); color: var(--negative); border: 1px solid rgba(248,113,113,0.3); }

/* ===== FAIR NOTE ===== */
.fair-note { font-size: 0.7rem; color: var(--accent); vertical-align: super; margin-left: 4px; }

/* ===== STANDINGS NOTE ===== */
.standings-note {
  margin-top: 28px; padding: 16px 20px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; font-size: 0.8rem; color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== TOTALS LEGEND ===== */
.totals-legend {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px;
}
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.gained-dot { background: var(--positive); }
.lost-dot   { background: var(--negative); }

/* ===== METHODOLOGY ===== */
.methodology-section { background: linear-gradient(135deg, #0a0e1a, #0d1526); }

.method-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.method-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  text-align: center; transition: transform 0.3s;
}
.method-card:hover { transform: translateY(-6px); }

.method-icon { font-size: 2.5rem; margin-bottom: 16px; }
.method-card h3 { font-family: 'Oswald', sans-serif; font-size: 1.1rem; margin-bottom: 10px; }
.method-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-content { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700;
}

.footer-note { font-size: 0.8rem; color: var(--text-secondary); max-width: 600px; line-height: 1.6; }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.2); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
/* ===== ACTION NAV LINK ===== */
.action-nav { color: var(--accent) !important; font-weight: 700 !important; }
.action-nav:hover { color: #fff !important; }

/* ===== ACTION SECTION ===== */
.action-section { background: var(--bg-dark); }

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; margin-bottom: 40px;
}

.action-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}
.action-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }

.action-icon-wrap {
  padding: 24px; display: flex; align-items: center; justify-content: center;
}
.tff-color  { background: linear-gradient(135deg, #1a3a6b, #0d2040); border-bottom: 2px solid #e63946; }
.uefa-color { background: linear-gradient(135deg, #003087, #001a52); border-bottom: 2px solid #4f8ef7; }
.cas-color  { background: linear-gradient(135deg, #2d1b6b, #1a0d3a); border-bottom: 2px solid #a78bfa; }
.tbmm-color { background: linear-gradient(135deg, #6b1a1a, #3a0d0d); border-bottom: 2px solid #e63946; }

.action-icon { font-size: 2.5rem; }

.action-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }

.action-title {
  font-family: 'Oswald', sans-serif; font-size: 1.2rem; font-weight: 600;
}

.action-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

.action-steps { display: flex; flex-direction: column; gap: 10px; }

.step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.83rem; color: #cbd5e1; line-height: 1.5;
}

.step-num {
  width: 22px; height: 22px; border-radius: 4px; flex-shrink: 0;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: #fff;
  font-family: 'DM Mono', monospace;
}

.action-footer {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--border);
}

.action-link {
  padding: 7px 14px; border-radius: 8px;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.3);
  color: var(--accent); text-decoration: none; font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.action-link:hover { background: var(--accent); color: #fff; }

.copy-btn {
  padding: 7px 14px; border-radius: 8px;
  background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.3);
  color: var(--accent2); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.copy-btn:hover { background: var(--accent2); color: #fff; }

/* ===== SOCIAL BANNER ===== */
.social-banner {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}

.social-banner-left h3 { font-family: 'Oswald', sans-serif; font-size: 1.2rem; margin-bottom: 6px; }
.social-banner-left p  { font-size: 0.88rem; color: var(--text-secondary); }

.social-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.hashtag {
  padding: 8px 16px; border-radius: 50px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.hashtag:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.05); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--positive); color: #000;
  padding: 12px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0; z-index: 999; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.lang-toggle {
  display: flex; gap: 6px; align-items: center;
}
.lang-btn {
  padding: 5px 14px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer; font-size: 0.78rem; font-weight: 600;
  font-family: 'DM Mono', monospace;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}


/* ===== BOTTOM NAV (mobile only) ===== */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Hide top nav links — bottom nav takes over */
  .nav-links { display: none !important; }
  .navbar { padding: 12px 16px; }

  /* Add breathing room so content isn't hidden under bottom nav */
  body { padding-bottom: 72px; }

  /* ---- Bottom Tab Bar ---- */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(13,17,23,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 4px;
    transition: color 0.2s, background 0.2s;
    border-radius: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .bn-item::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2px;
    background: var(--accent);
    border-radius: 0 0 2px 2px;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  }

  .bn-item.active,
  .bn-item:hover { color: var(--accent); }
  .bn-item.active::before { transform: scaleX(1); }

  .bn-item--action { color: var(--accent) !important; }
  .bn-item--action .bn-icon {
    background: rgba(47,129,247,0.12);
    border-radius: 8px;
    padding: 2px 6px;
  }

  .bn-icon {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s;
  }
  .bn-item.active .bn-icon,
  .bn-item:hover .bn-icon { transform: translateY(-1px); }

  .bn-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
  }

  /* ---- General layout fixes ---- */
  .standings-wrapper { flex-direction: column; }
  .vs-divider { flex-direction: row; padding: 16px 0; }
  .vs-line { width: 60px; height: 2px; }
  .hero-stats { gap: 10px; }
  .hero-stats .stat-pill { padding: 10px 16px; }
  .stat-num { font-size: 1.5rem; }
  .section { padding: 64px 0; }
  .action-cards { grid-template-columns: 1fr; }
  .method-cards { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: 1fr; }
  .changes-grid { grid-template-columns: 1fr; }

  /* ---- TABLE FIXES ---- */

  /* Standings tables: remove min-width, compress padding & fonts */
  .standings-table-wrap { min-width: 0; width: 100%; overflow-x: auto; }

  .standings-table th,
  .standings-table td {
    padding: 8px 6px;
    font-size: 0.75rem;
  }
  .standings-table td:nth-child(2) {
    gap: 4px;
    font-size: 0.78rem;
  }
  .rank-badge {
    width: 22px; height: 22px;
    font-size: 0.7rem;
    border-radius: 6px;
    flex-shrink: 0;
  }
  .team-dot { width: 8px; height: 8px; }
  .points-cell { font-size: 0.9rem; }

  /* Log / Impact tables: horizontal scroll + compact cells */
  .log-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* subtle hint that it scrolls */
    border-radius: var(--radius);
  }
  .log-table { font-size: 0.72rem; min-width: 520px; }
  .log-table th { padding: 10px 8px; font-size: 0.62rem; }
  .log-table td { padding: 8px 8px; }

  /* Desc column: allow wrapping instead of growing too wide */
  .desc-cell { max-width: 180px; font-size: 0.72rem; }

  /* Impact table (standings impact section) */
  .log-table-wrap .log-table { min-width: 420px; }

  /* Filter bar wraps nicely */
  .filter-bar { gap: 8px; }
  .filter-btn { padding: 5px 12px; font-size: 0.78rem; }

  /* Social banner stack */
  .social-banner { flex-direction: column; align-items: flex-start; padding: 20px; }
}
