/* =====================================================
   2026 FIFA WORLD CUP — Main Stylesheet
   Theme : Dark Tech Sports + Glassmorphism
   Author: Claude Code
   ===================================================== */

/* ── Design Tokens ─────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-primary:    #0B0E14;
  --bg-secondary:  #131824;

  /* Glass */
  --glass-bg:           rgba(255, 255, 255, 0.04);
  --glass-bg-hover:     rgba(255, 255, 255, 0.07);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(212, 175, 55, 0.35);

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted:     rgba(255, 255, 255, 0.28);

  /* Accent Palette */
  --gold:       #D4AF37;
  --gold-light: #F0CC5A;
  --gold-glow:  rgba(212, 175, 55, 0.15);
  --green:      #00E676;
  --green-glow: rgba(0, 230, 118, 0.15);
  --blue:       #4A90D9;
  --blue-glow:  rgba(74, 144, 217, 0.15);

  /* Shadows */
  --shadow-card:       0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.55),
                       0 0 28px rgba(212, 175, 55, 0.07);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Easing */
  --ease: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-fast: all 0.18s ease;

  /* Layout */
  --nav-h:   68px;
  --max-w:   1160px;
  --pad:     24px;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Custom Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold), #7D5A00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  gap: 4px;
  list-style: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: 4px;
}
.nav-item a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--ease);
  white-space: nowrap;
}
.nav-item a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav-item a.active {
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.06));
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 88px var(--pad) 72px;
  overflow: hidden;
}

/* Multi-layer gradient glow background */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 65% at 50% -5%,
      rgba(212, 175, 55, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 15% 90%,
      rgba(74, 144, 217, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 90%,
      rgba(0, 230, 118, 0.05) 0%, transparent 55%);
  pointer-events: none;
}

/* Subtle grid pattern */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%,
    black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%,
    black 0%, transparent 75%);
}

.hero-badge {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}
.hero-badge .pulse-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulseGold 2s ease-in-out infinite;
}

.hero-title {
  position: relative; z-index: 1;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
  animation: fadeInUp 0.7s ease 0.1s both;
}
.hero-title .highlight {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 45%, var(--gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

.hero-subtitle {
  position: relative; z-index: 1;
  margin-top: 18px;
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-subtitle .hl { color: var(--gold); font-weight: 600; }

/* ── Countdown ─────────────────────────────────────── */
.countdown {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 52px;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 82px;
  padding: 20px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--ease);
}
.cd-item:hover {
  border-color: rgba(212, 175, 55, 0.2);
  background: var(--glass-bg-hover);
}

.cd-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.cd-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cd-sep {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.55;
  margin-top: -16px;
  animation: blink 1.6s ease-in-out infinite;
}

/* =====================================================
   SCHEDULE SECTION
   ===================================================== */
.schedule-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px var(--pad) 96px;
}

/* ── Filter Bar ────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.filter-bar h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  flex: 1;
  min-width: 180px;
}

.tab-group {
  display: flex;
  gap: 5px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: 5px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.tab-btn.active {
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.06));
  color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.08);
}

/* ── Section Headers ───────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 44px 0 18px;
  animation: fadeIn 0.4s ease both;
}
.section-header:first-of-type { margin-top: 0; }

.section-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.section-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--glass-border), transparent);
}
.section-header .count-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 3px 11px;
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Matches Grid ──────────────────────────────────── */
.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Match Card ────────────────────────────────────── */
.match-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  transition: var(--ease);
  animation: slideUp 0.4s ease both;
}
.match-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Card top row */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.card-group-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.card-group-tag .dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

/* ── Status Badges ─────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.badge-status.upcoming {
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid rgba(74, 144, 217, 0.22);
}
.badge-status.live {
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(0, 230, 118, 0.28);
}
.badge-status.live .live-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulseGreen 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px var(--green);
}
.badge-status.ended {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Teams Row ─────────────────────────────────────── */
.card-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.team-a { align-items: center; }
.team-b { align-items: center; }

.team-flag {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}
.team-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

/* Center VS / Score */
.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.vs-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.score-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.score-divider {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-muted);
}
/* Live score gets a gold glow */
.badge-status.live ~ .card-teams .score-num {
  color: var(--gold);
}

/* ── Card Footer: meta info ────────────────────────── */
.card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.meta-item .ico { opacity: 0.65; }

/* =====================================================
   LOADING / ERROR STATE
   ===================================================== */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 20px;
  color: var(--text-secondary);
}
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.state-text { font-size: 14px; color: var(--text-muted); }
.retry-btn {
  margin-top: 8px;
  padding: 10px 28px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--r-sm);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--ease);
}
.retry-btn:hover { background: rgba(212, 175, 55, 0.15); }

/* =====================================================
   SCORE PAGE — iframe
   ===================================================== */
.score-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px var(--pad) 96px;
}

.score-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.score-page-head h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.score-page-head p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Refresh button */
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.refresh-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.1);
  transform: translateY(-1px);
}
.refresh-btn:active { transform: translateY(0); }
.refresh-icon { font-size: 16px; display: inline-block; }
.refresh-icon.spinning { animation: spin 0.6s linear; }

/*
  Responsive iframe wrapper.
  overflow: hidden hides iframe scrollbar leaking into the page chrome.
  min-height ensures the content area is fully visible on all screens.
*/
.iframe-shell {
  position: relative;
  width: 100%;
  min-height: 820px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.iframe-shell iframe {
  display: block;
  width: 100%;
  min-height: 820px;
  border: none;
  background: #fff;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 28px var(--pad);
  text-align: center;
}
.footer p { font-size: 12px; color: var(--text-muted); }
.footer .hl { color: var(--gold); }

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes blink {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}
@keyframes pulseGreen {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 5px var(--green); }
  50%       { transform: scale(1.5); box-shadow: 0 0 12px var(--green); }
}
@keyframes pulseGold {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.35); opacity: 0.65; }
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablet */
@media (max-width: 860px) {
  .hero { min-height: 420px; padding: 64px var(--pad) 52px; }
  .countdown { gap: 10px; }
  .cd-item { min-width: 70px; padding: 16px 12px; }
  .cd-num { font-size: 2rem; }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --pad: 16px;
    --nav-h: 60px;
  }

  /* Navbar */
  .brand-sub { display: none; }
  .brand-icon { width: 36px; height: 36px; font-size: 17px; }
  .nav-item a { padding: 7px 13px; font-size: 13px; }

  /* Hero */
  .hero { min-height: 380px; padding: 52px 16px 44px; }
  .hero-subtitle { letter-spacing: 0.1em; }
  .countdown { gap: 7px; }
  .cd-item { min-width: 58px; padding: 13px 9px; }
  .cd-num { font-size: 1.6rem; }
  .cd-sep { font-size: 1.4rem; }

  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .filter-bar h2 { font-size: 1.25rem; }

  /* Match card */
  .match-card { padding: 18px 16px; }
  .card-teams { gap: 10px; }
  .team-flag { font-size: 2.2rem; }
  .team-name { font-size: 0.82rem; }
  .score-num { font-size: 1.8rem; }
  .card-foot { gap: 10px; }
  .meta-item { font-size: 11px; }

  /* Score page */
  .score-page-head { flex-direction: column; }
  .score-page-head h1 { font-size: 1.5rem; }
  .iframe-shell,
  .iframe-shell iframe { min-height: 600px; }

  /* Recommend section */
  .recommend-section { padding: 32px var(--pad) 0; }
}

/* =====================================================
   今日赛事推荐 SECTION
   ===================================================== */
.recommend-section {
  /* 缩窄：比赛程安排（max-w 1160px）明显更窄，居中显示 */
  max-width: 680px;
  margin: 0 auto;
  padding: 52px var(--pad) 0;
}

/* 压低卡片高度：减少内边距 */
.recommend-section .match-card {
  padding: 18px 22px;
}

/* 国旗缩小 → 卡片整体更紧凑 */
.recommend-section .team-flag {
  font-size: 2.3rem;
}

/* 队名略小 */
.recommend-section .team-name {
  font-size: 0.9rem;
}

/* 比分区间距收紧 */
.recommend-section .card-teams {
  gap: 14px;
  margin-bottom: 10px;
}

/* 推荐文字行：增加上下内边距使行高更高 */
.recommend-section .card-foot {
  padding-top: 18px;
  padding-bottom: 8px;
  min-height: 52px;
  align-items: center;
}

/* 推荐文字：前缀灰色 */
.rec-tip-line {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 推荐内容：红色粗体 */
.rec-tip-line span {
  color: #FF3B3B;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

