/* ============================================================
   FIFA WORLD CUP THEME SITE — CSS
   ============================================================ */
:root {
  --bg: #0a0e27;
  --bg2: #111535;
  --bg3: #181d45;
  --gold: #ffd700;
  --gold2: #e6b800;
  --gold3: #b8860b;
  --accent: #22c55e;
  --text: #e8e8f0;
  --text2: #a0a0b8;
  --card-bg: rgba(24,29,69,0.85);
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --max-w: 1200px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: 'Noto Sans SC', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAV ===== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(10,14,39,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,215,0,0.15); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--gold); }
.nav-logo:hover { text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 4px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 8px; color: var(--text2); font-size: 14px; font-weight: 600; transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: rgba(255,215,0,0.08); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold); transition: 0.3s; }

/* ===== HERO ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,39,0.7) 0%, rgba(10,14,39,0.5) 50%, rgba(10,14,39,0.95) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 80px 24px 40px; }
.hero-trophy-wrap { margin: 0 auto 24px; width: 180px; animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.hero-trophy { filter: drop-shadow(0 0 40px rgba(255,215,0,0.4)); }
.hero-title { margin-bottom: 16px; }
.hero-title-en { display: block; font-family: 'Playfair Display', serif; font-size: clamp(36px,7vw,72px); font-weight: 900; color: var(--gold); letter-spacing: 6px; text-shadow: 0 2px 20px rgba(255,215,0,0.3); }
.hero-title-cn { display: block; font-size: clamp(22px,4vw,42px); font-weight: 700; letter-spacing: 12px; margin-top: 8px; }
.hero-subtitle { font-size: clamp(14px,2vw,18px); color: var(--text2); max-width: 600px; margin: 0 auto 40px; line-height: 1.8; }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: clamp(32px,5vw,52px); font-weight: 900; color: var(--gold); font-family: 'Playfair Display', serif; }
.hero-stat-label { display: block; font-size: 13px; color: var(--text2); margin-top: 4px; }
.hero-mascot { width: 120px; margin: 20px auto 0; animation: float 5s ease-in-out infinite 1s; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; max-width: var(--max-w); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(24px,4vw,38px); font-weight: 900; color: var(--gold); }
.section-header h2 small { display: block; font-size: 14px; color: var(--text2); font-weight: 400; margin-top: 4px; }
.section-header p { color: var(--text2); margin-top: 8px; font-size: 15px; }

/* ===== SHIELD GRID ===== */
.shield-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.shield-card { display: flex; align-items: center; gap: 16px; background: var(--card-bg); border: 1px solid rgba(255,215,0,0.15); border-radius: var(--radius); padding: 16px; transition: transform 0.3s, box-shadow 0.3s; }
.shield-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shield-card img { width: 80px; flex-shrink: 0; }
.shield-info strong { display: block; color: var(--gold); font-size: 16px; }
.shield-info span { font-size: 13px; color: var(--text2); line-height: 1.5; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold), var(--gold3)); }
.tl-item { position: relative; margin-bottom: 28px; opacity: 0; transform: translateX(-20px); transition: all 0.5s; }
.tl-item.visible { opacity: 1; transform: translateX(0); }
.tl-item::before { content: ''; position: absolute; left: -26px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); z-index: 1; }
.tl-item.world-cup::before { box-shadow: 0 0 12px rgba(255,215,0,0.6); }
.tl-year { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--gold); }
.tl-host { font-size: 13px; color: var(--text2); margin-left: 8px; }
.tl-champ { font-weight: 700; color: var(--accent); margin-top: 4px; }
.tl-detail { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ===== LEGENDS ===== */
.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.legend-card { background: var(--card-bg); border: 1px solid rgba(255,215,0,0.12); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.legend-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.legend-card img { width: 100%; height: 260px; object-fit: cover; }
.legend-info { padding: 20px; }
.legend-info h3 { font-size: 20px; color: var(--gold); margin-bottom: 4px; }
.legend-info h3 small { color: var(--text2); font-size: 14px; font-weight: 400; }
.legend-country { font-size: 14px; color: var(--accent); margin-bottom: 12px; }
.legend-info ul { list-style: none; }
.legend-info li { font-size: 13px; color: var(--text2); padding: 3px 0; padding-left: 16px; position: relative; }
.legend-info li::before { content: '⚽'; position: absolute; left: 0; font-size: 10px; }

/* ===== VIDEOS ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.video-card { background: var(--card-bg); border: 1px solid rgba(255,215,0,0.1); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-facade { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-facade img { transform: scale(1.05); }
.play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; background: rgba(255,215,0,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #111; box-shadow: 0 4px 20px rgba(0,0,0,0.4); transition: transform 0.3s; }
.video-card:hover .play-btn { transform: translate(-50%,-50%) scale(1.1); }
.video-info { padding: 14px 16px; }
.video-info h4 { font-size: 15px; color: var(--gold); margin-bottom: 4px; }
.video-info p { font-size: 13px; color: var(--text2); }

/* video modal */
.video-modal { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); align-items: center; justify-content: center; }
.video-modal.open { display: flex; }
.video-modal-inner { position: relative; width: 90%; max-width: 900px; aspect-ratio: 16/9; }
.video-modal-frame { width: 100%; height: 100%; border: none; border-radius: 8px; }
.video-modal-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; }

/* ===== GALLERY ===== */
.gallery-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.gallery-tab { padding: 8px 20px; border: 1px solid rgba(255,215,0,0.3); border-radius: 20px; background: transparent; color: var(--text2); font-size: 14px; cursor: pointer; transition: all 0.2s; }
.gallery-tab.active, .gallery-tab:hover { background: var(--gold); color: #111; border-color: var(--gold); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; position: relative; transition: transform 0.3s; }
.gallery-item.hidden { display: none; }
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); font-size: 12px; color: #ddd; }
.gallery-caption small { color: #999; }

/* ===== RECORDS ===== */
.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 24px; }
.record-card { background: var(--card-bg); border: 1px solid rgba(255,215,0,0.12); border-radius: var(--radius); padding: 24px; }
.record-card h3 { color: var(--gold); margin-bottom: 16px; font-size: 18px; }
.record-note { font-size: 12px; color: var(--text2); margin-bottom: 16px; }
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 180px; flex-shrink: 0; font-size: 13px; color: var(--text2); text-align: right; }
.bar-track { flex: 1; height: 28px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold3), var(--gold)); border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; transition: width 1.5s ease-out; }
.bar-fill span { font-size: 13px; font-weight: 700; color: #111; }
.record-list { list-style: none; }
.record-list li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; color: var(--text2); line-height: 1.6; }
.record-list strong { color: var(--gold); }

/* ===== 2026 ===== */
.wc2026-hero-card { display: flex; gap: 24px; align-items: center; background: linear-gradient(135deg, var(--bg3), rgba(255,215,0,0.08)); border: 1px solid rgba(255,215,0,0.2); border-radius: var(--radius); padding: 28px; margin-bottom: 32px; }
.wc2026-trophy-shield { width: 100px; flex-shrink: 0; }
.wc2026-hero-card h3 { font-size: 22px; color: var(--gold); margin-bottom: 8px; }
.wc2026-result { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.wc2026-goal { color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.wc2026-detail { font-size: 13px; color: var(--text2); line-height: 1.7; }
.wc2026-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
.wc2026-fact { background: var(--card-bg); border-radius: var(--radius); padding: 16px; border: 1px solid rgba(255,215,0,0.1); }
.wc2026-fact strong { display: block; color: var(--gold); font-size: 14px; margin-bottom: 4px; }
.wc2026-fact span { font-size: 14px; color: var(--text2); }
.wc2026-cities { margin-bottom: 32px; }
.wc2026-cities h4 { color: var(--gold); margin-bottom: 12px; font-size: 16px; }
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.city-chips span { padding: 6px 14px; background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.2); border-radius: 20px; font-size: 13px; color: var(--text2); }
.wc2026-quote { border-left: 3px solid var(--gold); padding-left: 20px; }
.wc2026-quote blockquote { font-style: italic; color: var(--text2); font-size: 15px; }

/* ===== QUIZ ===== */
.quiz-container { max-width: 640px; margin: 0 auto; background: var(--card-bg); border: 1px solid rgba(255,215,0,0.15); border-radius: var(--radius); padding: 32px; }
.quiz-progress { display: flex; gap: 8px; margin-bottom: 24px; justify-content: center; }
.quiz-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: background 0.3s; }
.quiz-dot.active { background: var(--gold); }
.quiz-dot.correct { background: var(--accent); }
.quiz-dot.wrong { background: #ef4444; }
.quiz-question { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--text); text-align: center; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.quiz-option { padding: 14px 18px; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; background: transparent; color: var(--text); font-size: 15px; cursor: pointer; text-align: left; transition: all 0.2s; }
.quiz-option:hover { border-color: var(--gold); background: rgba(255,215,0,0.05); }
.quiz-option.selected { border-color: var(--gold); background: rgba(255,215,0,0.12); }
.quiz-option.correct-answer { border-color: var(--accent); background: rgba(34,197,94,0.15); color: var(--accent); }
.quiz-option.wrong-answer { border-color: #ef4444; background: rgba(239,68,68,0.1); color: #ef4444; }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { text-align: center; font-size: 14px; min-height: 24px; margin-bottom: 12px; }
.quiz-next { display: block; margin: 0 auto; padding: 12px 32px; background: var(--gold); color: #111; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; }
.quiz-next:hover { background: var(--gold2); }
.quiz-result { text-align: center; font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: 16px; }
.quiz-restart { display: block; margin: 0 auto; padding: 10px 28px; background: transparent; border: 1px solid var(--gold); color: var(--gold); border-radius: 8px; font-size: 14px; cursor: pointer; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid rgba(255,215,0,0.12); padding: 40px 24px; text-align: center; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-credits p { font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.footer-notice { margin: 16px 0; padding: 12px 20px; background: rgba(255,215,0,0.05); border-radius: 8px; }
.footer-notice p { font-size: 13px; color: var(--text2); }
.footer-copy { font-size: 12px; color: #666; margin-top: 16px; }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #111; border: none; font-size: 20px; font-weight: 700; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; z-index: 900; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(10,14,39,0.97); flex-direction: column; padding: 16px; border-bottom: 1px solid rgba(255,215,0,0.1); }
  .nav-links.open { display: flex; }
  .hero-trophy-wrap { width: 120px; }
  .hero-stats { gap: 20px; }
  .records-grid { grid-template-columns: 1fr; }
  .bar-label { width: 120px; font-size: 11px; }
  .wc2026-hero-card { flex-direction: column; text-align: center; }
  .legend-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .shield-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
