/* ===== 全局重置与变量 ===== */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent2: #0f3460;
  --accent-gradient: linear-gradient(135deg, #e94560, #0f3460);
  --bg: #f0f2f5;
  --card-bg: rgba(255, 255, 255, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --text: #1a1a2e;
  --text-light: #555;
  --text-white: #fff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d1a;
    --card-bg: rgba(26, 26, 46, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --text: #e0e0e0;
    --text-light: #aaa;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

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

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

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

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

a:hover {
  color: var(--accent2);
}

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

ul, ol {
  list-style: none;
  padding-left: 0;
}

/* ===== 滚动动画 ===== */
section {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s ease forwards;
}

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

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

/* ===== 头部导航 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--glass-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: background var(--transition);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
}

header nav ul li a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 30px;
  transition: all var(--transition);
  position: relative;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all var(--transition);
  transform: translateX(-50%);
}

header nav ul li a:hover {
  color: var(--accent);
  background: rgba(233, 69, 96, 0.08);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ===== Hero Banner 渐变 ===== */
#hero {
  background: var(--accent-gradient);
  color: var(--text-white);
  text-align: center;
  padding: 6rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 10px 40px rgba(233, 69, 96, 0.3);
}

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

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -20px); }
}

#hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

#hero p {
  font-size: 1.2rem;
  max-width: 650px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

#hero a {
  display: inline-block;
  background: var(--text-white);
  color: var(--accent);
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
}

#hero a:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  background: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

/* ===== 通用 section 卡片 ===== */
section:not(#hero) {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

section:not(#hero) h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* 圆角卡片 + 毛玻璃 */
article, section > ul, section > ol, section > p, details, address {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all var(--transition);
}

article:hover, details:hover, section > ul:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

article h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

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

article ul, section ul, section ol {
  padding-left: 1.5rem;
  list-style: disc;
}

article ul li, section ul li, section ol li {
  margin-bottom: 0.4rem;
  color: var(--text);
}

/* details FAQ 样式 */
details {
  cursor: pointer;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

details summary {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.3rem 0;
  color: var(--text);
  outline: none;
}

details summary::-webkit-details-marker {
  color: var(--accent);
}

details[open] {
  background: var(--glass-bg);
  border-color: var(--accent);
}

details p {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  color: var(--text-light);
}

/* 联系地址 */
address p {
  margin-bottom: 0.5rem;
  font-style: normal;
}

/* ===== 底部 ===== */
footer {
  background: var(--primary);
  color: #ccc;
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  border-radius: 30px 30px 0 0;
}

footer nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

footer nav ul li a {
  color: #ccc;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

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

footer p {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* ===== 返回顶部 ===== */
aside {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

aside a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  box-shadow: 0 6px 24px rgba(233, 69, 96, 0.4);
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

aside a:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 10px 40px rgba(233, 69, 96, 0.5);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }

  header nav ul {
    gap: 0.3rem 0.8rem;
  }

  header nav ul li a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  #hero {
    padding: 4rem 1.2rem 3rem;
  }

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

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

  #hero a {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  section:not(#hero) {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  section:not(#hero) h2 {
    font-size: 1.6rem;
  }

  article, section > ul, section > ol, section > p, details, address {
    padding: 1.2rem 1.2rem;
  }

  article h3 {
    font-size: 1.2rem;
  }

  footer {
    padding: 2rem 1rem;
  }

  footer nav ul {
    gap: 0.8rem 1.2rem;
  }

  aside a {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
}

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

  #hero p {
    font-size: 0.9rem;
  }

  #hero a {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  header nav > a {
    font-size: 1.3rem;
  }

  section:not(#hero) h2 {
    font-size: 1.3rem;
  }
}