/* ===== 球速体育 style.css ===== */
/* 完整内联CSS，包含所有UI、交互、动画、暗色模式及响应式 */

/* ---------- CSS Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

:root {
  --primary: #0b1a2e;
  --primary-light: #1a3b5c;
  --accent: #f0c040;
  --accent-hover: #d9a830;
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --text: #1e293b;
  --text-muted: #475569;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --shadow: 0 8px 20px rgba(0,0,0,0.04);
  --glass-bg: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.3);
  --radius: 24px;
  --radius-sm: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --card-bg: #1e293b;
  --shadow: 0 8px 20px rgba(0,0,0,0.4);
  --glass-bg: rgba(15,23,42,0.6);
  --glass-border: rgba(255,255,255,0.1);
  background: #0f172a;
  color: #e2e8f0;
}

/* ---------- Container ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--accent);
  padding: 8px 16px;
  z-index: 100;
  border-radius: 8px;
  font-weight: 600;
  color: #0b1a2e;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 8px;
}

/* ---------- Header & Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

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

.logo {
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-light);
  transition: color 0.3s;
}
.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 32px;
}
nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s, transform 0.2s;
  font-size: 1rem;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
nav a:hover {
  color: var(--accent-hover);
  transform: translateY(-1px);
}
nav a:hover::after {
  width: 100%;
}

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

.dark-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.dark-toggle:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.2s;
}
.mobile-menu-btn:hover {
  transform: scale(1.1);
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 80px;
  background: linear-gradient(145deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(240,192,64,0.08) 0%, transparent 50%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(5%, 5%); }
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1 1 400px;
  animation: fadeInUp 0.8s ease-out;
}
.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-text h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #f0c040, #d9a830);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 60px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
}
.btn:hover::after {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
}

.btn-primary {
  background: var(--primary-light);
  color: white;
}
.btn-primary:hover {
  background: #0f2a44;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,59,92,0.3);
}

.btn-outline {
  border: 2px solid var(--primary-light);
  color: var(--primary-light);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,59,92,0.2);
}

.hero-visual {
  flex: 1 1 300px;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.2s both;
}
.hero-visual svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.08));
  transition: filter 0.3s, transform 0.3s;
}
.hero-visual svg:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.12));
}

/* ---------- Section ---------- */
section {
  padding: 60px 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out 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-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-sub {
  color: var(--text-muted);
  margin-top: -20px;
  margin-bottom: 40px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text);
}
.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: inline-block;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion {
  border-bottom: 1px solid var(--border);
}
.accordion-item {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.accordion-item:hover {
  background: rgba(240,192,64,0.03);
}

.accordion-btn {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 18px 0;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  color: var(--text);
  transition: color 0.2s;
}
.accordion-btn:hover {
  color: var(--accent-hover);
}
.accordion-btn::after {
  content: '+';
  font-size: 1.6rem;
  transition: transform 0.3s, color 0.2s;
  color: var(--accent);
}
.accordion-item.open .accordion-btn::after {
  content: '−';
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  padding: 0 8px;
}
.accordion-panel p {
  padding-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.7;
}
.accordion-item.open .accordion-panel {
  max-height: 240px;
}

/* ---------- HowTo ---------- */
.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
  transition: transform 0.2s;
}
.howto-step:hover {
  transform: translateX(4px);
}

.step-num {
  background: var(--primary-light);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.3s, transform 0.3s;
}
.howto-step:hover .step-num {
  background: var(--accent);
  color: #0b1a2e;
  transform: scale(1.1);
}

.step-content h4 {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.step-content p {
  color: var(--text-muted);
}

/* ---------- Article List ---------- */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  border-color: var(--accent);
}
.article-card h4 {
  margin-bottom: 8px;
  color: var(--text);
}
.article-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.article-card a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-card a::after {
  content: '→';
  transition: transform 0.2s;
}
.article-card a:hover {
  color: var(--accent-hover);
  gap: 8px;
}
.article-card a:hover::after {
  transform: translateX(4px);
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand h4 {
  font-size: 1.3rem;
  color: var(--text);
}
.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  margin-top: 12px;
}

.footer-links h5 {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-links a:hover {
  color: var(--accent-hover);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 48px;
  background: var(--primary-light);
  color: white;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  z-index: 99;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.back-to-top.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.3s ease-out;
}
.back-to-top:hover {
  background: var(--accent);
  color: #0b1a2e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240,192,64,0.4);
}

/* ---------- Scroll Spy ---------- */
.scroll-spy-indicator {
  position: fixed;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.scroll-spy-indicator a {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 12px;
  background: var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-spy-indicator a.active {
  background: var(--accent);
  height: 28px;
  width: 14px;
  border-radius: 8px;
}
.scroll-spy-indicator a:hover {
  background: var(--accent-hover);
  transform: scale(1.3);
}

/* ---------- Utility & Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entity image placeholder */
.entity-img {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

/* Glass effect for specific sections */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: background 0.3s, border-color 0.3s;
}

/* Gradient banner effect for sections */
section:nth-child(odd):not(#products):not(#knowledge):not(#contact) {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

/* Hover lift for any interactive element */
.hover-lift {
  transition: transform 0.3s, box-shadow 0.3s;
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Smooth scroll for anchor links */
html {
  scroll-padding-top: 80px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-text h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  nav.open {
    display: flex;
    animation: fadeInUp 0.3s ease-out;
  }
  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 40px 0 60px;
  }
  .hero-text h1 {
    font-size: 1.8rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    text-align: center;
  }

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

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

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

  .scroll-spy-indicator {
    display: none;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  #knowledge > .container > div {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero-text h1 {
    font-size: 1.5rem;
  }
  .logo {
    font-size: 1.3rem;
  }
  .dark-toggle {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
}

/* ---------- Dark Mode Specific Overrides ---------- */
body.dark .card {
  background: var(--card-bg);
}
body.dark .btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}
body.dark .btn-outline:hover {
  background: var(--accent);
  color: #0b1a2e;
}
body.dark .logo {
  color: var(--accent);
}
body.dark .logo span {
  color: #f0c040;
}
body.dark .hero-visual svg text {
  fill: #e2e8f0;
}
body.dark .hero-visual svg path {
  fill: var(--accent);
}
body.dark .hero-visual svg circle {
  opacity: 0.3;
}

/* ---------- Print ---------- */
@media print {
  header, .back-to-top, .scroll-spy-indicator, .mobile-menu-btn {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}