/* ==========================================================================
   蜜桃视频动漫 - 完整样式表
   风格：现代渐变 + 毛玻璃 + 柔和紫色系 + 暗色模式
   ========================================================================== */

/* ===== CSS 变量与主题 ===== */
:root {
  /* 主色调 */
  --primary: #7C5CFC;
  --primary-light: #9B7FFF;
  --primary-dark: #5A3BE0;
  --secondary: #FF6B9D;
  --accent: #FFB86C;
  
  /* 背景与文字 */
  --bg-body: #F8F4FF;
  --bg-card: #FFFFFF;
  --bg-card-transparent: rgba(255, 255, 255, 0.85);
  --bg-soft: #F0EBFF;
  --text-primary: #1A1A2E;
  --text-secondary: #2D2D44;
  --text-muted: #6B6B8A;
  
  /* 边框与阴影 */
  --border-light: rgba(124, 92, 252, 0.15);
  --shadow-sm: 0 2px 12px rgba(26, 26, 46, 0.08);
  --shadow-md: 0 4px 20px rgba(26, 26, 46, 0.12);
  --shadow-lg: 0 8px 30px rgba(26, 26, 46, 0.15);
  --shadow-primary: 0 4px 20px rgba(124, 92, 252, 0.25);
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #7C5CFC 0%, #9B7FFF 50%, #FF6B9D 100%);
  --gradient-banner: linear-gradient(135deg, rgba(124, 92, 252, 0.1) 0%, rgba(255, 107, 157, 0.08) 50%, rgba(255, 184, 108, 0.1) 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 235, 255, 0.9) 100%);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;
  
  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* 字体 */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* 过渡 */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* 毛玻璃 */
  --glass-blur: blur(20px);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 暗色模式 */
[data-theme="dark"] {
  --bg-body: #0D0820;
  --bg-card: #1A1A2E;
  --bg-card-transparent: rgba(26, 26, 46, 0.85);
  --bg-soft: #2D2D44;
  --text-primary: #F0EBFF;
  --text-secondary: #C4B8E8;
  --text-muted: #9B8FC0;
  --border-light: rgba(124, 92, 252, 0.25);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --gradient-card: linear-gradient(145deg, rgba(26, 26, 46, 0.95) 0%, rgba(45, 45, 68, 0.9) 100%);
  --glass-bg: rgba(26, 26, 46, 0.7);
  --glass-border: 1px solid rgba(124, 92, 252, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ===== 链接 ===== */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}

a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* ===== 头部导航 ===== */
.header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo h1 {
  font-size: 1.6rem;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition-smooth);
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航菜单 */
.menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.menu a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-banner);
  transition: left 0.3s ease;
  z-index: -1;
}

.menu a:hover {
  background: var(--bg-soft);
  color: var(--primary);
  transform: translateY(-2px);
}

.menu a:hover::before {
  left: 0;
}

.menu a::after {
  display: none;
}

.menu a.active {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}

/* ===== 主内容区 ===== */
.main {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

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

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ===== 区块样式 ===== */
.section {
  margin-bottom: var(--space-lg);
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

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

.section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* 区块标题 */
.section-title {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: 0.75rem;
  border-bottom: 3px solid transparent;
  border-image: var(--gradient-primary) 1;
  display: inline-block;
  font-weight: 700;
  position: relative;
  transition: var(--transition-smooth);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

/* ===== 网格卡片 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.2rem;
}

.comic-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  border: 1px solid var(--border-light);
  position: relative;
  cursor: pointer;
}

.comic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.comic-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.comic-card:hover::before {
  opacity: 0.1;
}

.comic-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.comic-info {
  padding: 0.8rem;
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  transition: var(--transition-smooth);
}

.comic-card:hover .comic-info {
  background: var(--bg-soft);
}

.comic-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  transition: var(--transition-smooth);
}

.comic-card:hover .comic-name {
  color: var(--primary);
}

.comic-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  background: var(--gradient-primary);
  color: #FFFFFF !important;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-primary);
  letter-spacing: 0.5px;
}

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

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.4);
  color: #FFFFFF !important;
}

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

.btn:hover::after {
  width: 0;
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-primary) !important;
  margin-left: 0.5rem;
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #FFFFFF !important;
  box-shadow: var(--shadow-primary);
}

/* ===== 漫画详情 ===== */
.intro-text {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.intro-text p {
  margin-bottom: 1rem;
  text-indent: 2em;
}

.intro-text strong {
  color: var(--primary);
  font-weight: 600;
}

.intro-text img {
  float: left;
  margin-right: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.intro-text img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ===== 角色卡片 ===== */
.char-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.8rem 0;
  align-items: center;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.char-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.char-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

.char-card:hover::before {
  transform: scaleY(1);
}

.char-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-primary);
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.char-card:hover img {
  transform: rotate(10deg) scale(1.05);
}

.char-info {
  flex: 1;
}

.char-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.char-card:hover .char-name {
  color: var(--primary);
}

.char-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.2rem 0;
}

.char-desc {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ===== APP下载区 ===== */
.app-download {
  background: var(--gradient-banner);
  text-align: center;
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.app-download::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

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

.app-buttons {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== 用户评论 ===== */
.review-item {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.8rem 0;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  position: relative;
}

.review-item:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.review-header span:first-child {
  font-weight: 600;
  color: var(--primary);
}

.review-content {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* ===== 侧边栏 ===== */
.sidebar .section {
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.sidebar .section-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

/* 排行榜 */
.rank-list {
  list-style: none;
  counter-reset: rank;
}

.rank-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  counter-increment: rank;
}

.rank-list li::before {
  content: counter(rank);
  width: 24px;
  height: 24px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.rank-list li:nth-child(-n+3)::before {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}

.rank-list li:hover {
  padding-left: 0.5rem;
  color: var(--primary);
}

.rank-list li:hover::before {
  transform: scale(1.2);
  background: var(--gradient-primary);
  color: #FFFFFF;
}

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

/* 阅读统计 */
.stats {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.8rem;
  text-align: center;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-light);
}

.stats:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

.stats-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
  border-top: var(--glass-border);
  position: relative;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.footer-links a:hover {
  color: var(--primary);
  background: var(--bg-soft);
  transform: translateY(-2px);
}

.footer-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.3rem 0;
}

.footer-text a {
  color: var(--primary);
  margin: 0 0.3rem;
  font-size: 0.85rem;
}

.footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

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

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
  .main {
    gap: var(--space-md);
  }
  
  .sidebar {
    width: 260px;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    gap: 0.5rem;
  }
  
  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0;
  }
  
  .menu a {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  
  .main {
    flex-direction: column;
    padding: 1rem 0;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  .section {
    padding: var(--space-md);
  }
  
  .section-title {
    font-size: 1.2rem;
  }
  
  .intro-text img {
    float: none;
    margin-right: 0;
    width: 100%;
    height: auto;
  }
  
  .char-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .char-card:hover {
    transform: translateY(-4px);
  }
  
  .char-card::before {
    width: 100%;
    height: 4px;
    transform: scaleX(0);
  }
  
  .char-card:hover::before {
    transform: scaleX(1);
  }
  
  .app-download {
    padding: var(--space-lg);
  }
  
  .app-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-secondary {
    margin-left: 0;
  }
  
  .footer-links {
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
  }
  
  .logo h1 {
    font-size: 1.3rem;
  }
  
  .menu a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  
  .section {
    padding: var(--space-sm);
    border-radius: var(--radius-md);
  }
  
  .comic-info {
    padding: 0.6rem;
  }
  
  .comic-name {
    font-size: 0.85rem;
  }
  
  .comic-meta {
    font-size: 0.75rem;
  }
  
  .review-header {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ===== 暗色模式切换按钮 ===== */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  margin-left: 1rem;
  font-size: 1.2rem;
}

.theme-toggle:hover {
  transform: rotate(180deg) scale(1.1);
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-body);
}

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

/* ===== 选中文本样式 ===== */
::selection {
  background: var(--primary);
  color: #FFFFFF;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===== 工具类 ===== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
}

.hover-lift {
  transition: var(--transition-bounce);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* ===== 页面加载动画 ===== */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-body);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--bg-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== 打印样式 ===== */
@media print {
  .header,
  .sidebar,
  .footer,
  .app-download,
  .theme-toggle {
    display: none !important;
  }
  
  .main {
    display: block;
  }
  
  .section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  body {
    background: #FFFFFF;
    color: #000000;
  }
}

/* ===== 无障碍访问 ===== */
@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(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== 高对比度模式 ===== */
@media (prefers-contrast: high) {
  :root {
    --primary: #4A00E0;
    --bg-body: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #333333;
  }
}

/* ===== 小屏设备优化 ===== */
@media (max-width: 360px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }
  
  .menu {
    gap: 0.2rem;
  }
  
  .menu a {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .section-title {
    font-size: 1.1rem;
  }
}

/* ===== 横屏提示 ===== */
@media (orientation: landscape) and (max-height: 500px) {
  .header {
    position: relative;
  }
  
  .nav {
    height: auto;
    padding: 0.5rem 0;
  }
  
  .main {
    padding: 1rem 0;
  }
}

/* ===== 卡片悬停光效 ===== */
.comic-card::after {
  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;
  z-index: 3;
  pointer-events: none;
}

.comic-card:hover::after {
  left: 100%;
}

/* ===== 数字动画 ===== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-number {
  animation: countUp 0.6s ease forwards;
}

/* ===== 背景装饰 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(124, 92, 252, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 157, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ===== 标题装饰 ===== */
h2, h3 {
  position: relative;
}

h2::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity 0.3s ease;
}

h2:hover::before {
  opacity: 1;
}

/* ===== 链接图标动画 ===== */
.footer-links a::after {
  display: none;
}

.footer-links a:hover {
  transform: translateY(-2px);
}

/* ===== 章节分隔线 ===== */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.2;
  margin: var(--space-lg) 0;
  border: none;
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-bounce);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}