/* ============================================
   style.css - 必一运动 Bsports 完整样式表
   包含：渐变Banner、圆角卡片、毛玻璃效果、
   响应式布局、暗色模式、滚动动画、hover动画
   ============================================ */

/* ===== 全局重置与变量 ===== */
:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --card-bg: #f8f9fa;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --accent: #ff6b35;
  --accent2: #1a1a2e;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --radius: 16px;
  --transition: 0.3s ease;
}

.dark {
  --bg: #0d0d1a;
  --text: #e0e0e0;
  --card-bg: #1a1a2e;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --glass: rgba(20, 20, 40, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

a:hover {
  opacity: 0.8;
}

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

ul, ol {
  list-style: none;
}

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

/* ===== 头部导航 ===== */
header {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  -webkit-text-fill-color: var(--accent);
}

nav ul {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--text);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text);
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border-radius: 30px;
  padding: 4px 16px;
  border: 1px solid var(--glass-border);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  width: 140px;
  font-size: 0.9rem;
}

.search-box button {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 0.8rem;
}

.dark-toggle {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: var(--transition);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--card-bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
  margin-top: 70px;
}

.breadcrumb a {
  color: var(--text);
  opacity: 0.7;
}

.breadcrumb span {
  color: var(--accent);
}

/* ===== Hero Banner (渐变) ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
  padding: 100px 20px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 107, 53, 0.15), transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(26, 26, 46, 0.2), transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(10%, 10%); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ===== 圆角卡片 ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--glass-border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.card img {
  border-radius: 12px;
  margin-bottom: 16px;
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #e0e0e0;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ===== 部分标题 ===== */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  text-align: center;
  color: var(--text);
  opacity: 0.7;
  margin-bottom: 50px;
  font-size: 1.05rem;
}

/* ===== 网格布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

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

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

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 18px 0;
  cursor: pointer;
}

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

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding-top: 0;
  color: var(--text);
  opacity: 0.8;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding-top: 14px;
}

/* ===== HowTo 步骤 ===== */
.howto-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.howto-steps li {
  counter-increment: step;
  padding: 16px 0 16px 50px;
  position: relative;
  border-left: 3px solid var(--accent);
  margin-left: 20px;
}

.howto-steps li::before {
  content: counter(step);
  position: absolute;
  left: -20px;
  top: 12px;
  background: var(--accent);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ===== 轮播 ===== */
.carousel {
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  padding: 0 10px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* ===== 数字滚动 ===== */
.count-up {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  display: inline-block;
}

/* ===== 滚动动画 ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

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

/* ===== 页脚 ===== */
footer {
  background: var(--gradient);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px;
  margin-top: 40px;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 20px 0;
    gap: 12px;
  }

  nav ul.open {
    display: flex;
  }

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

  .breadcrumb {
    font-size: 0.8rem;
  }

  .search-box input {
    width: 100px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 50px 0;
  }

  .btn {
    padding: 12px 24px;
  }
}