/* ============================================
   style.css - 皇冠体育官方网站
   版本: 1.0
   作者: AI Design System
   描述: 完整响应式、暗色模式、动画支持
   ============================================ */

/* ===== CSS 变量 / 主题 ===== */
:root {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --primary: #1a1a2e;
  --accent: #ffd700;
  --accent-hover: #e6c200;
  --border: #e0e0f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 12px;
  --max-width: 1200px;
  --nav-height: 70px;
  --footer-bg: #0f0f23;
  --footer-text: #c0c0d0;
  --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.15);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 暗色模式 (通过 js 切换变量，此处提供备用) */
[data-theme="dark"] {
  --bg: #12121a;
  --bg-card: #1e1e30;
  --text: #e0e0f0;
  --text-secondary: #a0a0c0;
  --border: #2a2a40;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --hero-gradient: linear-gradient(135deg, #0a0a14 0%, #10182e 40%, #0a2340 100%);
  --glass-bg: rgba(0,0,0,0.25);
  --glass-border: rgba(255,255,255,0.08);
}

/* ===== 重置 & 基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===== 容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 辅助 ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.btn:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,215,0,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,215,0,0.2);
}

/* ===== 区块 ===== */
.section {
  padding: 80px 0;
  transition: background var(--transition);
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 700px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,215,0,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.card:hover::before {
  opacity: 1;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== 网格 ===== */
.grid {
  display: grid;
  gap: 24px;
}

/* ===== Header / 导航 ===== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26,26,46,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, background var(--transition);
  height: var(--nav-height);
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

#main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

#main-nav a {
  color: #e0e0f0;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

#main-nav a:hover {
  color: var(--accent);
}
#main-nav a:hover::after {
  width: 100%;
}

#theme-toggle {
  background: none;
  border: none;
  color: #ffd700;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 4px;
  transition: transform 0.3s ease;
}
#theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

#mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ===== Hero ===== */
#hero {
  padding: 120px 0 80px;
  background: var(--hero-gradient);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: background var(--transition);
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,215,0,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: heroGlow2 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  100% { transform: translate(-30px, 20px) scale(1.1); opacity: 1; }
}

@keyframes heroGlow2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  100% { transform: translate(20px, -30px) scale(1.2); opacity: 0.8; }
}

#hero .container {
  position: relative;
  z-index: 1;
}

#hero .hero-badge {
  display: inline-block;
  background: rgba(255,215,0,0.15);
  color: #ffd700;
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(255,215,0,0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

#hero h1 span {
  color: #ffd700;
}

#hero p {
  font-size: 1.2rem;
  color: #c0c0e0;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#hero .hero-tags {
  margin-top: 50px;
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  color: #a0a0c0;
  font-size: 0.95rem;
}

/* ===== About 数字卡片 ===== */
#about .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  transition: transform var(--transition);
}

.card:hover .stat-number {
  transform: scale(1.05);
}

/* ===== FAQ ===== */
details {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow var(--transition), background var(--transition);
  overflow: hidden;
}

details[open] {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

details summary {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary span {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

details[open] summary span {
  transform: rotate(45deg);
}

details p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== HowTo 步骤 ===== */
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.step-item:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.step-item:hover .step-number {
  transform: scale(1.1);
}

.step-content h3 {
  font-weight: 700;
  margin-bottom: 4px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Contact ===== */
#contact .contact-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: background var(--transition);
}

.contact-info {
  display: grid;
  gap: 16px;
}

.contact-info div {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.contact-info div:last-child {
  border-bottom: none;
}

.contact-info strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.contact-info span {
  color: var(--text-secondary);
}

/* ===== Footer ===== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 30px;
}

footer a {
  color: #a0a0c0;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-col h4 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #808090;
}

/* ===== 返回顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all var(--transition);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255,215,0,0.4);
}

/* ===== 移动菜单 ===== */
#mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background: rgba(26,26,46,0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  padding: 30px 20px;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

#mobile-menu a {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
  transition: color 0.2s;
}

#mobile-menu a:hover {
  color: var(--accent);
}

/* ===== 滚动动画 (Intersection Observer 配合) ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */

/* 平板 */
@media (max-width: 1024px) {
  #hero h1 {
    font-size: 2.6rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}

/* 手机 */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .card {
    padding: 20px;
  }

  #hero {
    padding: 100px 0 60px;
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero p {
    font-size: 1rem;
  }

  #hero .hero-tags {
    gap: 20px;
    font-size: 0.85rem;
  }

  #main-nav a:not(#theme-toggle):not(#mobile-menu-btn) {
    display: none;
  }

  #mobile-menu-btn {
    display: block;
  }

  #theme-toggle {
    margin-right: 8px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .step-item {
    padding: 16px 18px;
  }

  #contact .contact-card {
    padding: 24px;
  }

  #back-to-top {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    bottom: 20px;
    right: 20px;
  }

  details {
    padding: 12px 16px;
  }

  details summary {
    font-size: 0.95rem;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ===== 打印样式 ===== */
@media print {
  #header,
  #back-to-top,
  #mobile-menu,
  #mobile-menu-btn,
  #theme-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }
}