/* ==========================================================================
   云果短剧 - 全局样式表
   网站：htuz9.cn
   说明：本文件为纯 CSS，无外部依赖，支持暗色模式与响应式布局
   ========================================================================== */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background-color: #f5f7fb;
  color: #1e1e2f;
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
  background-color: #12121c;
  color: #e0e0e0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input {
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   2. 设计变量
   -------------------------------------------------------------------------- */
:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --accent: #e76f51;
  --accent-light: #f4a261;
  --bg-body: #f5f7fb;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --border-color: #e0e0e0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 30px;
  --transition: 0.25s ease;
  --header-height: 70px;
  --gradient-brand: linear-gradient(135deg, #2d6a4f 0%, #40916c 55%, #74c69d 100%);
  --gradient-accent: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
  --gradient-banner: linear-gradient(135deg, rgba(45, 106, 79, 0.12) 0%, rgba(116, 198, 157, 0.1) 45%, rgba(231, 111, 81, 0.12) 100%);
}

body.dark-mode {
  --bg-body: #12121c;
  --bg-card: #1e1e2f;
  --bg-header: rgba(18, 18, 28, 0.92);
  --bg-glass: rgba(30, 30, 47, 0.55);
  --text-primary: #eaeaea;
  --text-secondary: #b0b0c0;
  --border-color: #2e2e40;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.4);
  --gradient-brand: linear-gradient(135deg, #1b4332 0%, #2d6a4f 55%, #40916c 100%);
  --gradient-banner: linear-gradient(135deg, rgba(45, 106, 79, 0.3) 0%, rgba(116, 198, 157, 0.12) 45%, rgba(231, 111, 81, 0.24) 100%);
}

/* --------------------------------------------------------------------------
   3. 布局容器
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  display: block;
}

/* --------------------------------------------------------------------------
   4. 吸顶导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

body.dark-mode .site-header:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

/* 品牌 Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: transform var(--transition), opacity var(--transition);
}

.logo:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.logo svg {
  width: 38px;
  height: 38px;
  transition: transform var(--transition);
}

.logo:hover svg {
  transform: rotate(-6deg) scale(1.05);
}

body.dark-mode .logo {
  color: #74c69d;
}

/* 主导航 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.28);
}

body.dark-mode .nav-menu a {
  color: #b0b0c0;
}

body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu a.active {
  background: var(--primary-light);
  color: #fff;
  box-shadow: 0 4px 14px rgba(64, 145, 108, 0.4);
}

/* 头部操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0 4px 0 16px;
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
  height: 42px;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

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

.search-box input::placeholder {
  color: #999;
}

body.dark-mode .search-box input::placeholder {
  color: #6a6a7a;
}

.search-box button {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.search-box button:hover {
  background: var(--primary-dark);
  transform: scale(1.06);
}

.search-box button:active {
  transform: scale(0.95);
}

/* 暗色模式切换 */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all var(--transition);
  color: var(--text-primary);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  transform: rotate(18deg);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-primary);
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(45, 106, 79, 0.1);
}

/* 移动端导航面板 */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  z-index: 999;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  animation: mobileNavIn 0.28s ease;
}

.mobile-nav.open {
  display: flex;
}

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

.mobile-nav a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition),
    padding-left var(--transition);
}

.mobile-nav a:hover {
  background: rgba(45, 106, 79, 0.08);
  color: var(--primary);
  padding-left: 22px;
}

body.dark-mode .mobile-nav a:hover {
  background: rgba(116, 198, 157, 0.12);
  color: #74c69d;
}

/* --------------------------------------------------------------------------
   5. 面包屑
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb a {
  color: var(--primary);
  transition: opacity var(--transition);
}

.breadcrumb a:hover {
  opacity: 0.7;
}

body.dark-mode .breadcrumb a {
  color: #74c69d;
}

.breadcrumb span {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   6. Banner 轮播
   -------------------------------------------------------------------------- */
.banner-section {
  padding: 24px 0 10px;
}

.banner-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  background-image: var(--gradient-banner);
  border: 1px solid var(--border-color);
}

.banner-slider::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 198, 157, 0.25), transparent 70%);
  pointer-events: none;
}

.banner-slider::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 111, 81, 0.18), transparent 70%);
  pointer-events: none;
}

.banner-slide {
  display: none;
  padding: 48px 40px;
  min-height: 260px;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.banner-slide.active {
  display: flex;
  animation: fadeSlide 0.5s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0.4;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.banner-content {
  flex: 1;
  min-width: 0;
}

.banner-content h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.banner-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 520px;
}

.banner-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.25);
}

.banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(45, 106, 79, 0.38);
  filter: brightness(1.06);
}

.banner-btn:active {
  transform: translateY(0);
}

.banner-visual {
  flex-shrink: 0;
  width: 200px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatVisual 5s ease-in-out infinite;
}

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

.banner-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(45, 106, 79, 0.3);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.banner-dot:hover {
  background: rgba(45, 106, 79, 0.55);
}

.banner-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 10px;
}

body.dark-mode .banner-dot {
  background: rgba(255, 255, 255, 0.25);
}

body.dark-mode .banner-dot.active {
  background: #74c69d;
}

/* --------------------------------------------------------------------------
   7. 通用卡片（毛玻璃 + 圆角）
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 106, 79, 0.3);
}

body.dark-mode .card {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

body.dark-mode .card:hover {
  border-color: rgba(116, 198, 157, 0.35);
}

/* --------------------------------------------------------------------------
   8. 区块标题
   -------------------------------------------------------------------------- */
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 4px;
  margin-top: 10px;
  background: var(--gradient-accent);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 720px;
}

.section-header {
  margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   9. 网格布局
   -------------------------------------------------------------------------- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* --------------------------------------------------------------------------
   10. 数字统计
   -------------------------------------------------------------------------- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 24px;
  padding: 40px 0;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 120px;
  transition: transform var(--transition);
}

.stat-item:hover {
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

body.dark-mode .stat-number {
  color: #74c69d;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   11. FAQ 手风琴
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.08);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(45, 106, 79, 0.12);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  gap: 12px;
  user-select: none;
  transition: background var(--transition);
}

.faq-question:hover {
  background: rgba(45, 106, 79, 0.04);
}

body.dark-mode .faq-question:hover {
  background: rgba(116, 198, 157, 0.06);
}

.faq-question .arrow {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform var(--transition);
  flex-shrink: 0;
  color: var(--primary);
}

body.dark-mode .faq-question .arrow {
  color: #74c69d;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 22px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.faq-answer p {
  margin: 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 22px 20px;
}

/* --------------------------------------------------------------------------
   12. 文章卡片
   -------------------------------------------------------------------------- */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

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

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 106, 79, 0.3);
}

body.dark-mode .article-card:hover {
  border-color: rgba(116, 198, 157, 0.35);
}

.article-card .article-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition);
}

.article-card:hover h3 {
  color: var(--primary);
}

body.dark-mode .article-card:hover h3 {
  color: #74c69d;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.article-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), color var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  align-self: flex-start;
}

.article-card .read-more:hover {
  gap: 8px;
  color: var(--primary-dark);
}

body.dark-mode .article-card .read-more {
  color: #74c69d;
}

body.dark-mode .article-card .read-more:hover {
  color: #a7e0c0;
}

/* --------------------------------------------------------------------------
   13. 滚动动画
   -------------------------------------------------------------------------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   14. 返回顶部
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  z-index: 900;
}

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

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.5);
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

/* --------------------------------------------------------------------------
   15. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  padding: 48px 0 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
}

.footer-col p,
.footer-col li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li a {
  color: var(--text-secondary);
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--primary);
  padding-left: 4px;
}

body.dark-mode .footer-col ul li a:hover {
  color: #74c69d;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   16. 联系信息
   -------------------------------------------------------------------------- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-info span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.contact-info span:hover {
  color: var(--primary);
}

body.dark-mode .contact-info span:hover {
  color: #74c69d;
}

/* --------------------------------------------------------------------------
   17. 锚点导航
   -------------------------------------------------------------------------- */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

.anchor-nav a {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.anchor-nav a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 106, 79, 0.25);
}

/* --------------------------------------------------------------------------
   18. 友情链接
   -------------------------------------------------------------------------- */
.site-footer a[href="#"] {
  transition: color var(--transition);
}

/* --------------------------------------------------------------------------
   19. 响应式 - 平板
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .header-actions .search-box {
    display: none;
  }

  .banner-content h2 {
    font-size: 1.7rem;
  }
}

/* --------------------------------------------------------------------------
   20. 响应式 - 手机
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 62px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .banner-slide {
    flex-direction: column;
    padding: 32px 24px;
    text-align: center;
    min-height: auto;
    gap: 24px;
  }

  .banner-content h2 {
    font-size: 1.5rem;
  }

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

  .banner-visual {
    width: 120px;
    height: 100px;
  }

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

  .section-title::after {
    margin-left: auto;
    margin-right: auto;
  }

  .section-header {
    text-align: center;
  }

  .section-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .stats-row {
    flex-direction: column;
    gap: 16px;
    padding: 28px 0;
  }

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

  .header-actions .search-box {
    display: none;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .contact-info span {
    font-size: 0.82rem;
  }

  .card {
    padding: 22px 18px;
  }

  .faq-question {
    padding: 15px 16px;
    font-size: 0.95rem;
  }

  .faq-item.open .faq-answer {
    padding: 0 16px 18px;
  }

  .anchor-nav {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   21. 响应式 - 小屏手机
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .banner-content h2 {
    font-size: 1.2rem;
  }

  .banner-content p {
    font-size: 0.9rem;
  }

  .banner-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

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

  .stat-number {
    font-size: 1.8rem;
  }

  .logo {
    font-size: 1.15rem;
  }

  .logo svg {
    width: 32px;
    height: 32px;
  }

  .theme-toggle,
  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }

  .article-card {
    padding: 20px 18px;
  }
}

/* --------------------------------------------------------------------------
   22. 可访问性与动效偏好
   -------------------------------------------------------------------------- */
@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;
  }

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

::selection {
  background: rgba(45, 106, 79, 0.22);
  color: var(--text-primary);
}

body.dark-mode ::selection {
  background: rgba(116, 198, 157, 0.3);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(45, 106, 79, 0.35);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 106, 79, 0.6);
  background-clip: content-box;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: rgba(116, 198, 157, 0.35);
  background-clip: content-box;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(116, 198, 157, 0.6);
  background-clip: content-box;
}

/* 焦点可见性 */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

body.dark-mode a:focus-visible,
body.dark-mode button:focus-visible,
body.dark-mode input:focus-visible {
  outline-color: #74c69d;
}

/* 打印样式 */
@media print {
  .site-header,
  .back-to-top,
  .banner-section,
  .anchor-nav,
  .mobile-nav,
  .theme-toggle,
  .search-box {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .article-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}