```css
/* ===== 51黑料网 专属样式表 ===== */
/* 设计语言：现代新闻媒体 + 娱乐活力感 */
/* 支持暗色模式 / 响应式 / 微交互 */

:root {
  /* 主色板 - 深红品牌色 + 冷灰背景 */
  --bg: #f6f7fb;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #3e4c5f;
  --text-heading: #0f172a;
  --text-link: #b91c1c;
  --text-white: #ffffff;
  --border-light: rgba(100, 116, 139, 0.2);
  --accent: #b91c1c;
  --accent-light: #ef4444;
  --accent-dark: #7f1d1d;
  --footer-bg: #0f172a;
  --footer-text: #cbd5e1;
  --code-bg: #f1f5f9;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --gradient-primary: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #b91c1c 100%);
  --gradient-banner: linear-gradient(120deg, #0f172a 0%, #1e1b4b 50%, #4c1d95 100%);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-card: rgba(30, 41, 59, 0.9);
  --bg-card-solid: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-heading: #f8fafc;
  --text-link: #f87171;
  --border-light: rgba(148, 163, 184, 0.2);
  --accent: #ef4444;
  --accent-light: #f87171;
  --accent-dark: #dc2626;
  --footer-bg: #020617;
  --footer-text: #94a3b8;
  --code-bg: #1e293b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(148, 163, 184, 0.2);
  --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #7f1d1d 100%);
  --gradient-banner: linear-gradient(120deg, #020617 0%, #1e1b4b 50%, #4c1d95 100%);
}

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

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.75;
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(185, 28, 28, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(76, 29, 149, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
}

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

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

a:hover {
  color: var(--accent);
}

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

input,
textarea {
  font-family: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
  opacity: 0.6;
}

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

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-heading);
  text-decoration: none;
  letter-spacing: 1px;
  line-height: 1;
  position: relative;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition-base);
}

.logo span {
  -webkit-text-fill-color: var(--accent);
}

.logo:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

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

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition-fast);
  letter-spacing: 0.3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition-base);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--accent);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--code-bg);
  border-radius: var(--radius-pill);
  padding: 0.3rem;
  border: 1px solid var(--border-light);
  transition: var(--transition-base);
  overflow: hidden;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

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

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

.search-box button {
  background: var(--accent);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition-base);
  white-space: nowrap;
}

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

.theme-toggle {
  background: var(--code-bg);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}

.menu-icon span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  display: block;
  transition: var(--transition-base);
  border-radius: 2px;
}

.menu-icon.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.menu-icon.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 移动端导航响应式 ===== */
@media (max-width: 768px) {
  .nav-inner {
    min-height: 64px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--bg-card-solid);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    gap: 0;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
  }

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

  .nav-links a {
    padding: 0.8rem 2rem;
    width: 100%;
    text-align: center;
  }

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

  .menu-icon {
    display: flex;
  }

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

  .search-box button {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .theme-toggle {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .search-box {
    display: none;
  }

  .logo {
    font-size: 1.4rem;
  }
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--code-bg);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 1.5rem 0;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 500;
}

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

/* ===== Banner 轮播 ===== */
.banner-section {
  margin: 2rem 0;
  position: relative;
}

.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gradient-banner);
  color: white;
  box-shadow: var(--shadow-lg);
  min-height: 280px;
  display: flex;
  align-items: center;
}

.banner-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at 70% 50%, rgba(185, 28, 28, 0.2), transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.1), transparent 40%);
  pointer-events: none;
}

.slide {
  display: none;
  padding: 3rem 2.5rem;
  min-height: 280px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.slide.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slideFade 0.5s ease;
}

.slide h2 {
  font-size: 2.2rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.slide p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  line-height: 1.8;
}

.slide::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
  position: relative;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  cursor: pointer;
  border: none;
  transition: var(--transition-base);
  padding: 0;
}

.dot.active {
  background: var(--accent);
  width: 32px;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.3);
}

.dot:hover:not(.active) {
  background: var(--accent-light);
  transform: scale(1.2);
}

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

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

@media (max-width: 768px) {
  .slide {
    padding: 2.5rem 1.5rem;
    min-height: 220px;
  }

  .slide h2 {
    font-size: 1.6rem;
  }

  .slide p {
    font-size: 1rem;
  }

  .banner-carousel {
    min-height: 220px;
  }

  .banner-carousel::before {
    width: 100%;
  }
}

/* ===== 主内容网格 ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

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

/* ===== 卡片组件 ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
}

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

.card h2 {
  color: var(--text-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  border-left: 6px solid var(--accent);
  padding-left: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.card h3 {
  color: var(--text-heading);
  margin: 1.5rem 0 0.8rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.card h4 {
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

.card p {
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.card strong {
  color: var(--text-heading);
}

.meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ===== 文章列表 ===== */
.article-list {
  display: grid;
  gap: 1rem;
}

.article-item {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  background: transparent;
}

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

.article-item:hover {
  background: var(--code-bg);
  transform: translateX(6px);
  border-radius: var(--radius-sm);
}

.article-item a {
  color: var(--text-link);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.3rem;
  transition: var(--transition-fast);
}

.article-item a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.article-summary {
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.3rem;
}

.article-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.read-more:hover {
  gap: 0.6rem;
  color: var(--accent-dark);
}

/* ===== FAQ 样式 ===== */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
  transition: var(--transition-base);
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  padding: 0.8rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  font-size: 1.05rem;
}

.faq-question:hover {
  background: var(--code-bg);
  padding-left: 1rem;
}

.faq-question span {
  font-size: 0.8rem;
  transition: var(--transition-base);
  color: var(--accent);
  background: var(--code-bg);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-question.active span {
  transform: rotate(180deg);
}

.faq-answer {
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  margin-top: 0.3rem;
  animation: slideDown 0.3s ease;
}

.faq-answer p {
  margin-bottom: 0.5rem;
}

/* ===== HowTo 样式 ===== */
.steps-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps-list li {
  counter-increment: step;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem 0.8rem 3rem;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  position: relative;
  font-weight: 500;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ===== 侧边栏 ===== */
.sidebar .card {
  padding: 1.8rem;
  position: sticky;
  top: 100px;
}

.sidebar .card:not(:first-child) {
  position: static;
}

.sidebar h3 {
  color: var(--text-heading);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 0.5rem;
}

.sidebar a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-block;
}

.sidebar a:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

.sidebar p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  background: var(--code-bg);
  color: var(--text-primary);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  transition: var(--transition-base);
  cursor: pointer;
}

.tag:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

/* ===== 表格 ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.info-table th {
  background: var(--accent);
  color: white;
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.info-table td {
  border: 1px solid var(--border-light);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  background: var(--bg-card-solid);
}

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

/* ===== 按钮 ===== */
.btn {
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.3);
}

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

/* ===== 统计数字 ===== */
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.stat-item {
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 768px) {
  .stats {
    gap: 1.5rem;
  }

  .stat-item {
    font-size: 2rem;
  }
}

/* ===== 引用 ===== */
blockquote {
  margin-top: 2rem;
  background: var(--code-bg);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  border-left: 4px solid var(--accent);
  font-style: italic;
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 3rem;
  color: var(--accent);
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  opacity: 0.3;
  font-family: var(--font-serif);
}

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

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

.footer a {
  color: #fca5a5;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

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

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

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li {
  margin-bottom: 0.5rem;
}

.copyright {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--footer-text);
  opacity: 0.8;
}

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

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

/* ===== 返回顶部 ===== */
#backTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: var(--transition-base);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#backTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backTop:hover {
  background: var(--accent-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

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

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

/* ===== 表格响应式 ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== 搜索框在侧边栏 ===== */
.sidebar input[type="text"] {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--code-bg);
  color: var(--text-primary);
  transition: var(--transition-base);
  outline: none;
  font-size: 0.9rem;
}

.sidebar input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

/* ===== 玻璃拟态效果增强 ===== */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
  .card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }

  .card h2 {
    font-size: 1.5rem;
  }

  .content-grid {
    gap: 1.5rem;
  }

  .banner-section {
    margin: 1.5rem 0;
  }

  .breadcrumb {
    margin: 1rem 0;
  }

  .search-box {
    display: none;
  }
}

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

  .card {
    padding: 1.2rem;
  }

  .card h2 {
    font-size: 1.3rem;
  }

  .slide h2 {
    font-size: 1.4rem;
  }

  .slide p {
    font-size: 0.95rem;
  }

  #backTop {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}

/* ===== 打印优化 ===== */
@media print {
  .navbar,
  .banner-section,
  .sidebar,
  #backTop,
  .footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

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

/* ===== 焦点样式 ===== */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

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

/* ===== 暗色模式适配 ===== */
[data-theme="dark"] .card {
  background: var(--bg-card-solid);
}

[data-theme="dark"] .slide {
  background: linear-gradient(120deg, #0f172a, #1e293b);
}

[data-theme="dark"] .btn:hover {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* ===== 动画效果 ===== */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

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

/* ===== 链接下划线动画 ===== */
.article-item a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.article-item a:hover::after {
  width: 100%;
}

/* ===== 新闻卡片悬停效果 ===== */
.article-item {
  position: relative;
  overflow: hidden;
}

.article-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  border-radius: 0 3px 3px 0;
}

.article-item:hover::before {
  transform: scaleY(1);
}

/* ===== 分隔线 ===== */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
  margin: 2rem 0;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none !important;
}

/* 确保内容可读性 */
p {
  word-break: break-word;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ===== 侧边栏卡片定位优化 ===== */
.sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}

@media (max-width: 1024px) {
  .sidebar {
    position: static;
  }
}

/* ===== 最后优化：性能 ===== */
* {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
  }
}

@media (hover: none) {
  .card:hover {
    transform: none;
  }
}
```