/* ============================================
   奇热漫画 - 完整样式表
   风格：梦幻紫渐变 + 玻璃拟态 + 现代圆角
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色调 */
  --primary: #7C5CFC;
  --primary-light: #A78BFA;
  --primary-dark: #5A3FE0;
  --primary-glow: rgba(124, 92, 252, 0.3);
  
  /* 辅助色 */
  --accent: #FF6B9D;
  --accent-light: #FFB3C7;
  --gradient-main: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  --gradient-hero: linear-gradient(135deg, #F0EBFF 0%, #E8E0FF 50%, #FDF4FF 100%);
  --gradient-card: linear-gradient(145deg, #F8F4FF 0%, #FFFFFF 100%);
  
  /* 文字颜色 */
  --text-primary: #1A1A2E;
  --text-secondary: #2D2D44;
  --text-muted: #6B7280;
  --text-on-dark: #FFFFFF;
  
  /* 背景色 */
  --bg-body: #FDFBFF;
  --bg-white: #FFFFFF;
  --bg-light: #F8F4FF;
  --bg-glass: rgba(255, 255, 255, 0.7);
  
  /* 边框 */
  --border-light: #E8E0F0;
  --border-primary: rgba(124, 92, 252, 0.2);
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 25px rgba(124, 92, 252, 0.2);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  
  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* 字体 */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  
  /* 动画 */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* 毛玻璃 */
  --glass-blur: blur(20px);
  --glass-saturate: saturate(180%);
}

/* ---------- 暗色模式 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #E5E0F0;
    --text-secondary: #B8B0CC;
    --text-muted: #8A8494;
    --bg-body: #12101A;
    --bg-white: #1A1725;
    --bg-light: #221E30;
    --bg-glass: rgba(26, 23, 37, 0.75);
    --border-light: #2E2A3D;
    --border-primary: rgba(167, 139, 250, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 8px 25px rgba(124, 92, 252, 0.3);
    --gradient-hero: linear-gradient(135deg, #1E1A2E 0%, #2A2440 50%, #1A1725 100%);
    --gradient-card: linear-gradient(145deg, #221E30 0%, #1A1725 100%);
  }
  
  body {
    background-color: var(--bg-body);
  }
  
  .comic-card,
  .character-card,
  .review-card,
  .sidebar {
    background: var(--bg-light);
  }
  
  .featured-card {
    background: var(--bg-white);
    border-color: var(--border-light);
  }
  
  .stat-item {
    background: var(--bg-light);
  }
  
  .site-footer {
    background: #1A1725;
  }
  
  .app-download {
    background: linear-gradient(135deg, #221E30 0%, #1A1725 100%);
  }
  
  .btn-secondary {
    background: var(--bg-white);
  }
}

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

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 15% 20%, var(--primary-glow) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 107, 157, 0.15) 0%, transparent 40%);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* ---------- 链接样式 ---------- */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

/* ---------- 容器 ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- 头部 ---------- */
.site-header {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
  border-bottom: 2px solid var(--border-primary);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.6s ease both;
}

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

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

/*  Logo */
.logo h1 {
  font-size: var(--font-size-3xl);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.logo h1:hover {
  transform: scale(1.02);
}

.logo h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 2px;
}

/* 导航 */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.main-nav a {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.main-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-full);
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-base);
  z-index: -1;
}

.main-nav a:hover::before {
  opacity: 1;
  transform: scale(1);
}

.main-nav a:hover {
  color: var(--text-on-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* ---------- Hero 区域 ---------- */
.hero {
  background: var(--gradient-hero);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease both;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(124, 92, 252, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite alternate;
  pointer-events: none;
}

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

.hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

/* ---------- 章节标题 ---------- */
.section-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--primary);
  display: inline-block;
  position: relative;
  font-weight: 700;
}

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

.section-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin: var(--space-lg) 0 var(--space-md);
  font-weight: 600;
}

/* ---------- 网格布局 ---------- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.comics-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.characters-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ---------- 漫画卡片 ---------- */
.comic-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
  position: relative;
  animation: fadeInUp 0.6s ease both;
  animation-delay: calc(var(--card-index, 0) * 0.05s);
}

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

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

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

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

.comic-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

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

.comic-info {
  padding: var(--space-md) var(--space-md);
}

.comic-info h3 {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  font-weight: 700;
  transition: color var(--transition-fast);
}

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

.comic-info p {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 2px;
  line-height: 1.5;
}

.comic-info .tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-on-dark);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  margin-top: var(--space-xs);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
}

.comic-card:hover .tag {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transform: scale(1.05);
}

/* ---------- 特色卡片 ---------- */
.featured-card {
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
  animation-delay: calc(var(--card-index, 0) * 0.05s);
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.featured-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
}

.featured-card:hover img {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.featured-card h3 {
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.featured-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- 角色卡片 ---------- */
.character-card {
  text-align: center;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
  animation: fadeInUp 0.6s ease both;
  animation-delay: calc(var(--card-index, 0) * 0.05s);
}

.character-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-primary);
  border-color: var(--primary);
}

.character-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-md);
  border: 3px solid var(--primary);
  padding: 3px;
  background: var(--bg-white);
  transition: all var(--transition-base);
}

.character-card:hover img {
  transform: scale(1.05) rotate(5deg);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--primary-glow);
}

.character-card h3 {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: 700;
}

.character-card .role {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.character-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- 内容区块 ---------- */
.content-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  animation: fadeIn 0.8s ease both;
}

.content-section:hover {
  box-shadow: var(--shadow-lg);
}

.content-section p {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: var(--font-size-base);
}

.content-section h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-xl);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- APP 下载区域 ---------- */
.app-download {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  margin: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-primary);
  animation: fadeIn 0.8s ease both;
}

.app-download::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(124, 92, 252, 0.2) 0%, transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(255, 107, 157, 0.15) 0%, transparent 40%);
  animation: float 6s ease-in-out infinite alternate;
}

.app-download h2 {
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-3xl);
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.app-download p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
  font-size: var(--font-size-base);
}

/* ---------- 按钮 ---------- */
.btn-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  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::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-on-dark);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(124, 92, 252, 0.4);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* ---------- 评论区 ---------- */
.review-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  border-left: 4px solid var(--primary);
  transition: all var(--transition-base);
  animation: fadeInUp 0.5s ease both;
  animation-delay: calc(var(--card-index, 0) * 0.03s);
}

.review-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
  background: var(--bg-white);
}

.review-card .user {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.review-card .user::before {
  content: '👤';
  font-size: var(--font-size-sm);
}

.review-card .time {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.review-card .time::before {
  content: '🕐';
  font-size: var(--font-size-xs);
}

.review-card p {
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur) var(--glass-saturate);
  -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
  border: 1px solid var(--border-light);
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.8s ease both;
}

.sidebar h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-primary);
}

.rank-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.rank-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  font-size: var(--font-size-sm);
}

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

.rank-list li:hover {
  padding-left: var(--space-sm);
  color: var(--primary);
  background: rgba(124, 92, 252, 0.05);
  border-radius: var(--radius-sm);
}

.rank-list .rank {
  font-weight: 700;
  color: var(--primary);
  margin-right: var(--space-sm);
  background: var(--bg-light);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  transition: all var(--transition-base);
}

.rank-list li:hover .rank {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text-on-dark);
  transform: scale(1.1);
}

.rank-list li:nth-child(1) .rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
}

.rank-list li:nth-child(2) .rank {
  background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
  color: #fff;
}

.rank-list li:nth-child(3) .rank {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: #fff;
}

/* 统计卡片 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.stat-item {
  text-align: center;
  background: var(--bg-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-item .number {
  font-size: var(--font-size-xl);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ---------- 主布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-xl);
}

.main-content {
  min-width: 0;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--bg-light);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.footer-links a {
  color: var(--primary);
  font-size: var(--font-size-sm);
  position: relative;
  padding: var(--space-xs) 0;
  transition: all var(--transition-base);
}

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

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

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

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-lg);
}

.footer-bottom p {
  margin-bottom: var(--space-xs);
  line-height: 1.8;
}

.footer-bottom a {
  color: var(--primary);
  transition: color var(--transition-fast);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    margin-top: var(--space-xl);
  }
  
  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  
  .main-nav ul {
    gap: var(--space-xs);
    justify-content: center;
  }
  
  .main-nav a {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
  }
  
  .hero {
    padding: var(--space-xl) 0;
  }
  
  .hero h2 {
    font-size: var(--font-size-2xl);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
    margin-top: var(--space-xl);
  }
  
  .comics-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
  }
  
  .featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }
  
  .characters-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
  }
  
  .comic-card img {
    height: 180px;
  }
  
  .content-section {
    padding: var(--space-lg);
  }
  
  .app-download {
    padding: var(--space-xl) var(--space-md);
  }
  
  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  .stat-item .number {
    font-size: var(--font-size-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .comics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .comic-card img {
    height: 160px;
  }
  
  .comic-info {
    padding: var(--space-sm);
  }
  
  .comic-info h3 {
    font-size: var(--font-size-sm);
  }
  
  .comic-info p {
    font-size: var(--font-size-xs);
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .character-card {
    padding: var(--space-md) var(--space-sm);
  }
  
  .character-card img {
    width: 100px;
    height: 100px;
  }
  
  .content-section {
    padding: var(--space-md);
  }
  
  .app-download {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .app-download h2 {
    font-size: var(--font-size-xl);
  }
  
  .footer-links {
    gap: var(--space-sm);
  }
  
  .footer-links a {
    font-size: var(--font-size-xs);
  }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  .site-header,
  .hero,
  .sidebar,
  .app-download,
  .site-footer {
    display: none;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .container {
    max-width: 100%;
  }
  
  .content-section {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

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

/* ---------- 选择文本 ---------- */
::selection {
  background: var(--primary);
  color: var(--text-on-dark);
}

/* ---------- 图片加载动画 ---------- */
img {
  background: linear-gradient(90deg, var(--bg-light) 25%, var(--border-light) 50%, var(--bg-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ---------- 标题动画 ---------- */
.section-title {
  position: relative;
  overflow: hidden;
}

.section-title::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

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

/* ---------- 卡片交错动画 ---------- */
.comic-card:nth-child(odd),
.featured-card:nth-child(odd),
.character-card:nth-child(odd) {
  --card-index: 1;
}

.comic-card:nth-child(even),
.featured-card:nth-child(even),
.character-card:nth-child(even) {
  --card-index: 2;
}

/* ---------- 顶部进度条 ---------- */
.site-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* ---------- 滚动提示 ---------- */
.hero {
  position: relative;
}

.hero::after {
  content: '↓';
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-xl);
  color: var(--primary);
  animation: bounce 2s ease infinite;
  opacity: 0.6;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ---------- 星空背景效果 ---------- */
.hero {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
    radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    var(--gradient-hero);
  background-size: 100px 100px, 150px 150px, 120px 120px, 180px 180px, 140px 140px, 100% 100%;
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 20px 20px, -20px 10px, 10px -20px, -10px 20px, 20px -10px, 0 0;
  }
}

/* ---------- 暗色模式星空调整 ---------- */
@media (prefers-color-scheme: dark) {
  .hero {
    background-image: 
      radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
      radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
      radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
      radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
      radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
      var(--gradient-hero);
  }
}

/* ---------- 按钮点击效果 ---------- */
.btn:active {
  transform: scale(0.95);
}

/* ---------- 卡片链接区域 ---------- */
.comic-card a,
.featured-card a {
  color: inherit;
}

.comic-card a:hover,
.featured-card a:hover {
  text-decoration: none;
  color: inherit;
}

/* ---------- 图片 hover 效果 ---------- */
.comic-card img,
.featured-card img,
.character-card img {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

/* ---------- 侧边栏 sticky 优化 ---------- */
@media (min-width: 1025px) {
  .sidebar {
    position: sticky;
    top: calc(80px + var(--space-lg));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  
  .sidebar::-webkit-scrollbar {
    width: 6px;
  }
}

/* ---------- 页面加载动画 ---------- */
body {
  animation: pageLoad 0.5s ease both;
}

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

/* ---------- 辅助功能 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- 暗色模式过渡 ---------- */
body,
.site-header,
.hero,
.comic-card,
.featured-card,
.character-card,
.content-section,
.app-download,
.review-card,
.sidebar,
.site-footer {
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}