/* ============================================================
   洞洞杂货店漫画平台 - 完整样式表
   风格：紫罗兰梦境 / 毛玻璃 + 渐变 + 圆角
   ============================================================ */

/* ---------- CSS 变量与暗色模式 ---------- */
:root {
  --primary: #6d28d9;
  --primary-light: #8b5cf6;
  --primary-dark: #4c1d95;
  --accent: #c084fc;
  --bg: #f5f3ff;
  --bg-soft: #ede9fe;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(255, 255, 255, 0.3);
  --text: #2d2a3d;
  --text-secondary: #5b5270;
  --text-muted: #7a7290;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(109, 40, 217, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --header-grad: linear-gradient(135deg, #6d28d9, #8b5cf6);
  --hero-grad: linear-gradient(135deg, #faf5ff, #ede9fe);
  --footer-bg: #2d1b4e;
  --footer-text: #c4b5fd;
  --badge-bg: #7c3aed;
  --tag-bg: #f3e8ff;
  --tag-text: #6d28d9;
  --review-border: #8b5cf6;
  --rank-bg: #f3e8ff;
  --stat-bg: #faf5ff;
  --success: #10b981;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1625;
    --bg-soft: #2a2138;
    --card-bg: rgba(40, 32, 55, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #e8e6f0;
    --text-secondary: #b8b0cc;
    --text-muted: #8f86a3;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(40, 32, 55, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --hero-grad: linear-gradient(135deg, #241d33, #2a2138);
    --tag-bg: rgba(109, 40, 217, 0.2);
    --tag-text: #c084fc;
    --rank-bg: rgba(109, 40, 217, 0.15);
    --stat-bg: rgba(109, 40, 217, 0.1);
    --footer-bg: #120d1c;
    --footer-text: #8b7fb0;
  }
}

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

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

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

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

/* ---------- 顶部导航 ---------- */
header {
  background: var(--header-grad);
  color: #fff;
  padding: 20px 0;
  box-shadow: 0 4px 20px rgba(109, 40, 217, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.95), rgba(139, 92, 246, 0.95));
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.logo h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #fff, #f0e6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  font-size: 0.9rem;
  opacity: 0.9;
  display: block;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

nav.main-nav ul {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

nav.main-nav a {
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

nav.main-nav a:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- Hero 区域 ---------- */
.hero {
  background: var(--hero-grad);
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite;
}

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

.hero h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 50px 0;
  animation: fadeInUp 0.6s ease;
}

.section-title {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  font-weight: 700;
  transition: color 0.4s ease;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ---------- 网格系统 ---------- */
.grid {
  display: grid;
  gap: 25px;
}

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

/* ---------- 漫画卡片 ---------- */
.manga-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease both;
}

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

.manga-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-soft);
}

.manga-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.manga-card:hover .manga-cover img {
  transform: scale(1.08);
}

.manga-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--badge-bg);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.manga-info {
  padding: 15px;
}

.manga-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

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

.manga-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.manga-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 2px 10px;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.tag:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ---------- 详情区 ---------- */
.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.5s ease;
}

.detail-img img:hover {
  transform: scale(1.02);
}

.detail-content h3 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.detail-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.detail-content p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.95rem;
  text-indent: 2em;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- 角色卡片 ---------- */
.char-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.char-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

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

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

.char-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  overflow: hidden;
  border: 4px solid var(--bg-soft);
  background: var(--bg-soft);
  transition: var(--transition);
  position: relative;
}

.char-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.char-card:hover .char-avatar::after {
  opacity: 1;
}

.char-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-card h4 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.char-card .role {
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
}

.char-card .ability {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 8px 0;
}

.char-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.5;
}

/* ---------- 平台介绍 ---------- */
.platform {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.platform::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.1;
}

.platform h3 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.platform p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.95rem;
  text-indent: 2em;
  line-height: 1.8;
}

/* ---------- APP 下载区 ---------- */
.app-download {
  background: var(--header-grad);
  border-radius: 20px;
  padding: 50px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(109, 40, 217, 0.3);
}

.app-download::before,
.app-download::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.app-download::before {
  width: 200px;
  height: 200px;
  top: -50px;
  left: -50px;
}

.app-download::after {
  width: 150px;
  height: 150px;
  bottom: -30px;
  right: -30px;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.app-download h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.app-download p {
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  background: #fff;
  color: var(--primary);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ---------- 用户评论 ---------- */
.review-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--review-border);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--review-border);
}

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

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
  border: 2px solid var(--accent);
}

.review-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.review-user {
  font-weight: 600;
  color: var(--text);
}

.review-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 100px;
}

.sidebar h3 {
  color: var(--primary-dark);
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-soft);
  position: relative;
}

.sidebar h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-soft);
  gap: 12px;
  transition: var(--transition);
  border-radius: 8px;
  padding: 10px;
}

.rank-item:hover {
  background: var(--bg-soft);
  padding-left: 15px;
}

.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rank-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.rank-num.top {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-info h4 {
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rank-growth {
  color: var(--success);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ---------- 统计网格 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.stat-item {
  background: var(--stat-bg);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--card-border);
}

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

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ---------- 主布局 ---------- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

/* ---------- 页脚 ---------- */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0;
  margin-top: 50px;
  transition: background 0.4s ease, color 0.4s ease;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 5px 10px;
  border-radius: 20px;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.copyright {
  text-align: center;
  font-size: 0.85rem;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* 滚动动画 */
@media (prefers-reduced-motion: no-preference) {
  .section {
    animation: fadeInUp 0.6s ease both;
  }
  
  .manga-card:nth-child(2n) { animation-delay: 0.1s; }
  .manga-card:nth-child(3n) { animation-delay: 0.2s; }
  .manga-card:nth-child(4n) { animation-delay: 0.3s; }
  .manga-card:nth-child(5n) { animation-delay: 0.4s; }
  .manga-card:nth-child(6n) { animation-delay: 0.5s; }
  
  .review-card:nth-child(2n) { animation-delay: 0.1s; }
  .review-card:nth-child(3n) { animation-delay: 0.2s; }
  .review-card:nth-child(4n) { animation-delay: 0.3s; }
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 1200px) {
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-wrap {
    grid-template-columns: 1fr;
  }
  
  .main-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    margin-top: 30px;
  }
}

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

@media (max-width: 768px) {
  .grid-6, .grid-4, .grid-3, .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-wrap {
    flex-direction: column;
    text-align: center;
  }
  
  .main-nav ul {
    justify-content: center;
    gap: 15px;
  }
  
  .main-nav a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .hero h2 {
    font-size: 1.6rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section {
    padding: 30px 0;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .detail-wrap, .platform {
    padding: 20px;
  }
  
  .app-download {
    padding: 30px 20px;
  }
  
  .app-download h3 {
    font-size: 1.4rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .logo h1 {
    font-size: 1.6rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .grid-6, .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }
  
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.2rem;
  }
  
  .manga-info h3 {
    font-size: 0.9rem;
  }
  
  .manga-info p {
    font-size: 0.75rem;
  }
  
  .detail-content h3 {
    font-size: 1.2rem;
  }
  
  .detail-content p {
    font-size: 0.85rem;
  }
  
  .char-avatar {
    width: 80px;
    height: 80px;
  }
  
  .footer-links {
    gap: 10px;
  }
  
  .footer-links a {
    font-size: 0.8rem;
  }
  
  .copyright {
    font-size: 0.75rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .stat-num {
    font-size: 1.2rem;
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  header, footer, .btn-group, .app-download {
    display: none;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .manga-card, .char-card, .review-card, .detail-wrap, .platform {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

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

/* ---------- 焦点可见性 ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---------- 链接悬停效果 ---------- */
a:not(.btn):not(.btn-outline):hover {
  color: var(--primary);
}

/* ---------- 图片懒加载占位 ---------- */
img[loading="lazy"] {
  background: var(--bg-soft);
  position: relative;
}

img[loading="lazy"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- 暗色模式图片适配 ---------- */
@media (prefers-color-scheme: dark) {
  .manga-cover img, 
  .detail-img img,
  .char-avatar img,
  .review-avatar img {
    filter: brightness(0.9) contrast(1.1);
  }
}

/* ---------- 悬停时毛玻璃加深 ---------- */
.manga-card:hover,
.char-card:hover,
.review-card:hover,
.sidebar:hover {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- 滚动指示器 ---------- */
.hero::after {
  content: '↓ 向下滚动发现更多';
  display: block;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
  position: relative;
  z-index: 1;
}

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

/* ---------- 响应式字体 ---------- */
html {
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
}

/* ---------- 容器宽度适配 ---------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}

/* ---------- 结束 ---------- */