```css
/* =========================================
   糖豆视频 - 全局样式表
   风格定位：现代、轻量、品牌橙 + 深色模式
   设计原则：高可读性、流畅交互、响应式适配
   ========================================= */

/* ---------- 主题变量 ---------- */
:root,
[data-theme="light"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-alt: #f1f3f5;
  --surface-glass: rgba(255, 255, 255, 0.7);
  --border: #e4e7ec;
  --text-primary: #1f2937;
  --text-secondary: #3e4a5b;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.12);
  --accent-contrast: #b45309;
  --btn-bg: #f97316;
  --btn-text: #ffffff;
  --btn-hover: #ea580c;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --hero-gradient: linear-gradient(135deg, #fff5ee 0%, #fdf0e6 40%, #f3f4f6 100%);
  --footer-bg: #1e293b;
  --footer-text: #cbd5e1;
  --footer-heading: #f8fafc;
  --nav-bg: rgba(255, 255, 255, 0.82);
  --code-bg: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-track: transparent;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #151e2c;
  --surface-alt: #1e2a3a;
  --surface-glass: rgba(21, 30, 44, 0.75);
  --border: #2a3a4d;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-heading: #ffffff;
  --link: #93c5fd;
  --link-hover: #bfdbfe;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-contrast: #fdba74;
  --btn-bg: #f97316;
  --btn-text: #0f172a;
  --btn-hover: #fb923c;
  --card-bg: #151e2c;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --hero-gradient: linear-gradient(135deg, #1a2332 0%, #1e293b 50%, #0f172a 100%);
  --footer-bg: #0b1120;
  --footer-text: #94a3b8;
  --footer-heading: #f1f5f9;
  --nav-bg: rgba(11, 17, 32, 0.82);
  --code-bg: #1e293b;
  --scrollbar-thumb: #334155;
  --scrollbar-track: transparent;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  transition: color 0.3s;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  border-left: 4px solid var(--accent);
  padding-left: 0.8rem;
  margin: 2.2rem 0 1.2rem;
  font-weight: 750;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: 1.5rem 0 0.6rem;
}

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

p {
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

ul, ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.35rem;
}

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

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

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

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

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(249, 115, 22, 0.3));
  transition: transform 0.3s ease;
}

.logo:hover svg {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 30px;
  transition: background 0.2s, color 0.2s;
  font-size: 0.95rem;
}

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

.nav-links a.active {
  color: var(--accent-contrast);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 30px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  width: 150px;
  font-size: 0.88rem;
  transition: width 0.3s;
}

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

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

.search-box button:hover {
  color: var(--accent);
}

/* 图标按钮 */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
}

.icon-btn:hover {
  background: var(--surface-alt);
  transform: scale(1.05);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.4rem;
}

/* 移动端导航 */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-nav.show {
  max-height: 500px;
}

.mobile-nav a {
  padding: 12px 24px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: background 0.2s;
}

.mobile-nav a:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .nav-links,
  .search-box {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .mobile-nav {
    display: flex;
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.btn:hover {
  background: var(--btn-hover);
  color: var(--btn-text);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* ---------- 卡片网格 ---------- */
.grid {
  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);
}

@media (max-width: 900px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-soft);
}

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ---------- Hero 区域 ---------- */
.hero {
  background: var(--hero-gradient);
  border-radius: 24px;
  padding: 48px 40px;
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.5s;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-text {
  flex: 1 1 320px;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-item .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.stat-item .label {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-top: 2px;
}

/* Hero 图形 */
.svg-img {
  background: var(--surface-glass);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  min-width: 200px;
}

@media (max-width: 768px) {
  .hero {
    padding: 32px 24px;
  }
  .hero-stats {
    gap: 24px;
  }
  .svg-img {
    flex: 0 0 100%;
    height: 140px;
  }
}

/* ---------- 文章列表 ---------- */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--border);
  padding: 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: background 0.2s, padding-left 0.2s;
  border-radius: 8px;
}

.article-list li:hover {
  background: var(--surface-alt);
  padding-left: 16px;
}

.article-list li a {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.98rem;
  flex: 1;
}

.article-list li a:hover {
  color: var(--accent-contrast);
  text-decoration: none;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--card-bg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: var(--accent-soft);
}

.faq-item.open {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.08);
}

.faq-q {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-heading);
  font-size: 0.98rem;
  transition: background 0.2s;
  user-select: none;
}

.faq-q:hover {
  background: var(--surface-alt);
}

.faq-q span {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  color: var(--accent);
}

.faq-item.open .faq-q span {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  display: none;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.open .faq-a {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

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

.breadcrumb a {
  color: var(--link);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.divider {
  margin: 0 4px;
  color: var(--text-muted);
}

/* ---------- 通用工具类 ---------- */
.section-title {
  margin-bottom: 24px;
}

.mt-4 {
  margin-top: 40px;
}

.mb-2 {
  margin-bottom: 20px;
}

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

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

.badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 3px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 返回顶部 ---------- */
#backTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--btn-bg);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, opacity 0.3s;
  opacity: 0;
}

#backTop.show {
  display: flex;
  opacity: 1;
}

#backTop:hover {
  background: var(--btn-hover);
  transform: translateY(-3px);
}

/* ---------- 表格 ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

th {
  background: var(--surface-alt);
  color: var(--text-heading);
  font-weight: 600;
}

tr:hover td {
  background: var(--surface-alt);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 56px 0 24px;
  margin-top: 80px;
  transition: background 0.3s;
}

.footer a {
  color: var(--footer-text);
  transition: color 0.2s;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer h4 {
  color: var(--footer-heading);
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 600;
}

.footer p {
  color: var(--footer-text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer .footer-grid a {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 24px;
}

/* ---------- 友情链接 ---------- */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.friend-links a {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.friend-links a:hover {
  border-color: var(--accent);
  color: var(--accent-contrast);
  background: var(--accent-soft);
  text-decoration: none;
}

/* ---------- 联系卡片 ---------- */
.contact-info p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.contact-info .icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* ---------- 代码块 ---------- */
code, pre {
  background: var(--code-bg);
  border-radius: 6px;
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
  font-size: 0.9em;
}

code {
  padding: 2px 6px;
}

pre {
  padding: 16px;
  overflow-x: auto;
  margin: 1rem 0;
}

/* ---------- 暗色模式切换动画 ---------- */
.theme-toggle {
  font-size: 1.3rem;
  transition: transform 0.3s;
}

.theme-toggle:hover {
  transform: rotate(15deg);
}

/* ---------- 小屏适配细节 ---------- */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.7rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .card {
    padding: 20px;
  }
  
  .article-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .article-meta {
    white-space: normal;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .stat-item .num {
    font-size: 1.6rem;
  }
  
  #backTop {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}

/* 打印样式优化 */
@media print {
  .navbar, .footer, #backTop, .search-box, .mobile-nav, .theme-toggle {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .container {
    max-width: 100%;
  }
}

/* 无障碍：焦点可见性 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
```