/* ===== 午夜大片 · 全局样式表 ===== */
/* 设计语言：暗夜影院 × 现代玻璃质感 × 高对比阅读 */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #334155;
  --text-muted: #475569;
  --heading-color: #0f172a;
  --border-color: #cbd5e1;
  --brand: #0b3b5c;
  --brand-dark: #082f49;
  --accent: #be5f1a;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-heading: #ffffff;
  --nav-bg: rgba(15, 23, 42, 0.9);
  --nav-text: #f1f5f9;
  --btn-bg: #1e3a8a;
  --btn-text: #ffffff;
  --card-bg: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif;
  --glass-blur: blur(20px) saturate(180%);
  --gradient-banner: linear-gradient(145deg, #0f172a 0%, #1e293b 40%, #2d1b4e 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(255,255,255,0.05));
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading-color: #f8fafc;
  --border-color: #334155;
  --brand: #38bdf8;
  --brand-dark: #7dd3fc;
  --accent: #fbbf24;
  --footer-bg: #0f172a;
  --footer-text: #cbd5e1;
  --footer-heading: #ffffff;
  --nav-bg: rgba(2, 6, 23, 0.92);
  --nav-text: #f1f5f9;
  --btn-bg: #2563eb;
  --btn-text: #ffffff;
  --card-bg: #1e293b;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --gradient-banner: linear-gradient(145deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08));
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 排版系统 ===== */
h1, h2, h3, h4 {
  color: var(--heading-color);
  line-height: 1.25;
  margin-top: 0.6em;
  margin-bottom: 0.4em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  border-left: 6px solid var(--brand);
  padding-left: 0.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  line-height: 1.75;
}

a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

[data-theme="dark"] a {
  color: #93c5fd;
}

[data-theme="dark"] a:hover {
  color: #bfdbfe;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

strong {
  color: var(--heading-color);
  font-weight: 700;
}

/* ===== 布局容器 ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main.container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ===== 导航栏（毛玻璃效果） ===== */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--nav-text);
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  color: #fbbf24;
  -webkit-text-fill-color: #fbbf24;
  font-weight: 900;
  position: relative;
}

.logo span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 2px;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--nav-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fbbf24;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #fbbf24;
  text-decoration: none;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.theme-toggle,
.search-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--nav-text);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover,
.search-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--nav-text);
  font-size: 1.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== 搜索框 ===== */
.search-box {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--nav-text);
  outline: none;
  width: 180px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-box button {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-box button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* ===== Banner 首屏（渐变+玻璃卡片） ===== */
.banner {
  background: var(--gradient-banner);
  padding: 4rem 0;
  color: #f1f5f9;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.banner::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

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

.banner-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.banner-text {
  flex: 2;
  min-width: 280px;
}

.banner-text h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.5em;
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  max-width: 600px;
}

.banner-cta {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
  position: relative;
  overflow: hidden;
}

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

.banner-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(251, 191, 36, 0.5);
}

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

.banner-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  animation: cardFloat 6s ease-in-out infinite;
}

.banner-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

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

.banner-card svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

/* ===== 卡片网格（毛玻璃+悬停动画） ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--brand);
}

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

.card h3 {
  color: var(--heading-color);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.card p {
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.card .more-link {
  color: #1d4ed8;
  font-weight: 600;
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: all 0.3s ease;
}

.card .more-link:hover {
  transform: translateX(5px);
}

/* ===== 文章列表 ===== */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.article-item {
  background: var(--card-bg);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.article-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.article-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.article-item:hover::after {
  transform: scaleX(1);
}

.article-item h4 {
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.article-item time {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 0.5rem;
  background: var(--bg);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.article-item .summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-item a {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.article-item a:hover {
  gap: 0.6rem;
  text-decoration: none;
}

/* ===== FAQ 手风琴 ===== */
#faq {
  margin-top: 3rem;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.faq-item:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.faq-question {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

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

.faq-question span {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand);
  transition: transform 0.3s ease;
  background: var(--bg);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.faq-item:hover .faq-question span {
  transform: rotate(90deg);
}

.faq-answer {
  margin-top: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  animation: slideDown 0.3s ease;
}

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

/* ===== HowTo 步骤卡片 ===== */
.howto-step {
  background: var(--card-bg);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  border-left: 6px solid var(--brand);
  margin: 1.2rem 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.howto-step:hover {
  transform: translateX(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.howto-step h3 {
  color: var(--heading-color);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.howto-step p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* ===== 联系信息卡片 ===== */
#contact .card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

#contact .card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

#contact .card p {
  margin-bottom: 0.5rem;
}

/* ===== 页脚 ===== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 4rem 1rem 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.5), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-grid h4 {
  color: var(--footer-heading);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #fbbf24;
  border-radius: 2px;
}

.footer-grid a {
  color: var(--footer-text);
  opacity: 0.9;
  display: block;
  margin-bottom: 0.6rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.footer-grid a:hover {
  color: #fbbf24;
  opacity: 1;
  transform: translateX(5px);
  text-decoration: none;
}

.footer-grid p {
  color: var(--footer-text);
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  color: #94a3b8;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== 按钮通用样式 ===== */
.btn {
  background: linear-gradient(135deg, var(--btn-bg), #1e40af);
  color: var(--btn-text);
  padding: 0.8rem 2rem;
  border-radius: 40px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::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;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

.btn:hover::before {
  left: 100%;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--btn-bg), #1e40af);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

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

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 35px rgba(30, 58, 138, 0.5);
}

/* ===== 表格样式 ===== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 1rem;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: left;
}

th {
  background: var(--surface);
  color: var(--heading-color);
  font-weight: 700;
  border-bottom: 2px solid var(--brand);
}

tr {
  transition: background 0.3s ease;
}

tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* ===== 滚动动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.fade-up {
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 图片/占位符优化 ===== */
.placeholder-svg {
  background: linear-gradient(135deg, #334155, #1e293b);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 5px;
  transition: all 0.3s ease;
}

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

/* ===== 选择文本样式 ===== */
::selection {
  background: rgba(251, 191, 36, 0.3);
  color: var(--heading-color);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .article-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--nav-bg);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem;
    backdrop-filter: var(--glass-blur);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem;
    text-align: center;
    font-size: 1.1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .nav-container {
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
  }

  .search-box {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }

  .search-box input {
    width: 100%;
  }

  .banner {
    padding: 3rem 0;
  }

  .banner-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .banner-text {
    min-width: 100%;
  }

  .banner-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .banner-card {
    min-width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

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

  .faq-item {
    padding: 1.2rem;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-grid h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-grid a:hover {
    transform: translateX(0) scale(1.05);
  }
}

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

  .logo {
    font-size: 1.5rem;
  }

  .banner-text h1 {
    font-size: 1.8rem;
  }

  .banner-text p {
    font-size: 0.95rem;
  }

  .banner-cta {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .howto-step {
    padding: 1.2rem;
  }
}

/* ===== 暗色模式适配增强 ===== */
[data-theme="dark"] .card:hover {
  border-color: var(--brand);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .article-item:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .faq-question span {
  background: var(--bg);
}

[data-theme="dark"] .howto-step {
  border-left-color: var(--brand);
}

[data-theme="dark"] .btn {
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

[data-theme="dark"] .search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .navbar,
  .back-to-top,
  .banner-cta,
  .search-box,
  .theme-toggle,
  .footer-bottom {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .article-item,
  .faq-item,
  .howto-step {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}