/* ===== 星空体育官网 style.css ===== */
/* 全局重置与变量 */
:root {
  --primary: #1a1a2e;
  --secondary: #e94560;
  --accent: #0f3460;
  --bg: #f8f9fa;
  --text: #2d3436;
  --glass: rgba(255, 255, 255, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --primary: #0d0d1a;
  --secondary: #ff6b81;
  --accent: #16213e;
  --bg: #121212;
  --text: #e0e0e0;
  --glass: rgba(255, 255, 255, 0.05);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo svg {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle,
.menu-toggle,
.search-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition);
}

.theme-toggle:hover,
.menu-toggle:hover,
.search-btn:hover {
  background: var(--glass);
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
}

.hero-slider {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.8s ease;
}

.hero-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.hero-content {
  text-align: center;
  color: #fff;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

.hero-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 5;
}

.hero-nav button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
}

.hero-nav button.active {
  background: #fff;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

/* ===== 通用section ===== */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: #666;
  margin-top: 10px;
}

[data-theme="dark"] .section-title p {
  color: #aaa;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 30px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.card-icon {
  margin-bottom: 15px;
}

.card-icon svg {
  width: 48px;
  height: 48px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card p {
  color: #666;
  font-size: 0.95rem;
}

[data-theme="dark"] .card p {
  color: #aaa;
}

/* ===== 数据展示 ===== */
.stats {
  background: var(--primary);
  color: #fff;
}

.stats .grid-4 {
  text-align: center;
}

.stat-item h3 {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--secondary);
}

.stat-item p {
  font-size: 1rem;
  opacity: 0.8;
}

/* ===== 评价 ===== */
.testimonial-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card .stars {
  color: #f1c40f;
  margin-bottom: 10px;
}

.testimonial-card h4 {
  margin-top: 15px;
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq-question span {
  transition: transform var(--transition);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding-top: 0;
  color: #666;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 15px;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

[data-theme="dark"] .faq-answer {
  color: #aaa;
}

/* ===== footer ===== */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 60px 0 30px;
}

.footer .grid-4 {
  gap: 40px;
}

.footer h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer ul li a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 999;
  transition: transform var(--transition);
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  transform: scale(1.1);
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== 搜索模拟 ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  font-size: 1.1rem;
  background: transparent;
  color: var(--text);
}

.search-box input:focus {
  outline: none;
}

.search-close {
  margin-top: 15px;
  text-align: center;
  cursor: pointer;
  color: var(--secondary);
}

/* ===== 图片懒加载占位 ===== */
.lazy-svg {
  min-height: 100px;
  background: var(--glass);
  border-radius: 8px;
}

/* ===== 其他辅助 ===== */
/* 面包屑等 */
nav.container {
  padding-top: 20px;
  font-size: 0.9rem;
  color: #888;
}

/* 针对部分section背景 */
.section[style*="background: var(--glass)"] {
  background: var(--glass);
}