/* ============================================================
   FIFA World Cup 2026 – Theme Overlay CSS
   fifa-theme.css — Layered on top of styles.css
   ============================================================ */

/* ── Background Canvas ─────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── FIFA 2026 Rainbow Gradient ─────────────────────────────── */
:root {
  --fifa-rainbow: linear-gradient(
    90deg,
    #e53e3e 0%,
    #ed8936 14%,
    #ecc94b 28%,
    #48bb78 42%,
    #4299e1 57%,
    #805ad5 71%,
    #d53f8c 85%,
    #e53e3e 100%
  );
  --fifa-rainbow-soft: linear-gradient(
    90deg,
    rgba(229,62,62,0.8) 0%,
    rgba(237,137,54,0.8) 14%,
    rgba(236,201,75,0.8) 28%,
    rgba(72,187,120,0.8) 42%,
    rgba(66,153,225,0.8) 57%,
    rgba(128,90,213,0.8) 71%,
    rgba(213,63,140,0.8) 85%,
    rgba(229,62,62,0.8) 100%
  );
}

/* ── Sidebar Logo Overhaul ──────────────────────────────────── */
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,48,135,0.4) 0%, rgba(10,26,61,0.8) 100%);
  position: relative;
  overflow: hidden;
}

.sidebar-logo::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--fifa-rainbow);
  background-size: 200% 100%;
  animation: rainbow-slide 3s linear infinite;
}

@keyframes rainbow-slide {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

.logo-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-trophy {
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1a0a00, #2d1600);
  border-radius: 12px;
  border: 1px solid rgba(245,197,24,0.4);
  animation: trophy-pulse 3s ease infinite;
  box-shadow: 0 0 12px rgba(245,197,24,0.2);
  position: relative;
  z-index: 1;
}

.logo-icon-ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: var(--fifa-rainbow);
  background-size: 200% 100%;
  animation: rainbow-slide 2s linear infinite;
  z-index: 0;
}

.logo-icon-wrap .logo-trophy { position: relative; z-index: 1; }

@keyframes trophy-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

.logo-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 900;
  color: #f0f4ff;
  letter-spacing: 2px;
}

.logo-title-ai {
  background: var(--fifa-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 10px;
  color: rgba(245,197,24,0.8);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.host-flags {
  font-size: 16px;
  margin-top: 4px;
  letter-spacing: 3px;
  opacity: 0.9;
}

/* ── Sidebar Footer Badge ───────────────────────────────────── */
.sidebar-fifa-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.fifa-badge-text {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.fifa-badge-gem {
  font-size: 12px;
  font-weight: 700;
  background: var(--fifa-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200%;
  animation: rainbow-slide 3s linear infinite;
}

/* ── Host Cities Ticker ─────────────────────────────────────── */
.host-ticker {
  display: flex;
  align-items: center;
  height: 36px;
  background: rgba(0,48,135,0.4);
  border: 1px solid var(--border-blue);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.host-ticker::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 2s linear infinite;
}

.host-ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(0,48,135,0.3);
}

.host-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.host-ticker-inner {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
  padding: 0 20px;
}

.host-ticker-inner span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── FIFA 2026 Hero Banner ──────────────────────────────────── */
.fifa-hero {
  background: linear-gradient(135deg, 
    #000d2e 0%, 
    #003087 30%,
    #001a5c 60%,
    #0d0024 100%
  ) !important;
  border: 1px solid rgba(0,80,200,0.4);
  border-radius: 24px;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  box-shadow: 
    0 0 60px rgba(0,80,200,0.2),
    0 0 120px rgba(200,16,46,0.05),
    0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  align-items: stretch;
  min-height: 260px;
}

/* Rainbow top border */
.fifa-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 3s linear infinite;
  z-index: 5;
}

/* Subtle grid overlay */
.fifa-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.fifa-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-ball {
  position: absolute;
  font-size: 80px;
  opacity: 0.04;
  user-select: none;
}

.hero-ball-1 {
  top: -20px; right: 200px;
  animation: float-ball 8s ease-in-out infinite;
}

.hero-ball-2 {
  bottom: -30px; right: 80px;
  font-size: 120px;
  animation: float-ball 10s ease-in-out infinite reverse;
}

.hero-ball-3 {
  top: 20px; right: 20px;
  font-size: 50px;
  animation: float-ball 6s ease-in-out infinite 2s;
}

@keyframes float-ball {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-20px) rotate(30deg); }
}

.fifa-hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.fifa-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow-flag {
  font-size: 20px;
  animation: flag-wave 2s ease infinite;
  display: inline-block;
}

.eyebrow-flag:nth-child(2) { animation-delay: 0.3s; }
.eyebrow-flag:nth-child(3) { animation-delay: 0.6s; }

@keyframes flag-wave {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

.eyebrow-text {
  font-size: 11px;
  font-weight: 700;
  color: rgba(245,197,24,0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-left: 4px;
}

.fifa-hero-wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.wm-fifa {
  font-family: 'Orbitron', sans-serif;
  font-size: 42px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(255,255,255,0.2);
}

.wm-wc {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 3px;
  align-self: center;
}

.wm-year {
  font-family: 'Orbitron', sans-serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  background: var(--fifa-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200%;
  animation: rainbow-slide 3s linear infinite;
}

.fifa-hero-tagline {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 1px;
}

.fifa-hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.gemini-label {
  background: linear-gradient(90deg, #4285F4, #EA4335, #FBBC05, #34A853);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-meta-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-accent);
}

.hero-meta-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Trophy side panel */
.fifa-hero-trophy {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, rgba(200,16,46,0.15) 0%, rgba(245,197,24,0.08) 100%);
  border-left: 1px solid rgba(255,255,255,0.06);
}

.trophy-emoji {
  font-size: 72px;
  animation: trophy-float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(245,197,24,0.5));
  position: relative;
  z-index: 1;
}

@keyframes trophy-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.05); }
}

.trophy-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(245,197,24,0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 2s ease infinite;
}

/* ── FIFA Scoreboard ─────────────────────────────────────────── */
.fifa-scoreboard {
  background: linear-gradient(135deg, #001a5c 0%, #000d2e 100%) !important;
  border: 1px solid rgba(0,80,200,0.3) !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}

.scoreboard-rainbow {
  height: 4px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 2s linear infinite;
}

.scoreboard-inner {
  padding: 20px 24px;
}

.scoreboard-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,16,46,0.2);
  border: 1px solid rgba(200,16,46,0.4);
  color: #ff6b80;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.match-stage {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex: 1;
}

.match-clock {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-accent);
  background: rgba(245,197,24,0.1);
  border: 1px solid rgba(245,197,24,0.2);
  padding: 2px 10px;
  border-radius: 6px;
}

.scoreboard-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.team-flag-xl {
  font-size: 44px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  animation: flag-wave 3s ease infinite;
}

.team-name-xl {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
}

.team-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: white;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.score-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.vs-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
}

.period-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scoreboard-venue {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.3px;
}

/* ── Topbar FIFA styling ─────────────────────────────────────── */
.topbar {
  border-bottom-color: rgba(0,80,200,0.3) !important;
  background: rgba(2,8,24,0.95) !important;
  position: relative;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 4s linear infinite;
  opacity: 0.4;
}

/* ── Nav Item FIFA active state ──────────────────────────────── */
.nav-item.active::before {
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 2s linear infinite;
  width: 3px;
}

/* ── Card FIFA hover ─────────────────────────────────────────── */
.card:hover {
  border-color: rgba(0,80,200,0.5);
  box-shadow: 
    0 0 0 1px rgba(0,80,200,0.2),
    0 8px 24px rgba(0,0,0,0.5),
    0 0 20px rgba(0,80,200,0.1);
}

/* ── Section headers with rainbow underline ─────────────────── */
.section-title {
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px;
  height: 2px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 2s linear infinite;
  border-radius: 2px;
}

/* ── Stat card hover effects ─────────────────────────────────── */
.stat-card:hover .stat-value {
  background: var(--fifa-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200%;
  animation: rainbow-slide 2s linear infinite;
}

/* ── Button gold FIFA ────────────────────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, #c8901a, #f5c518, #ffd84d, #f5c518, #c8901a);
  background-size: 200%;
  animation: shimmer-gold 3s ease infinite;
}

@keyframes shimmer-gold {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}

/* ── FIFA gradient divider ───────────────────────────────────── */
.fifa-divider {
  height: 2px;
  background: var(--fifa-rainbow);
  background-size: 200%;
  animation: rainbow-slide 3s linear infinite;
  border-radius: 2px;
  margin: 24px 0;
  opacity: 0.4;
}

/* ── Scrollbar FIFA themed ───────────────────────────────────── */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #003087, #0050c8) !important;
}

/* ── Chat bubble AI accent ───────────────────────────────────── */
.chat-bubble.ai .chat-avatar {
  background: linear-gradient(135deg, rgba(0,80,200,0.3), rgba(200,16,46,0.15)) !important;
  border-color: rgba(245,197,24,0.4) !important;
}

/* ── Badge LIVE pulse ────────────────────────────────────────── */
.badge-live {
  animation: live-pulse 1.5s ease infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ── AI Response panel FIFA ──────────────────────────────────── */
.ai-response-panel::before {
  background: var(--fifa-rainbow) !important;
  background-size: 200% !important;
  animation: rainbow-slide 3s linear infinite !important;
}

/* ── Topbar Clock FIFA ───────────────────────────────────────── */
.topbar-clock {
  background: rgba(0,48,135,0.3) !important;
  border-color: rgba(0,80,200,0.4) !important;
  color: #90b8ff !important;
  font-size: 12px !important;
}

/* ── Host cities vertical strip on sidebar ───────────────────── */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,80,200,0.4) 20%,
    rgba(245,197,24,0.2) 50%,
    rgba(200,16,46,0.2) 80%,
    transparent 100%
  );
}

/* ── Background radial overlays ──────────────────────────────── */
body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,80,200,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(200,16,46,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 10%, rgba(245,197,24,0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 90%, rgba(128,90,213,0.04) 0%, transparent 50%) !important;
}

/* ── Particle confetti effect on body ───────────────────────── */
@keyframes particle-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Progress bars FIFA ──────────────────────────────────────── */
.progress-bar-fill.blue {
  background: linear-gradient(90deg, #003087, #0050c8, #003087);
  background-size: 200%;
  animation: shimmer 2s ease infinite;
}

/* ── Live Match List Styles ─────────────────────────────────── */
.match-list-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s ease;
}

.match-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 80, 200, 0.4);
  transform: translateY(-2px);
}

.match-live {
  border-color: rgba(200, 16, 46, 0.4);
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.1);
}

.ml-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ml-flag {
  font-size: 22px;
}

.ml-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.ml-teams .ml-name:first-of-type {
  text-align: right;
}

.ml-teams .ml-name:last-of-type {
  text-align: left;
}

.ml-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-accent);
  background: rgba(245, 197, 24, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
}

.ml-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
}

.ml-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 4px;
}

.ml-venue {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Live News Feed Styles ──────────────────────────────────── */
.news-feed-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.news-item {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 197, 24, 0.3);
  transform: translateY(-1px);
}

.news-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.news-headline {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #f0f4ff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

