/* ============================================================
   天天影院 · 完整样式表 (style.css)
   风格：现代影视媒体 · 毛玻璃+渐变 · 响应式+暗色模式
   ============================================================ */

/* ===== CSS 变量 / 设计令牌 ===== */
:root {
  /* 色彩体系 — 明亮主题 */
  --bg-base: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-elevated: #eef2f7;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.85);

  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-tertiary: #475569;
  --text-on-dark: #f1f5f9;
  --text-link: #0f4c81;

  --accent: #d97706;
  --accent-secondary: #ea580c;
  --accent-glow: rgba(217, 119, 6, 0.25);
  --accent-contrast: #ffffff;

  --border-color: rgba(148, 163, 184, 0.4);
  --border-glass: rgba(255, 255, 255, 0.6);
  --border-dark: rgba(15, 23, 42, 0.1);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);

  --nav-bg: rgba(255, 255, 255, 0.75);
  --footer-bg: #0b1120;
  --footer-text: #cbd5e1;
  --footer-heading: #f9fafb;

  --gradient-hero: linear-gradient(135deg, #fef3c7 0%, #fde68a 30%, #fcd34d 60%, #fbbf24 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
  --gradient-accent: linear-gradient(90deg, #d97706, #ea580c);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --blur-amount: 16px;
  --blur-amount-lg: 24px;

  --section-gap: 40px;
  --container-pad: clamp(16px, 4vw, 32px);
}

/* 暗色主题 */
[data-theme="dark"] {
  --bg-base: #0b1120;
  --bg-card: rgba(17, 26, 46, 0.85);
  --bg-elevated: #111a2e;
  --bg-glass: rgba(15, 23, 42, 0.6);
  --bg-glass-strong: rgba(15, 23, 42, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-tertiary: #94a3b8;
  --text-on-dark: #f1f5f9;
  --text-link: #7dd3fc;

  --accent: #fbbf24;
  --accent-secondary: #f59e0b;
  --accent-glow: rgba(251, 191, 36, 0.25);
  --accent-contrast: #0f172a;

  --border-color: rgba(148, 163, 184, 0.2);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);

  --nav-bg: rgba(15, 23, 42, 0.8);
  --footer-bg: #020617;

  --gradient-hero: linear-gradient(135deg, #1a233a 0%, #0f172a 40%, #111827 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.4));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-base);
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

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

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

ul, ol {
  padding-left: 20px;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

/* 无障碍跳转链接 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* 容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ===== 通用工具类 ===== */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: var(--section-gap) 0 24px;
  color: var(--text-primary);
  border-left: 6px solid var(--accent);
  padding-left: 16px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  position: relative;
}

/* 渐变文字工具 */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===== 头部导航 ===== */
.site-header {
  background: var(--nav-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  gap: 20px;
}

.brand {
  flex-shrink: 0;
}

.brand a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s;
}

.brand a:hover {
  opacity: 0.85;
}

.brand svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 6px var(--accent-glow));
}

.brand span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--border-glass);
}

.nav-menu a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* 导航右侧操作区 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  max-width: 220px;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  max-width: 280px;
}

.search-box input {
  background: transparent;
  border: none;
  padding: 6px 8px;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

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

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 4px;
  transition: transform 0.2s;
}

.search-box button:hover {
  transform: scale(1.1);
}

/* 主题切换按钮 */
#themeToggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}

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

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.menu-toggle:hover {
  border-color: var(--accent);
}

/* ===== 主内容区域 ===== */
main {
  padding: 32px 0 48px;
  min-height: 60vh;
}

/* ===== Hero 区域 ===== */
.hero {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 48px);
  margin-bottom: var(--section-gap);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* 毛玻璃装饰圆 */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -60px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  flex: 1 1 380px;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.3);
}

.hero-content h1 .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-content h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent-glow);
  border-radius: 4px;
  z-index: -1;
}

.hero-content p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 24px;
  line-height: 1.8;
}

/* Hero 统计数字 */
.hero-stats {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  margin-top: 28px;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  min-width: 100px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-item span {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 0;
  font-weight: 500;
}

/* Hero 右侧装饰 */
.hero-visual {
  flex: 0 0 180px;
  text-align: center;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

.hero-visual svg {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 10px 30px var(--accent-glow));
  animation: float 6s ease-in-out infinite;
}

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

/* ===== 卡片通用 ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-glass);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

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

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.card h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 600;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.card a {
  color: var(--text-link);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.card a:hover {
  gap: 8px;
  text-decoration: underline;
}

/* ===== 网格布局 ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

/* ===== 文章列表 ===== */
.article-list {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.article-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 8px;
  transition: background 0.2s ease, padding-left 0.2s ease;
  border-radius: 8px;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  background: var(--bg-elevated);
  padding-left: 16px;
}

.article-item h4 {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.2s;
}

.article-item:hover h4 {
  color: var(--accent);
}

.article-item .meta {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.btn-text {
  color: var(--text-link);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease, color 0.2s;
}

.btn-text:hover {
  gap: 8px;
  color: var(--accent);
}

/* ===== FAQ 折叠面板 ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all 0.3s ease;
}

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

.faq-question {
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
}

.faq-question .toggle-icon {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
}

.faq-item.active .toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
  animation: fadeInDown 0.3s ease;
}

.faq-item.active .faq-answer {
  display: block;
}

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

/* ===== HowTo 指南区域 ===== */
.howto-box {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-amount-lg));
  -webkit-backdrop-filter: blur(var(--blur-amount-lg));
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  margin: 32px 0;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.howto-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.howto-box h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

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

.howto-box ol {
  padding-left: 24px;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  margin: 16px 0;
}

.howto-box li {
  margin: 10px 0;
  line-height: 1.7;
  padding-left: 6px;
}

.howto-box li::marker {
  color: var(--accent);
  font-weight: 700;
}

.howto-box strong {
  color: var(--text-primary);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 24px;
  margin-top: 60px;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

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

.footer-grid div:first-child p {
  color: var(--footer-text);
  font-size: 0.95rem;
  margin-top: 8px;
}

.site-footer h4 {
  color: var(--footer-heading);
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.site-footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
  display: block;
  margin: 8px 0;
  transition: color 0.2s, padding-left 0.2s;
  font-size: 0.95rem;
}

.site-footer a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.site-footer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--footer-text);
  opacity: 0.8;
}

.copyright p {
  margin: 4px 0;
}

/* ===== 浮动按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gradient-accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

/* ===== 按钮样式 ===== */
.btn-primary {
  background: var(--gradient-accent);
  color: var(--accent-contrast);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== 动画效果 ===== */
/* 滚动进入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
}

.fade-in-up.visible {
  animation: fadeInUp 0.6s ease forwards;
}

/* 延迟动画辅助 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Hero 内容动画 */
.hero-content > * {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }

/* 悬停时的毛玻璃效果增强 */
.glass-hover {
  transition: all 0.4s ease;
}

.glass-hover:hover {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-glass-strong);
}

/* ===== 响应式调整 ===== */

/* 平板设备 */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }
}

/* 手机设备 */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .nav-wrap {
    height: 60px;
  }

  .brand a {
    font-size: 1.3rem;
  }

  .brand svg {
    width: 30px;
    height: 30px;
  }

  /* 移动端菜单 */
  .nav-menu {
    display: none;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 16px;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 20px 20px;
    z-index: 999;
  }

  .nav-menu.active {
    display: flex;
    animation: slideDown 0.3s ease;
  }

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

  .nav-menu a {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .search-box {
    display: none;
  }

  #themeToggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  /* Hero */
  .hero {
    padding: 24px 20px;
    border-radius: 24px;
    flex-direction: column;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }

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

  .hero-stats {
    justify-content: center;
    gap: 12px;
  }

  .stat-item {
    padding: 10px 14px;
    min-width: 80px;
  }

  .stat-item span {
    font-size: 1.5rem;
  }

  .hero-visual {
    flex: 0 0 auto;
  }

  .hero-visual svg {
    width: 120px;
    height: 120px;
  }

  /* 卡片 */
  .card {
    padding: 20px;
    border-radius: 16px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .faq-item {
    padding: 16px;
  }

  /* 文章 */
  .article-list {
    padding: 16px;
  }

  .article-item {
    padding: 16px 4px;
  }

  .article-item h4 {
    font-size: 1rem;
  }

  /* 页脚 */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 16px;
  }

  .footer-grid div:first-child {
    grid-column: 1 / -1;
  }

  .site-footer {
    padding: 40px 0 20px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin: 28px 0 16px;
  }
}

/* 超小屏幕 */
@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .stat-item {
    width: 100%;
    max-width: 200px;
  }

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

  .footer-grid div:first-child {
    grid-column: auto;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .search-box,
  #themeToggle,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card,
  .article-list,
  .faq-item,
  .howto-box {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  .hero {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }
}

/* ===== 无障碍偏好 ===== */
@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;
  }
}

/* ===== 高对比度焦点样式 ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 工具类补充 ===== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.position-relative {
  position: relative;
}

.hidden {
  display: none !important;
}

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

/* 徽章/标签 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-glass);
}

/* 图片圆角 */
.rounded-img {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 链接卡片效果 */
.link-card {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-card:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* 侧边栏小工具样式（如有） */
.widget {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* 排行榜列表 */
.rank-list {
  list-style: none;
  padding: 0;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

.rank-list li:last-child {
  border-bottom: none;
}

.rank-number {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.2rem;
  min-width: 32px;
}

/* 星标评分 */
.stars {
  color: var(--accent);
  letter-spacing: 2px;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  cursor: pointer;
}

.tag:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== 暗色模式下的额外适配 ===== */
[data-theme="dark"] .card,
[data-theme="dark"] .article-list,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .howto-box {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
}

[data-theme="dark"] .hero {
  background: var(--gradient-hero);
}

[data-theme="dark"] .hero-content h1 {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-item {
  background: rgba(15, 23, 42, 0.6);
}

[data-theme="dark"] .nav-menu a:hover {
  background: rgba(251, 191, 36, 0.1);
}

/* 确保所有文字在暗色模式下可读 */
[data-theme="dark"] .text-secondary {
  color: var(--text-secondary);
}

/* ===== 输入框暗色模式 ===== */
[data-theme="dark"] input {
  color-scheme: dark;
}

/* ===== 滚动动画触发器 ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 交错动画 */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* 卡片悬浮阴影增强 */
.card:hover {
  box-shadow: 0 12px 40px var(--accent-glow), var(--shadow-lg);
}

/* 图片悬停缩放 */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.05);
}

/* 渐变边框效果 */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-accent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 数字滚动动画 */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* 键盘导航高亮 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 响应式字体 */
@media (min-width: 1600px) {
  html {
    font-size: 18px;
  }
}

/* 完成所有样式定义 */