/* ============================================================
   星辰影院 (qwdhxgm.cn) - 主样式表
   风格：星际深空 / 霓虹幻境 / 毛玻璃 / 响应式 / 暗色优先
   设计原则：沉浸、通透、视觉层级清晰、交互反馈柔和
   ============================================================ */

/* ---------- 设计令牌 & 主题变量 ---------- */
:root {
  /* 浅色模式 (默认) - 高可读性文字 */
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-footer: #0b1a2f;
  --text-primary: #1e293b;
  --text-secondary: #334155;
  --text-heading: #0f172a;
  --text-accent: #1d4ed8;
  --text-link: #1e40af;
  --text-btn: #ffffff;
  --border-light: rgba(148, 163, 184, 0.35);
  --shadow: 0 8px 30px rgba(2, 12, 32, 0.08);
  --shadow-hover: 0 20px 40px rgba(29, 78, 216, 0.15);
  --nav-bg: rgba(248, 250, 252, 0.7);
  --hover-bg: rgba(226, 232, 240, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --hero-bg-start: #0b1a2f;
  --hero-bg-end: #1e3a8a;
  --hero-text: #f1f5f9;
  --hero-text-secondary: #cbd5e1;
  --hero-cta-bg: #3b82f6;
  --hero-cta-hover: #2563eb;
  --footer-text: #e2e8f0;
  --footer-link: #a5c8ff;
  --footer-border: rgba(148, 163, 184, 0.2);
  --tag-bg: rgba(226, 232, 240, 0.6);
  --accent-glow: rgba(59, 130, 246, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(145deg, #0f1f3d 0%, #1a2d4f 50%, #274b7a 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(241,245,249,0.9) 100%);
  --gradient-text: linear-gradient(45deg, #60a5fa, #a78bfa);
  --star-bg: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-soft: #111c30;
  --bg-card: rgba(22, 33, 58, 0.6);
  --bg-footer: #070d1a;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-heading: #f8fafc;
  --text-accent: #93c5fd;
  --text-link: #a5c8ff;
  --text-btn: #0b1220;
  --border-light: rgba(100, 116, 139, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(147, 197, 253, 0.1);
  --nav-bg: rgba(10, 18, 34, 0.72);
  --hover-bg: rgba(30, 43, 69, 0.7);
  --glass-bg: rgba(15, 23, 42, 0.5);
  --glass-border: rgba(148, 163, 184, 0.15);
  --hero-bg-start: #0f1f3d;
  --hero-bg-end: #1a2d4f;
  --hero-text: #f8fafc;
  --hero-text-secondary: #cbd5e1;
  --hero-cta-bg: #2f6bff;
  --hero-cta-hover: #4f83ff;
  --footer-text: #cbd5e1;
  --footer-link: #93c5fd;
  --footer-border: rgba(148, 163, 184, 0.15);
  --tag-bg: rgba(30, 41, 59, 0.8);
  --accent-glow: rgba(147, 197, 253, 0.25);
  --gradient-card: linear-gradient(145deg, rgba(22,33,58,0.8) 0%, rgba(15,23,42,0.9) 100%);
}

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

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

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  background-image: var(--star-bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* 星空背景粒子效果（纯CSS） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(255,255,255,0.4) 0%, transparent 100%);
  background-repeat: repeat;
  background-size: 300px 300px;
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; }
  100% { opacity: 0.5; }
}

/* 标题层级 */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px var(--accent-glow);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-top: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p, li, span, div {
  color: var(--text-primary);
}

p {
  margin-bottom: 0.8rem;
}

a {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  position: relative;
}

a:hover {
  color: var(--text-accent);
  text-shadow: 0 0 20px var(--accent-glow);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- 导航栏（毛玻璃吸顶） ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-accent), transparent);
  opacity: 0.3;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 0;
  gap: 12px;
}

.logo {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  -webkit-text-fill-color: currentColor;
}

.logo:hover {
  text-shadow: 0 0 30px var(--accent-glow);
  text-decoration: none;
}

/* 导航链接 */
.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-accent);
  text-decoration: none;
  text-shadow: none;
}

.nav-links a:hover::after {
  width: 100%;
}

/* 导航操作区 */
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

#themeToggle {
  background: var(--glass-bg);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 1.1rem;
}

#themeToggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent-glow);
  border-color: var(--text-accent);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  padding: 4px 6px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--text-accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 6px 10px;
  outline: none;
  width: min(140px, 20vw);
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.search-box button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* 移动端菜单按钮 */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  width: 100%;
  padding: 16px;
  gap: 12px;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-menu a {
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.mobile-menu a:hover {
  background: var(--hover-bg);
  text-decoration: none;
}

/* ---------- 首屏 Hero（渐变+玻璃） ---------- */
.hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 8vw, 100px) 0;
  margin-bottom: 40px;
  isolation: isolate;
}

/* 星尘光效 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.15) 0%, transparent 40%);
  z-index: -1;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #60a5fa, #a78bfa, transparent);
  opacity: 0.5;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1 1 300px;
  color: var(--hero-text);
}

.hero-text h1 {
  color: var(--hero-text);
  -webkit-text-fill-color: var(--hero-text);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 60px rgba(96, 165, 250, 0.3);
}

.hero-text h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 2px;
  margin-top: 20px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.hero-text p {
  color: var(--hero-text-secondary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin-bottom: 25px;
  line-height: 1.8;
}

.hero-cta {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  margin-top: 10px;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
  text-decoration: none;
  color: white;
}

.hero-cta:hover::before {
  left: 100%;
}

.hero-svg {
  flex: 0 0 min(250px, 30vw);
  min-width: 180px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: float 6s ease-in-out infinite;
}

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

/* ---------- 通用区块标题 ---------- */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 40px 0 30px;
  padding-left: 20px;
  position: relative;
  font-weight: 700;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  background: var(--gradient-primary);
  border-radius: 3px;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ---------- 卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

/* ---------- 卡片（玻璃拟态） ---------- */
.card {
  background: var(--glass-bg);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--text-accent);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  opacity: 0.3;
}

.card h3 {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.card p {
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.card a {
  font-weight: 600;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card a::after {
  content: '→';
  transition: transform 0.3s ease;
}

.card a:hover::after {
  transform: translateX(5px);
}

/* ---------- 文章卡片（玻璃） ---------- */
.article-card {
  background: var(--glass-bg);
  border-radius: 18px;
  padding: clamp(18px, 2.5vw, 24px);
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, var(--accent-glow) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--text-accent);
}

.article-card:hover::before {
  opacity: 0.15;
}

.article-card > * {
  position: relative;
  z-index: 1;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: center;
}

.article-meta span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-meta span:first-child::before {
  content: '📅';
  font-size: 0.8rem;
}

.article-meta span:last-child {
  background: var(--tag-bg);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.article-card h3 {
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 15px;
}

.article-card a {
  font-weight: 600;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-card a::after {
  content: '→';
  transition: transform 0.3s ease;
}

.article-card a:hover::after {
  transform: translateX(5px);
}

/* ---------- 边框容器（玻璃） ---------- */
.bordered {
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 36px);
  margin-top: 30px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.bordered::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

/* ---------- 按钮 ---------- */
.btn {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
  color: white;
  text-decoration: none;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  background: var(--tag-bg);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 4px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover {
  border-color: var(--text-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--glass-bg);
  border-radius: 16px;
  padding: 0 clamp(16px, 3vw, 24px);
  margin-bottom: 14px;
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.faq-question {
  font-weight: 600;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-heading);
  font-size: 1.05rem;
  transition: color 0.2s ease;
  user-select: none;
}

.faq-question:hover {
  color: var(--text-accent);
}

.faq-question span {
  font-size: 1.5rem;
  color: var(--text-accent);
  transition: transform 0.3s ease;
  min-width: 24px;
  text-align: center;
  font-weight: 300;
}

.faq-answer {
  padding-bottom: 20px;
  color: var(--text-primary);
  animation: fadeIn 0.3s ease;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  margin-top: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.faq-answer p {
  color: var(--text-primary);
}

/* ---------- HowTo 步骤 ---------- */
.howto-step {
  background: var(--glass-bg);
  border-left: 4px solid var(--text-accent);
  padding: clamp(16px, 2.5vw, 20px);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
}

.howto-step:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
}

.howto-step strong {
  color: var(--text-accent);
  display: block;
  margin-bottom: 6px;
}

.howto-step p {
  margin-bottom: 0;
}

/* ---------- 表格 ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--glass-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.data-table th {
  background: var(--bg-soft);
  color: var(--text-heading);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-light);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--hover-bg);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-footer);
  color: var(--footer-text);
  margin-top: 80px;
  padding: 60px 0 20px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.footer * {
  color: var(--footer-text);
}

.footer h4 {
  color: var(--footer-text);
  font-weight: 600;
  margin-bottom: 16px;
}

.footer a {
  color: var(--footer-link);
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #ffffff;
  text-shadow: 0 0 15px rgba(147, 197, 253, 0.5);
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(24px, 4vw, 40px);
  margin-bottom: 40px;
}

.footer-grid p {
  margin-bottom: 8px;
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 24px;
  font-size: 0.9rem;
  text-align: center;
}

.footer-bottom p {
  opacity: 0.8;
  margin-bottom: 8px;
}

/* ---------- 返回顶部 ---------- */
#backTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 24px;
  cursor: pointer;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.3s ease;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

#backTop:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ---------- 滚动动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 交错动画延迟 */
.card-grid > *:nth-child(2n) { transition-delay: 0.1s; }
.card-grid > *:nth-child(3n) { transition-delay: 0.2s; }

/* ---------- 图标与文本组合 ---------- */
.icon-text {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-text svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ---------- SVG 文字 ---------- */
svg text {
  fill: #ffffff;
  font-weight: 500;
}

.svg-text-light {
  fill: #f8fafc;
}

/* ---------- 统计数字（如有） ---------- */
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ---------- 分隔线 ---------- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 40px 0;
  border: none;
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 1024px) {
  .hero-content {
    justify-content: center;
    text-align: center;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text h1::after {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-svg {
    flex-basis: 200px;
  }
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
  }

  .nav-actions .search-box {
    width: auto;
  }

  .search-box input {
    width: min(100px, 20vw);
  }

  .mobile-menu {
    display: flex;
  }

  .nav-inner {
    padding: 12px 0;
  }

  .hero {
    padding: 50px 0;
  }

  .hero-svg {
    display: none;
  }

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

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

  #backTop {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

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

  .nav-actions {
    gap: 8px;
  }

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

  #themeToggle {
    padding: 6px 10px;
  }

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

  .bordered {
    padding: 20px;
    border-radius: 18px;
  }

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

  h1 {
    font-size: 2rem;
  }

  .hero-cta {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
}

/* ---------- 暗色模式微调 ---------- */
[data-theme="dark"] .card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .bordered,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .howto-step {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hero {
  box-shadow: inset 0 -50px 50px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .article-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 197, 253, 0.2);
}

/* ---------- 无障碍与键盘导航 ---------- */
:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 星空闪烁动画（装饰） ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- 选中文字颜色 ---------- */
::selection {
  background: var(--text-accent);
  color: var(--bg);
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-accent);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--text-accent) var(--bg);
}