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

:root {
  --primary: #1a1a2e;
  --secondary: #e94560;
  --accent: #0f3460;
  --light: #f0f0f5;
  --text: #2c2c3a;
  --text-light: #6a6a7a;
  --bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.7);
  --glass: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --primary: #0d0d1a;
  --secondary: #ff6b81;
  --accent: #1a3a5c;
  --light: #1a1a2e;
  --text: #e8e8f0;
  --text-light: #a0a0b0;
  --bg: #12121a;
  --card-bg: rgba(30, 30, 45, 0.7);
  --glass: rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

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

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

/* ===== 渐变动画背景 ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 30%, rgba(233, 69, 96, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(15, 52, 96, 0.06) 0%, transparent 50%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bgFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(2%, 2%) rotate(3deg); }
}

/* ===== 导航栏 ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(26, 26, 46, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] header {
  background: rgba(13, 13, 26, 0.85);
}

header:hover {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

nav a[aria-label="乐竟体育首页"] {
  flex-shrink: 0;
  transition: transform var(--transition);
}

nav a[aria-label="乐竟体育首页"]:hover {
  transform: scale(1.03);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
}

nav ul li a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform var(--transition);
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

nav button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all var(--transition);
  color: rgba(255, 255, 255, 0.8);
}

nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.05);
}

/* ===== 主内容区域 ===== */
main {
  padding-top: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 4rem 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: sectionFadeIn 0.8s ease forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }
section:nth-child(11) { animation-delay: 1.1s; }

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

h1, h2, h3 {
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 2.8rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  border-radius: 4px;
}

[data-theme="dark"] h2 {
  color: var(--text);
}

h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] h3 {
  color: var(--text);
}

p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

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

a:hover {
  color: #ff8a9e;
}

/* ===== Hero 区域 ===== */
#hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 5rem 1.5rem;
  min-height: 80vh;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
  100% { transform: scale(1.2) translate(-20px, 20px); opacity: 1; }
}

#hero > div:first-child {
  flex: 1;
  max-width: 600px;
}

#hero > div:first-child p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

#hero a[role="button"] {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

#hero a[role="button"]:first-of-type {
  background: linear-gradient(135deg, var(--secondary), #ff6b81);
  color: #fff;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

#hero a[role="button"]:first-of-type:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

#hero a[role="button"]:last-of-type {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--secondary);
}

[data-theme="dark"] #hero a[role="button"]:last-of-type {
  color: var(--text);
  border-color: var(--secondary);
}

#hero a[role="button"]:last-of-type:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-3px);
}

#hero > div:last-child {
  flex-shrink: 0;
  animation: heroSvgFloat 4s ease-in-out infinite alternate;
}

@keyframes heroSvgFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

#hero svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 卡片通用 ===== */
#products > div,
#services > div,
#insights > div,
#testimonials > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

article,
blockquote,
details {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

article::before,
blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover::before,
blockquote:hover::before {
  opacity: 1;
}

article:hover,
blockquote:hover,
details:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] article:hover,
[data-theme="dark"] blockquote:hover,
[data-theme="dark"] details:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ===== 评价区域 ===== */
blockquote {
  font-style: italic;
  padding: 2rem;
}

blockquote p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

blockquote footer {
  color: var(--secondary);
  font-weight: 600;
  font-style: normal;
}

/* ===== 优势列表 ===== */
#advantages ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

#advantages ul li {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  transition: all var(--transition);
  font-size: 0.95rem;
}

#advantages ul li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--secondary);
}

#advantages ul li strong {
  color: var(--secondary);
}

/* ===== 资讯区域 ===== */
#insights article h3 a {
  color: var(--primary);
  transition: color var(--transition);
}

[data-theme="dark"] #insights article h3 a {
  color: var(--text);
}

#insights article h3 a:hover {
  color: var(--secondary);
}

#insights time {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ===== FAQ ===== */
details {
  margin-bottom: 0.75rem;
  cursor: pointer;
  padding: 1rem 1.5rem;
}

details summary {
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--transition);
}

[data-theme="dark"] details summary {
  color: var(--text);
}

details summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--secondary);
  transition: transform var(--transition);
}

details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

details p {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* ===== 注册指南 ===== */
#howto ol {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

#howto ol li {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.2rem;
  counter-increment: step;
  position: relative;
  transition: all var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  top: -10px;
  left: -10px;
  width: 32px;
  height: 32px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

#howto ol li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ===== 联系区域 ===== */
address {
  font-style: normal;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

address p {
  margin-bottom: 0.5rem;
}

address a {
  font-weight: 500;
}

/* ===== 页脚 ===== */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer > div {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0;
}

footer nav a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0.5rem;
  font-size: 0.85rem;
  transition: color var(--transition);
}

footer nav a:hover {
  color: var(--secondary);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
  #hero { flex-direction: column; text-align: center; padding: 3rem 1.5rem; }
  #hero > div:first-child { max-width: 100%; }
  #hero a[role="button"] { margin-right: 0.5rem; }
  #hero > div:last-child { margin-top: 1rem; }
  #hero svg { max-width: 300px; }
  #hero::before { display: none; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  nav { padding: 0.5rem 1rem; }
  nav ul { gap: 0; }
  nav ul li a { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  section { padding: 2.5rem 1rem; }
  #hero { padding: 2rem 1rem; min-height: auto; }
  #hero svg { max-width: 220px; }
  #products > div,
  #services > div,
  #insights > div,
  #testimonials > div,
  #advantages ul,
  #howto ol,
  address {
    grid-template-columns: 1fr;
  }
  footer > div {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  nav { flex-wrap: wrap; justify-content: center; }
  nav ul { order: 3; width: 100%; justify-content: center; margin-top: 0.5rem; }
  nav ul li a { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
  h1 { font-size: 1.5rem; }
  #hero a[role="button"] { display: block; width: 100%; margin: 0.5rem 0; text-align: center; }
}

/* ===== 暗色模式切换按钮动画 ===== */
#darkModeToggle svg {
  transition: transform var(--transition);
}

#darkModeToggle:hover svg {
  transform: rotate(30deg);
}

/* ===== 暗色模式下的微调 ===== */
[data-theme="dark"] #hero a[role="button"]:first-of-type {
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

[data-theme="dark"] #hero a[role="button"]:first-of-type:hover {
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.6);
}

[data-theme="dark"] article,
[data-theme="dark"] blockquote,
[data-theme="dark"] details,
[data-theme="dark"] #advantages ul li,
[data-theme="dark"] #howto ol li,
[data-theme="dark"] address {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(30, 30, 45, 0.6);
}

/* ===== 滚动动画（Intersection Observer 备用） ===== */
@media (prefers-reduced-motion: no-preference) {
  section {
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
}