/* ============================================
   2026 World Cup AI Intelligence Hub
   Design System & Global Styles
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, rgba(99,102,241,0.1), rgba(6,182,212,0.05));
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(6,182,212,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(139,92,246,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
a { color: var(--accent-3); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-1); }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 40px 0; }

/* --- Navigation --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 24px;
}
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--text-primary); }
.nav-logo .logo-icon { width: 32px; height: 32px; background: var(--gradient-hero); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text-secondary); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: rgba(99,102,241,0.1); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* --- Hero --- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero .subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; }

/* --- Countdown --- */
.countdown {
  display: flex; gap: 16px; justify-content: center; margin: 32px 0;
}
.countdown-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  min-width: 90px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.countdown-item .number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.countdown-item .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.card:hover { background: var(--bg-card-hover); border-color: rgba(99,102,241,0.2); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1.1rem; font-weight: 700; }

/* --- Team Card --- */
.team-card { cursor: pointer; position: relative; overflow: hidden; }
.team-card .team-flag { font-size: 2.5rem; margin-bottom: 8px; }
.team-card .team-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.team-card .team-group { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.team-card .team-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.team-card .stat { text-align: center; }
.team-card .stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--accent-3); }
.team-card .stat-label { font-size: 0.7rem; color: var(--text-muted); }

/* --- Probability Bar --- */
.prob-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,0.05); margin: 12px 0; }
.prob-bar .home { background: var(--accent-1); transition: width 0.8s ease; }
.prob-bar .draw { background: var(--text-muted); transition: width 0.8s ease; }
.prob-bar .away { background: var(--accent-3); transition: width 0.8s ease; }

.prob-labels { display: flex; justify-content: space-between; font-size: 0.8rem; }
.prob-labels .home-prob { color: var(--accent-1); }
.prob-labels .draw-prob { color: var(--text-muted); }
.prob-labels .away-prob { color: var(--accent-3); }

/* --- Match Card --- */
.match-card { cursor: pointer; }
.match-card .match-teams { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.match-card .team-side { text-align: center; flex: 1; }
.match-card .vs { color: var(--text-muted); font-weight: 700; font-size: 0.9rem; }
.match-card .match-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); justify-content: center; }
.match-card .match-stage { display: inline-block; padding: 2px 10px; background: rgba(99,102,241,0.15); color: var(--accent-1); border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* --- Badge --- */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-gold { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.badge-green { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.badge-blue { background: rgba(99,102,241,0.15); color: var(--accent-1); }

/* --- Confidence Meter --- */
.confidence-meter {
  width: 100%; height: 6px; background: rgba(255,255,255,0.05);
  border-radius: 3px; overflow: hidden; margin: 8px 0;
}
.confidence-meter .fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold), var(--accent-green));
  transition: width 1s ease;
}

/* --- Radar Chart (CSS-only placeholder) --- */
.radar-placeholder {
  width: 200px; height: 200px; margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(
    rgba(99,102,241,0.3) 0deg 60deg,
    rgba(6,182,212,0.3) 60deg 120deg,
    rgba(139,92,246,0.3) 120deg 180deg,
    rgba(16,185,129,0.3) 180deg 240deg,
    rgba(245,158,11,0.3) 240deg 300deg,
    rgba(239,68,68,0.3) 300deg 360deg
  );
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.8rem;
  color: var(--text-primary);
  position: relative;
}
.radar-placeholder::before {
  content: '';
  position: absolute;
  width: 60%; height: 60%;
  border-radius: 50%;
  background: var(--bg-primary);
}
.radar-placeholder span { position: relative; z-index: 1; }

/* --- Stats Row --- */
.stats-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-md); padding: 20px 28px;
  text-align: center; min-width: 140px;
}
.stat-box .stat-number { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.stat-box .stat-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.stat-box.accent-1 .stat-number { color: var(--accent-1); }
.stat-box.accent-2 .stat-number { color: var(--accent-3); }
.stat-box.accent-gold .stat-number { color: var(--accent-gold); }
.stat-box.accent-green .stat-number { color: var(--accent-green); }

/* --- Section --- */
.section { margin: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 1.5rem; font-weight: 800; }
.section-title .highlight { background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-link { font-size: 0.875rem; color: var(--accent-3); font-weight: 500; }

/* --- Table --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-glass); }
table { width: 100%; border-collapse: collapse; }
th { background: rgba(99,102,241,0.1); color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 14px 16px; text-align: left; }
td { padding: 14px 16px; border-top: 1px solid var(--border-glass); font-size: 0.9rem; }
tr:hover td { background: rgba(99,102,241,0.03); }
.rank-col { font-family: var(--font-display); font-weight: 700; color: var(--accent-gold); width: 50px; }

/* --- Bracket Simulator --- */
.bracket { display: flex; gap: 40px; overflow-x: auto; padding: 20px 0; }
.bracket-round { display: flex; flex-direction: column; gap: 20px; min-width: 200px; }
.bracket-round-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; text-align: center; }
.bracket-match {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.bracket-team { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; cursor: pointer; border-radius: 4px; padding: 6px 8px; }
.bracket-team:hover { background: rgba(99,102,241,0.1); }
.bracket-team.winner { color: var(--accent-green); font-weight: 600; }
.bracket-team + .bracket-team { border-top: 1px solid var(--border-glass); }

/* --- Search --- */
.search-box {
  position: relative; max-width: 500px; margin: 0 auto 32px;
}
.search-box input {
  width: 100%; padding: 14px 20px 14px 48px;
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl); color: var(--text-primary);
  font-family: var(--font-body); font-size: 1rem;
  transition: var(--transition);
}
.search-box input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 20px rgba(99,102,241,0.1); }
.search-box input::placeholder { color: var(--text-muted); }
.search-box .search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.1rem; }

/* --- Tabs --- */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; overflow-x: auto; }
.tab {
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); background: transparent;
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; transition: var(--transition);
}
.tab:hover { color: var(--text-primary); background: rgba(99,102,241,0.05); }
.tab.active { color: var(--text-primary); background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); }

/* --- Disclaimer Banner --- */
.disclaimer-banner {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 24px 0;
  display: flex; align-items: flex-start; gap: 12px;
}
.disclaimer-banner .icon { font-size: 1.2rem; flex-shrink: 0; }

/* --- Footer --- */
.footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border-glass);
  padding: 48px 24px 24px;
  margin-top: 60px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 0.85rem; color: var(--text-primary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.85rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent-3); }
.footer-bottom { border-top: 1px solid var(--border-glass); padding-top: 24px; text-align: center; }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); max-width: 800px; margin: 0 auto; line-height: 1.8; }

/* --- Animations --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.animate-in { animation: fadeInUp 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
}
.btn-primary { background: var(--gradient-hero); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(99,102,241,0.3); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-primary); border: 1px solid var(--border-glass); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* --- Detail Page --- */
.detail-hero { padding: 40px 0; }
.detail-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 8px; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.detail-sidebar .card { position: sticky; top: 80px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(10,14,26,0.95); padding: 16px; flex-direction: column; border-bottom: 1px solid var(--border-glass); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .countdown { gap: 8px; }
  .countdown-item { padding: 14px 16px; min-width: 70px; }
  .countdown-item .number { font-size: 1.8rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 12px; }
  .stat-box { min-width: 100px; padding: 14px 18px; }
  .bracket { flex-direction: column; gap: 20px; }
  .hero { padding: 48px 0 32px; }
  .tabs { gap: 2px; }
  .tab { padding: 8px 14px; font-size: 0.8rem; }
}
