/* ============================================
   星辰影院 - 完整样式表
   版本: 1.0.0
   设计理念: 现代紫色主题 + 毛玻璃 + 卡片式布局
   ============================================ */

/* ---------- CSS 变量与主题配置 ---------- */
:root {
  --primary: #7b2ff7;
  --primary-light: #9b59b6;
  --primary-gradient: linear-gradient(135deg, #7b2ff7 0%, #9b59b6 100%);
  --primary-soft: rgba(123, 47, 247, 0.1);
  --primary-glow: rgba(123, 47, 247, 0.3);
  --bg-color: #f5f3fa;
  --bg-gradient: linear-gradient(180deg, #f5f3fa 0%, #ede9f4 100%);
  --card-bg: #ffffff;
  --card-border: rgba(255, 255, 255, 0.8);
  --text-primary: #2d2d2d;
  --text-secondary: #666666;
  --text-muted: #999999;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(123, 47, 247, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 50px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* 暗色模式变量覆盖 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a2e;
    --bg-gradient: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --card-bg: #1f1f3a;
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0c0;
    --text-muted: #8888a0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.45);
    --primary-soft: rgba(123, 47, 247, 0.2);
  }
}

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

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

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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: transparent;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

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

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

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

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

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

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

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

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

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

/* ---------- Header 导航 ---------- */
header {
  background: var(--primary-gradient);
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.95) 0%, rgba(155, 89, 182, 0.95) 100%);
  transition: all var(--transition-normal);
}

header:hover {
  box-shadow: 0 6px 30px rgba(123, 47, 247, 0.3);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

header nav > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

header nav > div:first-child span {
  font-size: 32px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

header h1 {
  font-size: clamp(20px, 4vw, 28px);
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header nav > div:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

header nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

header nav 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 0.5s ease;
}

header nav a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

header nav a:hover::before {
  left: 100%;
}

header nav a:active {
  transform: translateY(0);
}

/* ---------- 主内容布局 ---------- */
main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 15px;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  animation: fadeIn 0.5s ease;
}

main > div:first-child {
  flex: 1;
  min-width: 280px;
}

/* ---------- 区块标题 ---------- */
section {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

section h2 {
  font-size: clamp(22px, 4vw, 28px);
  color: var(--primary);
  border-left: 5px solid var(--primary);
  padding-left: 15px;
  margin-bottom: 25px;
  font-weight: 800;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 15px;
  width: 60px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
  opacity: 0.5;
}

/* ---------- 卡片通用样式 ---------- */
article {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease;
}

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

article img {
  transition: transform var(--transition-slow);
}

article:hover img {
  transform: scale(1.05);
}

article h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 700;
  transition: color var(--transition-fast);
}

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

article p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

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

#hot article {
  position: relative;
}

#hot article::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

#hot article:hover::after {
  opacity: 1;
}

#hot article img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

#hot article > div {
  padding: 12px;
}

#hot article h3 {
  font-size: 18px;
  margin: 0 0 5px;
  color: var(--text-primary);
}

#hot article p {
  margin: 3px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

#hot article span {
  display: inline-block;
  background: var(--primary-gradient);
  color: #fff;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  margin-top: 8px;
  font-weight: 500;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: all var(--transition-fast);
}

#hot article span:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* ---------- 精品推荐 ---------- */
#recommend .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

#recommend article {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

#recommend article img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

#recommend article > div {
  padding: 15px;
}

#recommend article h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text-primary);
}

#recommend article p {
  margin: 5px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 详细介绍区域 ---------- */
#intro {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

#intro article h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
}

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

#intro article div {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#intro article div span {
  background: var(--primary-gradient);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: all var(--transition-fast);
}

#intro article div span:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--primary-glow);
}

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

#characters article {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

#characters article:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

#characters article img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all var(--transition-normal);
}

#characters article:hover img {
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--primary-glow);
}

#characters article h3 {
  font-size: 20px;
  margin: 10px 0 5px;
  color: var(--text-primary);
}

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

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

#characters article p:last-of-type {
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- 平台介绍 ---------- */
#platform {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

/* ---------- APP下载区域 ---------- */
#app {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

#app::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

#app h2 {
  font-size: 32px;
  margin-bottom: 15px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

#app p {
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

#app p:nth-of-type(2) {
  font-size: 16px;
  margin-bottom: 30px;
}

#app div {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

#app div a {
  background: #fff;
  color: var(--primary);
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
}

#app div a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

#app div a:nth-child(2) {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

#app div a:nth-child(2):hover {
  background: rgba(255, 255, 255, 0.2);
}

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

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

#comments article::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 40px;
  color: var(--primary);
  opacity: 0.2;
  font-family: Georgia, serif;
}

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

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

#comments article p:nth-last-child(2) {
  color: var(--primary);
  font-weight: bold;
  font-style: normal;
}

/* ---------- 侧边栏 ---------- */
aside {
  width: 280px;
  flex-shrink: 0;
}

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

aside > div:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

aside h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  font-weight: 700;
}

aside ol {
  padding-left: 20px;
  margin: 0;
}

aside ol li {
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
}

aside ol li:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(5px);
}

aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

aside ul li {
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  padding: 5px 8px;
  border-radius: 6px;
}

aside ul li:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(5px);
}

aside p {
  margin: 8px 0;
  font-size: 15px;
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: 6px;
  transition: background var(--transition-fast);
}

aside p:hover {
  background: var(--primary-soft);
}

/* ---------- 页脚 ---------- */
footer {
  background: #2d2d2d;
  color: #ccc;
  padding: 30px 20px;
  text-align: center;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

footer > div {
  max-width: 1200px;
  margin: 0 auto;
}

footer h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}

footer div div {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

footer a {
  color: #aaa;
  text-decoration: none;
  margin: 5px;
  transition: all var(--transition-fast);
  padding: 5px 10px;
  border-radius: 20px;
}

footer a:hover {
  color: var(--primary-light);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

footer p {
  margin: 10px 0;
  font-size: 14px;
}

/* ---------- 响应式布局 ---------- */

/* 平板设备 */
@media (max-width: 1024px) {
  main {
    padding: 0 20px;
    gap: 20px;
  }

  aside {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  aside > div {
    margin-bottom: 0;
  }

  #hot .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

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

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

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

/* 手机设备 */
@media (max-width: 768px) {
  header {
    padding: 12px 15px;
  }

  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  header nav > div:last-child {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 5px;
  }

  header nav a {
    font-size: 13px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  main {
    padding: 0 12px;
    margin: 20px auto;
    flex-direction: column;
  }

  main > div:first-child {
    min-width: 100%;
  }

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

  #recommend .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

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

  #comments .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #app {
    padding: 30px 20px;
  }

  #app h2 {
    font-size: 26px;
  }

  #app p {
    font-size: 15px;
  }

  #app div {
    flex-direction: column;
    align-items: center;
  }

  #app div a {
    width: 80%;
    max-width: 280px;
    text-align: center;
  }

  section h2 {
    font-size: 22px;
  }

  #intro {
    padding: 20px;
  }

  #intro article p {
    font-size: 15px;
  }

  #platform {
    padding: 20px;
  }

  #platform article p {
    font-size: 15px;
  }

  aside {
    display: block;
  }

  aside > div {
    margin-bottom: 15px;
  }

  footer {
    padding: 20px 15px;
  }

  footer div div {
    gap: 10px;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  #hot .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #hot article > div {
    padding: 10px;
  }

  #hot article h3 {
    font-size: 16px;
  }

  #hot article p {
    font-size: 12px;
  }

  #recommend .grid {
    grid-template-columns: 1fr;
  }

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

  #characters article {
    padding: 15px;
  }

  #characters article img {
    width: 80px;
    height: 80px;
  }

  #characters article h3 {
    font-size: 18px;
  }

  #characters article p {
    font-size: 13px;
  }

  section h2 {
    font-size: 20px;
  }

  #intro article h3 {
    font-size: 18px;
  }

  #intro article p {
    font-size: 14px;
  }

  #platform article p {
    font-size: 14px;
  }

  aside {
    width: 100%;
  }
}

/* ---------- 性能优化: 动画降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- 暗色模式细节优化 ---------- */
@media (prefers-color-scheme: dark) {
  header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }

  header nav a {
    background: rgba(255, 255, 255, 0.1);
  }

  header nav a:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  #app {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }

  #app div a {
    background: #fff;
    color: var(--primary);
  }

  #app div a:nth-child(2) {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.8);
  }

  footer {
    background: #1a1a1a;
  }

  footer a:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  article {
    background: rgba(31, 31, 58, 0.9);
  }

  #intro,
  #platform,
  #comments article,
  aside > div {
    background: rgba(31, 31, 58, 0.9);
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  header,
  footer,
  aside,
  #app {
    display: none;
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  article {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

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

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

/* ---------- 无障碍访问 ---------- */
:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 加载动画 ---------- */
.loading {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--card-bg) 0%, var(--primary-soft) 50%, var(--card-bg) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}