/* ============================================
   老司机漫画 - 全站样式表
   Design System: 紫罗兰梦境 · 毛玻璃 · 柔光渐变
   ============================================ */

/* ---------- CSS 变量与主题 ---------- */
:root {
  --bg-primary: #F8F4FF;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-gradient: linear-gradient(135deg, #F0EBFF 0%, #E8E0F5 50%, #DCD0FF 100%);
  --bg-banner: linear-gradient(135deg, #7C5CFC 0%, #9B7BFF 40%, #B8A5FF 100%);
  
  --text-primary: #1A1A2E;
  --text-secondary: #2D2D44;
  --text-muted: #5A5A7A;
  --text-light: #B8A5FF;
  
  --accent: #7C5CFC;
  --accent-light: #9B7BFF;
  --accent-lighter: #B8A5FF;
  --accent-soft: #F0EBFF;
  
  --border-soft: #E8E0F5;
  --border-glass: rgba(255, 255, 255, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 4px 20px rgba(124, 92, 252, 0.35);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  
  --font-main: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  --nav-height: 70px;
  --container-max: 1400px;
}

/* ---------- 暗色模式 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0F0B1E;
    --bg-secondary: #1A1630;
    --bg-card: rgba(26, 22, 48, 0.85);
    --bg-glass: rgba(26, 22, 48, 0.7);
    --bg-gradient: linear-gradient(135deg, #1A1630 0%, #241D3D 50%, #2D2547 100%);
    --bg-banner: linear-gradient(135deg, #5B3FD4 0%, #7C5CFC 50%, #9B7BFF 100%);
    
    --text-primary: #F0EBFF;
    --text-secondary: #D4CCE8;
    --text-muted: #9A8FBF;
    --text-light: #B8A5FF;
    
    --accent: #9B7BFF;
    --accent-light: #B8A5FF;
    --accent-lighter: #D4CCE8;
    --accent-soft: #2D2547;
    
    --border-soft: #3A2F5A;
    --border-glass: rgba(255, 255, 255, 0.1);
    
    --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 32px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(155, 123, 255, 0.4);
  }
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(124, 92, 252, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(155, 123, 255, 0.05) 0%, transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style-position: inside;
}

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

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

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

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

/* ---------- 顶部导航 ---------- */
header {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

header:hover {
  box-shadow: var(--shadow-md);
}

header nav {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  min-height: var(--nav-height);
  gap: 20px;
}

header nav > div:first-child {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

header nav a[href="/"] {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

header nav a[href="/"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-normal);
}

header nav a[href="/"]:hover::after {
  width: 100%;
}

header nav a[href="/"] span {
  font-size: 28px;
  display: inline-block;
  animation: logoFloat 3s ease-in-out infinite;
}

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

header nav h1 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

header nav > div:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

header nav a[href^="#"] {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

header nav a[href^="#"]:hover {
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

header nav a[href^="#"]::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition-normal);
}

header nav a[href^="#"]:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---------- 主内容区 ---------- */
main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 20px;
}

section {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease both;
}

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

section h2 {
  color: var(--text-primary);
  font-size: 26px;
  border-left: 4px solid var(--accent);
  padding-left: 15px;
  margin-bottom: 25px;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 15px;
  width: 40px;
  height: 2px;
  background: var(--accent-lighter);
  border-radius: 2px;
}

/* ---------- 漫画卡片通用 ---------- */
article[style*="background: #FFFFFF"],
article[style*="background: var(--bg-secondary)"] {
  background: var(--bg-card) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

article[style*="background: #FFFFFF"]:hover,
article[style*="background: var(--bg-secondary)"]:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

article[style*="background: #FFFFFF"] img,
article[style*="background: var(--bg-secondary)"] img {
  transition: transform var(--transition-slow);
}

article[style*="background: #FFFFFF"]:hover img,
article[style*="background: var(--bg-secondary)"]:hover img {
  transform: scale(1.05);
}

article[style*="background: #FFFFFF"] > div,
article[style*="background: var(--bg-secondary)"] > div {
  padding: 15px !important;
}

article h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--text-primary);
  font-weight: 600;
  transition: color var(--transition-fast);
}

article:hover h3 {
  color: var(--accent);
}

article p {
  margin: 0 0 5px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

article span[style*="background: #F0EBFF"] {
  background: var(--accent-soft) !important;
  color: var(--text-secondary) !important;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

article:hover span[style*="background: #F0EBFF"] {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ---------- 热门漫画网格 ---------- */
#hot > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

#hot article {
  animation: cardIn 0.5s ease both;
}

#hot article:nth-child(1) { animation-delay: 0.05s; }
#hot article:nth-child(2) { animation-delay: 0.1s; }
#hot article:nth-child(3) { animation-delay: 0.15s; }
#hot article:nth-child(4) { animation-delay: 0.2s; }
#hot article:nth-child(5) { animation-delay: 0.25s; }
#hot article:nth-child(6) { animation-delay: 0.3s; }
#hot article:nth-child(7) { animation-delay: 0.35s; }
#hot article:nth-child(8) { animation-delay: 0.4s; }
#hot article:nth-child(9) { animation-delay: 0.45s; }
#hot article:nth-child(10) { animation-delay: 0.5s; }
#hot article:nth-child(11) { animation-delay: 0.55s; }
#hot article:nth-child(12) { animation-delay: 0.6s; }
#hot article:nth-child(13) { animation-delay: 0.65s; }
#hot article:nth-child(14) { animation-delay: 0.7s; }
#hot article:nth-child(15) { animation-delay: 0.75s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 精品推荐 ---------- */
#recommend {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) !important;
  padding: 30px 24px !important;
  box-shadow: var(--shadow-md);
}

#recommend > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

#recommend article {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  transition: all var(--transition-normal);
}

#recommend article:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-lighter) !important;
}

#recommend article > div {
  padding: 18px !important;
}

#recommend article h3 {
  font-size: 19px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 8px;
}

#recommend article h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-normal);
}

#recommend article:hover h3::after {
  width: 60px;
}

#recommend article p:last-child {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- 漫画详细介绍 ---------- */
#intro {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) !important;
  padding: 30px 24px !important;
  box-shadow: var(--shadow-md);
}

#intro article {
  max-width: 900px;
  margin: 0 auto;
}

#intro h3 {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

#intro h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-lighter));
  border-radius: 3px;
}

#intro p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 2;
}

#intro p strong {
  color: var(--accent);
  font-weight: 600;
}

#intro a {
  color: var(--accent);
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

#intro a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

#intro a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- 角色介绍 ---------- */
#characters > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

#characters article {
  text-align: center;
  padding: 24px 20px !important;
  background: var(--bg-card) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-normal);
}

#characters article:hover {
  transform: translateY(-6px) rotate(0.5deg);
  box-shadow: var(--shadow-lg);
}

#characters article img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
  border: 3px solid var(--accent-soft);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

#characters article:hover img {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: var(--shadow-accent);
}

#characters article h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

#characters article p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

#characters article p:first-of-type {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- 平台介绍 ---------- */
#platform {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) !important;
  padding: 30px 24px !important;
  box-shadow: var(--shadow-md);
}

#platform article {
  max-width: 900px;
  margin: 0 auto;
}

#platform p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 2;
}

#platform p strong {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- APP下载 ---------- */
#download {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-secondary) 100%) !important;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) !important;
  padding: 40px 24px !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#download::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}

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

#download h2 {
  position: relative;
  z-index: 1;
}

#download p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

#download p:nth-of-type(2) {
  font-size: 15px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
  color: var(--text-muted);
}

#download > div:last-child {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

#download a {
  display: inline-block;
  padding: 14px 35px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

#download a::before {
  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 var(--transition-slow);
}

#download a:hover::before {
  left: 100%;
}

#download a:first-child {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

#download a:first-child:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.5);
}

#download a:nth-child(2) {
  background: var(--bg-secondary);
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

#download a:nth-child(2):hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

#download a:last-child {
  background: var(--text-primary);
  color: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

#download a:last-child:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ---------- 用户评论 ---------- */
#comments > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

#comments article {
  background: var(--bg-card) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md) !important;
  padding: 20px !important;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

#comments article::before {
  content: '"';
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 40px;
  color: var(--accent-lighter);
  opacity: 0.3;
  font-family: Georgia, serif;
}

#comments article:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-lighter);
}

#comments article p:first-child {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

#comments article p:nth-child(2) {
  margin: 0;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

#comments article p:last-child {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- 侧边栏 ---------- */
aside {
  margin-bottom: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

aside > div {
  background: var(--bg-card) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md) !important;
  padding: 20px !important;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

aside > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

aside h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 10px;
  font-weight: 600;
}

aside ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 2.4;
}

aside ol li {
  transition: all var(--transition-fast);
  cursor: default;
}

aside ol li:hover {
  color: var(--accent);
  transform: translateX(4px);
}

aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 2.5;
}

aside ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px dashed var(--border-soft);
  transition: all var(--transition-fast);
}

aside ul li:hover {
  color: var(--accent);
  padding-left: 4px;
}

aside ul strong {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 底部 ---------- */
footer {
  background: var(--text-primary) !important;
  color: var(--bg-secondary);
  padding: 40px 24px 20px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

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

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

footer > div {
  max-width: var(--container-max);
  margin: 0 auto;
}

footer > div > div:first-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

footer h4 {
  color: var(--bg-secondary);
  font-size: 17px;
  margin-bottom: 15px;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

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

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2.2;
}

footer ul a {
  color: var(--text-light);
  font-size: 14px;
  position: relative;
  padding-left: 0;
  transition: all var(--transition-fast);
}

footer ul a::before {
  content: '›';
  position: absolute;
  left: -12px;
  opacity: 0;
  transition: all var(--transition-fast);
}

footer ul a:hover {
  color: var(--accent-light);
  padding-left: 12px;
}

footer ul a:hover::before {
  opacity: 1;
  left: 0;
}

footer p {
  color: var(--text-light);
  font-size: 13px;
  margin: 0 0 10px 0;
  line-height: 1.8;
}

footer > div > div:last-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
}

footer > div > div:last-child p {
  font-size: 12px;
  color: rgba(184, 165, 255, 0.7);
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1200px) {
  main {
    padding: 20px 16px;
  }
  
  header nav {
    padding: 12px 16px;
  }
}

@media (max-width: 992px) {
  header nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
  
  header nav > div:last-child {
    justify-content: center;
    width: 100%;
  }
  
  header nav h1 {
    font-size: 22px;
  }
  
  section h2 {
    font-size: 24px;
  }
  
  #hot > div:last-child {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: auto;
  }
  
  header nav {
    padding: 10px 12px;
  }
  
  header nav a[href^="#"] {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  main {
    padding: 16px 12px;
  }
  
  section {
    margin-bottom: 40px;
  }
  
  section h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  #hot > div:last-child {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  #recommend > div:last-child {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  
  #characters > div:last-child {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }
  
  #comments > div:last-child {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  aside {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  #download {
    padding: 30px 16px !important;
  }
  
  #download a {
    padding: 12px 28px;
    font-size: 14px;
  }
  
  footer {
    padding: 30px 16px 15px;
  }
  
  footer > div > div:first-child {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  header nav h1 {
    font-size: 20px;
  }
  
  header nav a[href="/"] span {
    font-size: 24px;
  }
  
  header nav a[href^="#"] {
    font-size: 12px;
    padding: 5px 8px;
  }
  
  #hot > div:last-child {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  #hot article h3 {
    font-size: 15px;
  }
  
  #hot article p {
    font-size: 12px;
  }
  
  #recommend > div:last-child {
    grid-template-columns: 1fr;
  }
  
  #characters > div:last-child {
    grid-template-columns: 1fr;
  }
  
  #download > div:last-child {
    flex-direction: column;
    align-items: center;
  }
  
  #download a {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  #intro h3 {
    font-size: 19px;
  }
  
  #intro p {
    font-size: 14px;
  }
  
  #platform p {
    font-size: 14px;
  }
}

/* ---------- 无障碍与动效偏好 ---------- */
@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);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- 打印样式 ---------- */
@media print {
  header,
  footer,
  aside,
  #download {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  main {
    max-width: 100%;
    padding: 0;
  }
  
  section {
    margin-bottom: 20px;
  }
}