/* ============================================
   熊猫体育 (PANDA SPORTS) - 主样式表
   风格：现代体育 · 渐变Banner · 毛玻璃 · 暗色模式
   ============================================ */

/* ---------- CSS变量 & 重置 ---------- */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent-hover: #ff6b81;
  --gold: #f5c518;
  --bg: #f4f7fc;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.3);
  --text: #1a1a2e;
  --text-light: #4a4a6a;
  --text-white: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255, 255, 255, 0.2);
  --glass-border: rgba(255, 255, 255, 0.25);
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

/* 暗色模式变量 */
body.dark {
  --bg: #0f0f1a;
  --card-bg: rgba(30, 30, 50, 0.8);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #e0e0f0;
  --text-light: #a0a0c0;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(30, 30, 50, 0.3);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* 全局重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

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

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ---------- 容器 ---------- */
.container, main > section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

/* ---------- 渐变Banner (Hero) ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: var(--text-white);
  overflow: hidden;
  padding: 120px 24px;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(233,69,96,0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(245,197,24,0.1) 0%, transparent 50%);
  pointer-events: none;
}
#hero > div {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
#hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}
#hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
#hero a[role="button"] {
  display: inline-block;
  padding: 16px 48px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(233,69,96,0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}
#hero a[role="button"]:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(233,69,96,0.6);
}

/* ---------- 标题通用 ---------- */
section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}
section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
  margin-top: 8px;
}

/* ---------- 圆角卡片 + 毛玻璃 ---------- */
.card, article, blockquote, #services article, #insights article, #faq dl > div, #advantages ul li, .testimonial-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.card:hover, article:hover, #services article:hover, #insights article:hover, blockquote:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* ---------- 导航栏 ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
  background: transparent;
}
body.dark header {
  background: rgba(15,15,26,0.9);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}
nav > div:first-child a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 1px;
}
nav > div:first-child a span {
  background: linear-gradient(90deg, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
}
nav ul a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition), transform var(--transition);
  position: relative;
}
nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
nav ul a:hover::after, nav ul a.active::after { width: 100%; }
nav ul a:hover { color: #fff; }
nav ul a.active { color: var(--accent); }

/* 导航按钮 */
#themeToggle, #mobileMenuBtn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #fff;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#themeToggle:hover, #mobileMenuBtn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
#mobileMenuBtn { display: none; }

/* ---------- About / Story ---------- */
#about, #story {
  text-align: center;
}
#about p, #story p {
  max-width: 800px;
  margin: 0 auto 16px;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ---------- Services (核心服务) ---------- */
#services > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
#services article {
  text-align: center;
}
#services article h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}
#services article p {
  color: var(--text-light);
}

/* ---------- Advantages ---------- */
#advantages ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
#advantages ul li {
  padding: 20px 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent);
}
#advantages ul li::before {
  content: '🏆';
  font-size: 1.5rem;
}

/* ---------- Testimonials ---------- */
#testimonials {
  text-align: center;
}
#testimonials blockquote {
  max-width: 700px;
  margin: 24px auto;
  font-style: italic;
  position: relative;
  padding-left: 40px;
}
#testimonials blockquote::before {
  content: '"';
  font-size: 3rem;
  color: var(--accent);
  position: absolute;
  left: 12px;
  top: -8px;
  opacity: 0.5;
}
#testimonials blockquote footer {
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Insights (资讯) ---------- */
#insights > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
#insights article {
  display: flex;
  flex-direction: column;
}
#insights article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
#insights article p {
  color: var(--text-light);
  flex: 1;
  margin-bottom: 12px;
}
#insights article time {
  font-size: 0.85rem;
  color: var(--text-light);
  opacity: 0.7;
  margin-bottom: 8px;
}
#insights article a {
  align-self: flex-start;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- FAQ (折叠) ---------- */
#faq dl {
  max-width: 800px;
  margin: 0 auto;
}
#faq dl > div {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
#faq dt button {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}
#faq dt button::after {
  content: '+';
  font-size: 1.6rem;
  font-weight: 300;
  transition: transform var(--transition);
  color: var(--accent);
}
#faq dt button[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
#faq dt button:hover { color: var(--accent); }
#faq dd {
  padding: 0 24px 18px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---------- HowTo ---------- */
#howto ol {
  max-width: 700px;
  margin: 24px auto 0;
  counter-reset: step;
}
#howto ol li {
  counter-increment: step;
  padding: 16px 20px 16px 60px;
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 1rem;
  transition: transform var(--transition);
}
#howto ol li:hover { transform: translateX(6px); }
#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
#contact address {
  font-style: normal;
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
#contact address p {
  margin-bottom: 12px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
#contact address p strong {
  min-width: 100px;
  color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 40px 24px;
  text-align: center;
}
footer a { color: var(--gold); }
footer a:hover { color: #fff; }
footer nav ul {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 20px 0;
  flex-wrap: wrap;
}
footer p {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ---------- 返回顶部 ---------- */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233,69,96,0.4);
  transition: transform var(--transition), opacity var(--transition);
  display: none;
  z-index: 999;
}
#backToTop:hover {
  transform: scale(1.1) translateY(-4px);
}

/* ---------- 滚动动画 (Intersection Observer 配合) ---------- */
section {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s ease forwards;
}
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  main > section { padding: 60px 20px; }
  #hero { min-height: 80vh; padding: 100px 20px; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }
  header { padding: 0 16px; }
  nav ul {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(26,26,46,0.98);
    backdrop-filter: blur(20px);
    padding: 20px 16px;
    gap: 16px;
    transform: translateY(-120%);
    transition: transform 0.4s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  nav ul.active { transform: translateY(0); }
  #mobileMenuBtn { display: flex; }
  #hero h1 { font-size: 2.2rem; }
  #hero p { font-size: 1rem; }
  #services > div { grid-template-columns: 1fr; }
  #advantages ul { grid-template-columns: 1fr; }
  #insights > div { grid-template-columns: 1fr; }
  #testimonials blockquote { padding-left: 24px; }
  #faq dt button { font-size: 0.95rem; padding: 14px 16px; }
  #faq dd { padding: 0 16px 14px; }
  #contact address { padding: 24px 16px; }
  footer nav ul { gap: 16px; flex-direction: column; align-items: center; }
  #backToTop { bottom: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  #hero { min-height: 70vh; padding: 80px 16px; }
  #hero h1 { font-size: 1.8rem; }
  #hero a[role="button"] { padding: 14px 32px; font-size: 1rem; }
  section h2 { font-size: 1.5rem; }
  .card, article, blockquote { padding: 20px 16px; }
}

/* ---------- 暗色模式微调 ---------- */
body.dark #hero {
  background: linear-gradient(135deg, #0a0a14 0%, #12122a 50%, #1a1a3e 100%);
}
body.dark #hero h1 {
  background: linear-gradient(90deg, #e0e0f0, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.dark nav ul a { color: rgba(255,255,255,0.7); }
body.dark nav ul a:hover { color: #fff; }
body.dark #howto ol li { background: rgba(30,30,50,0.6); }
body.dark footer { background: #0a0a14; }

/* ---------- 其他辅助 ---------- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }