/* =========================================================
   星辰影视 · 极致光影 · 沉浸式追剧体验
   暗夜星云主题 · 全响应式 · 毛玻璃美学
   ========================================================= */

:root {
  --bg-deep: #06060f;
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f24;
  --bg-card: rgba(22, 22, 48, 0.65);
  --bg-glass: rgba(18, 18, 44, 0.55);
  --bg-hover: rgba(30, 30, 66, 0.8);

  --border-color: rgba(139, 92, 246, 0.18);
  --border-light: rgba(139, 92, 246, 0.35);
  --border-glow: rgba(139, 92, 246, 0.65);

  --text-primary: #f0f0ff;
  --text-secondary: rgba(224, 224, 240, 0.75);
  --text-dim: rgba(160, 160, 200, 0.55);
  --text-muted: rgba(130, 130, 170, 0.5);

  --accent-violet: #8b5cf6;
  --accent-purple: #7c3aed;
  --accent-indigo: #6366f1;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --accent-glow-strong: rgba(139, 92, 246, 0.6);
  --accent-pink: #ec4899;
  --accent-cyan: #22d3ee;

  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  --gradient-text: linear-gradient(135deg, #c4b5fd, #a78bfa, #8b5cf6);
  --gradient-btn: linear-gradient(135deg, #7c3aed, #6d28d9);
  --gradient-btn-hover: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --gradient-card-hover: linear-gradient(145deg, rgba(139, 92, 246, 0.08) 0%, transparent 60%);

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 8px 32px rgba(139, 92, 246, 0.22);
  --shadow-accent-hover: 0 12px 40px rgba(139, 92, 246, 0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(139, 92, 246, 0.13), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(99, 102, 241, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(139, 92, 246, 0.06), transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  animation: aurora 30s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(5%, -3%) rotate(5deg); }
  100% { transform: translate(-3%, 5%) rotate(-5deg); }
}

img {
  max-width: 100%;
  display: block;
  background: #14142e;
  object-fit: cover;
}

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

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

ul,
ol {
  list-style: none;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-violet), var(--accent-indigo));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--accent-pink), var(--accent-violet));
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ========== 头部导航 ========== */
.site-header {
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.site-header.scrolled {
  background: rgba(6, 6, 15, 0.95);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-glow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.logo {
  position: relative;
}

.logo h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 2px;
  font-family: var(--font-display);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  line-height: 1.2;
}

.logo h1::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0.6;
}

.logo h1 a {
  background: inherit;
  -webkit-background-clip: inherit;
  background-clip: inherit;
  -webkit-text-fill-color: inherit;
  color: inherit;
  text-decoration: none;
}

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

.main-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition-base);
  letter-spacing: 0.3px;
}

.main-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-btn);
  border-radius: var(--radius-full);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-base);
}

.main-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(139, 92, 246, 0.15);
}

.main-nav a:hover::before {
  opacity: 0.15;
}

.main-nav a.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 0 0 1px var(--border-light);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ========== 主内容布局 ========== */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
  margin: 32px 0;
  align-items: start;
}

.main-column,
aside {
  animation: fadeInUp 0.6s ease-out both;
}

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

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

/* ========== 卡片通用 ========== */
section,
aside > div {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

section::before,
aside [class*="side-card"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
  opacity: 0.5;
}

section:hover,
aside [class*="side-card"]:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
  box-shadow: var(--shadow-accent);
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-family: var(--font-display);
  position: relative;
  padding-left: 20px;
  letter-spacing: 0.5px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 55%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px var(--accent-glow);
}

h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin: 0 0 10px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}

/* ========== 热门漫画卡片 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(26, 26, 53, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  cursor: pointer;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-card-hover);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
  pointer-events: none;
}

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

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

.card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-base);
}

.card:hover img {
  transform: scale(1.06);
  filter: brightness(1.1) saturate(1.1);
}

.card-body {
  padding: 14px 14px 18px;
  position: relative;
  z-index: 2;
}

.card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  transition: color var(--transition-fast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card:hover .card-body h3 {
  color: var(--accent-pink);
}

.card-body p {
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 8px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.card:hover .badge {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--border-glow);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ========== 精品推荐 ========== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.rec-card {
  background: rgba(28, 28, 62, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.rec-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.rec-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-accent-hover);
}

.rec-card:hover::after {
  opacity: 1;
}

.rec-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-base);
}

.rec-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.rec-body {
  padding: 18px;
  position: relative;
  z-index: 1;
}

.rec-body h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.rec-body p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.rec-body p:last-child {
  margin-top: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 详细介绍 ========== */
#detail article {
  background: rgba(22, 22, 48, 0.7);
  backdrop-filter: blur(8px);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  line-height: 1.8;
  position: relative;
  overflow: hidden;
}

#detail article::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
  pointer-events: none;
}

#detail article h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

#detail article p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

#detail article strong {
  color: var(--accent-violet);
  font-weight: 600;
}

#detail article p:last-child {
  margin-bottom: 0;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.03);
  padding: 16px;
  border-radius: var(--radius-sm);
}

/* ========== 角色介绍 ========== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

.character-card {
  background: rgba(26, 26, 53, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

.character-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-accent);
}

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

.character-card img {
  border-radius: 50%;
  margin: 0 auto 16px;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary)) padding-box,
    var(--gradient-primary) border-box;
  transition: all var(--transition-base);
  box-shadow: 0 0 0 3px transparent;
}

.character-card:hover img {
  transform: scale(1.08);
  box-shadow: 0 0 30px var(--accent-glow);
  border-color: var(--accent-violet);
}

.character-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.char-identity {
  color: var(--accent-violet);
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.char-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* ========== 平台介绍与APP ========== */
#platform > div {
  background: rgba(20, 20, 46, 0.8);
  padding: 20px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  line-height: 1.8;
  border: 1px solid var(--border-color);
}

#platform p {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

#platform p:last-child {
  margin-bottom: 0;
}

#platform strong {
  color: var(--accent-violet);
  font-weight: 600;
  background: rgba(139, 92, 246, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ========== 按钮 ========== */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: #fff;
  background: var(--gradient-btn);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-accent);
  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.15), transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-accent-hover);
  color: #fff;
  text-decoration: none;
}

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

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

.btn-light {
  background: rgba(45, 45, 85, 0.8);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-light:hover {
  background: rgba(60, 60, 110, 0.9);
  color: var(--accent-cyan);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.15);
}

/* ========== 用户评论 ========== */
.comment-item {
  background: rgba(26, 26, 53, 0.85);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  animation: fadeInUp 0.4s ease-out both;
}

.comment-item:nth-child(2) { animation-delay: 0.1s; }
.comment-item:nth-child(3) { animation-delay: 0.2s; }
.comment-item:nth-child(4) { animation-delay: 0.3s; }
.comment-item:nth-child(5) { animation-delay: 0.4s; }
.comment-item:nth-child(6) { animation-delay: 0.5s; }
.comment-item:nth-child(7) { animation-delay: 0.6s; }
.comment-item:nth-child(8) { animation-delay: 0.7s; }

.comment-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-glow);
  transform: translateX(4px);
  box-shadow: var(--shadow-accent);
}

.comment-user {
  color: var(--accent-violet);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment-user::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-violet);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 8px;
  font-family: monospace;
}

.comment-text {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 14px;
  border-left: 2px solid rgba(139, 92, 246, 0.2);
}

/* ========== 侧边栏 ========== */
aside {
  position: sticky;
  top: 100px;
}

.side-card {
  background: rgba(20, 20, 46, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
  transition: all var(--transition-base);
}

.side-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-accent);
}

.side-card h3 {
  font-size: 1.2rem;
  border-bottom: 2px solid rgba(139, 92, 246, 0.2);
  padding-bottom: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-item,
.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(139, 92, 246, 0.15);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  cursor: default;
}

.rank-item:last-child,
.stat-item:last-child {
  border-bottom: none;
}

.rank-item:hover,
.stat-item:hover {
  background: rgba(139, 92, 246, 0.05);
  padding-left: 8px;
  padding-right: 8px;
  border-radius: var(--radius-sm);
}

.rank-item span:first-child {
  color: var(--accent-violet);
  font-weight: 500;
}

.rank-item span:last-child {
  font-weight: 700;
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.stat-item span:first-child {
  color: var(--text-secondary);
}

.stat-item span:last-child {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ========== 页脚 ========== */
footer {
  background: rgba(6, 6, 15, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 30px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

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

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

.copyright {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  padding-top: 20px;
}

.copyright a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* 滚动显示动画 */
section[id] {
  animation: fadeInUp 0.6s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

/* 卡片延迟入场 */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }
.card:nth-child(7) { animation-delay: 0.3s; }
.card:nth-child(8) { animation-delay: 0.35s; }

/* ========== 响应式布局 ========== */
@media (max-width: 1200px) {
  .content-layout {
    grid-template-columns: 1fr 300px;
    gap: 24px;
  }
}

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

  aside {
    position: static;
    margin-top: 0;
  }

  .header-inner {
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
  }

  .logo h1 {
    font-size: 1.7rem;
  }

  .main-nav ul {
    justify-content: center;
  }

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

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

  .content-layout {
    gap: 16px;
    margin: 16px 0;
  }

  section,
  aside > div {
    padding: 20px;
    border-radius: var(--radius-md);
  }

  h2 {
    font-size: 1.5rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }

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

  .character-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

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

  .main-nav a {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .btn-group {
    gap: 12px;
  }

  .header-inner {
    padding: 10px 0;
  }

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

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

  section,
  aside > div {
    padding: 16px;
  }

  h2 {
    font-size: 1.3rem;
    padding-left: 16px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .card-body {
    padding: 10px;
  }

  .card-body h3 {
    font-size: 0.9rem;
  }

  .card-body p {
    font-size: 0.7rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .character-card {
    padding: 14px;
  }

  .character-card img {
    width: 90px;
    height: 90px;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    gap: 8px 16px;
  }

  .footer-links a {
    font-size: 0.8rem;
  }

  .comment-item {
    padding: 12px;
  }
}

/* ========== 暗色模式增强 ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-deep: #05050d;
    --bg-primary: #080816;
    --bg-secondary: #0c0c1e;
    --bg-card: rgba(14, 14, 34, 0.7);
    --text-primary: #f0f0ff;
    --text-secondary: rgba(200, 200, 225, 0.85);
  }
}

/* ========== 无障碍与可访问性 ========== */
@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;
  }
}

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

/* 高亮文本 */
::selection {
  background: rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
}

/* 图片加载占位 */
img {
  background: linear-gradient(135deg, #14142e 0%, #1c1c3a 50%, #14142e 100%);
  background-size: 200% 200%;
  animation: shimmer 2s ease-in-out infinite;
}

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

/* ========== 星空点缀 ========== */
.main-column::before,
aside::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

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

@media (hover: hover) and (pointer: fine) {
  .card,
  .rec-card,
  .character-card,
  .btn {
    will-change: transform;
  }
}