/* ============================================================
   BOB体育 - 完整样式表 (style.css)
   包含：重置、变量、布局、组件、动画、响应式、暗色模式
   所有样式内联，无外部依赖
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,53,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,159,28,0.06) 0%, transparent 50%);
  transition: background 0.4s, color 0.4s;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, button, textarea {
  font-family: inherit;
  outline: none;
}

/* ---- 自定义属性 (主题) ---- */
:root {
  --bg: #0f0f1a;
  --card-bg: rgba(255,255,255,0.05);
  --glass: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text2: #aaa;
  --accent: #ff6b35;
  --accent2: #ff9f1c;
  --border: rgba(255,255,255,0.1);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --grad: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 暗色模式 (默认即为暗色，但保留切换类) */
body.dark {
  --bg: #0f0f1a;
  --card-bg: rgba(255,255,255,0.05);
  --glass: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text2: #aaa;
  --border: rgba(255,255,255,0.1);
}

/* ---- 布局容器 ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 头部 ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15,15,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s;
}

.logo svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* 导航 */
nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav a {
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--text);
  background: var(--glass);
}

/* 菜单切换按钮 (移动端) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--text);
  border-radius: 4px;
  transition: transform 0.3s, opacity 0.3s;
}

/* 暗色切换按钮 */
.dark-toggle {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dark-toggle:hover {
  background: var(--card-bg);
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--glass);
  border-radius: 30px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}

.search-box:focus-within {
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
}

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

.search-box input::placeholder {
  color: var(--text2);
}

.search-box button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.3s, transform 0.2s;
}

.search-box button:hover {
  background: var(--accent2);
  transform: scale(1.02);
}

/* ---- 英雄区 (Hero) ---- */
.hero {
  padding: 140px 0 80px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,107,53,0.12) 0%, transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(255,159,28,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  background: linear-gradient(to right, #fff, #ff9f1c, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero p {
  font-size: 1.2rem;
  color: var(--text2);
  max-width: 700px;
  margin: 0 auto 36px;
  animation: heroFadeIn 1.2s ease-out;
}

.hero .btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeIn 1.4s ease-out;
}

/* ---- 按钮 ---- */
.btn {
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255,107,53,0.5);
}

.btn-ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--card-bg);
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* ---- Banner 轮播 ---- */
.banner-carousel {
  position: relative;
  margin: 40px auto;
  max-width: 900px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--card-bg);
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.banner-nav button.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ---- 通用段落 ---- */
section {
  padding: 80px 0;
}

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

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- 网格系统 ---- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---- 卡片 ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: var(--accent);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--glass);
}

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

.card p {
  color: var(--text2);
  font-size: 0.95rem;
}

/* ---- 统计数据 ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px;
  background: var(--glass);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s;
}

.stat-item:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  color: var(--text2);
  margin-top: 6px;
  font-size: 0.95rem;
}

/* ---- FAQ ---- */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  user-select: none;
}

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

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 24px;
  color: var(--text2);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* ---- 步骤教程 ---- */
.howto-steps {
  counter-reset: step;
}

.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--accent);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.howto-step:hover::before {
  transform: scale(1.1);
}

.howto-step h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.howto-step p {
  color: var(--text2);
}

/* ---- 文章卡片 ---- */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.article-card .date {
  color: var(--text2);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

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

.article-card p {
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.article-card .read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.article-card .read-more:hover {
  color: var(--accent2);
}

/* ---- 联系网格 ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-item {
  padding: 20px;
  background: var(--glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.contact-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.contact-item svg {
  margin: 0 auto 12px;
  width: 40px;
  height: 40px;
}

.contact-item h4 {
  margin-bottom: 6px;
}

.contact-item p {
  color: var(--text2);
  font-size: 0.9rem;
}

/* ---- 页脚 ---- */
footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 40px;
}

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

footer h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text);
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: var(--text2);
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text2);
}

.footer-bottom a {
  color: var(--text2);
  transition: color 0.3s;
}

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

/* 二维码 */
.qr-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.qr-code {
  background: var(--glass);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  width: 110px;
  transition: transform 0.3s, border-color 0.3s;
  border: 1px solid transparent;
}

.qr-code:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.qr-code svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 6px;
}

.qr-code span {
  font-size: 0.75rem;
  color: var(--text2);
}

/* ---- 回到顶部 ---- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s, transform 0.3s;
  z-index: 999;
}

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

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

/* ---- 滚动动画 (基于 IntersectionObserver 已在JS中实现，此处加一些过渡) ---- */
section {
  opacity: 0;
  transform: translateY(30px);
  animation: sectionFadeIn 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 sectionFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- 响应式设计 ---- */

/* 平板及以下 */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(15,15,26,0.98);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  nav.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

  .search-box {
    max-width: 200px;
  }

  .dark-toggle {
    font-size: 12px;
    padding: 6px 12px;
  }

  .logo {
    font-size: 20px;
  }

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

/* 手机 */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

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

  .btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .card {
    padding: 24px 16px;
  }

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

  .section-title h2 {
    font-size: 1.5rem;
  }

  .howto-step {
    flex-direction: column;
    gap: 12px;
  }

  .howto-step::before {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .faq-question {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 16px;
  }

  .faq-item.open .faq-answer {
    padding: 0 16px 16px;
  }

  .banner-nav button {
    width: 10px;
    height: 10px;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 18px;
    bottom: 20px;
    right: 20px;
  }

  .qr-code {
    width: 90px;
  }

  .qr-code svg {
    width: 64px;
    height: 64px;
  }

  .contact-item {
    padding: 16px;
  }

  .article-card {
    padding: 16px;
  }

  .search-box input {
    width: 80px;
    font-size: 12px;
  }

  .search-box button {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* 小屏手机 (小于360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .logo {
    font-size: 16px;
  }

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

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

  .dark-toggle {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* ---- 辅助工具类 ---- */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* 确保所有交互元素都有平滑过渡 */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* 为毛玻璃效果增加兼容性 */
@supports not (backdrop-filter: blur(20px)) {
  header {
    background: rgba(15,15,26,0.95);
  }
  .card,
  .faq-item,
  .article-card {
    background: rgba(255,255,255,0.08);
  }
}

/* 打印样式 (可选) */
@media print {
  header,
  .back-to-top,
  .banner-nav,
  .menu-toggle,
  .dark-toggle,
  .search-box {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .container {
    max-width: 100%;
  }
  section {
    page-break-inside: avoid;
  }
}