/* ============================================================
   51动漫 - 专属样式表
   风格：紫罗兰渐变 + 毛玻璃 + 微光效
   ============================================================ */

/* ---------- CSS 变量与暗色模式 ---------- */
:root {
  --primary: #7C5CFC;
  --primary-light: #9B8CFF;
  --secondary: #4A4AF0;
  --bg: #F8F4FF;
  --bg-alt: #F0EBFF;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(255, 255, 255, 0.5);
  --text: #1A1A2E;
  --text-light: #2D2D44;
  --text-muted: #6B6B8D;
  --heading: #0D0820;
  --shadow: 0 8px 32px rgba(124, 92, 252, 0.12);
  --shadow-hover: 0 12px 40px rgba(124, 92, 252, 0.22);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.35);
  --footer-bg: #1E1A33;
  --footer-text: #D8D0F0;
  --nav-bg: rgba(255, 255, 255, 0.7);
  --hero-grad: linear-gradient(135deg, #E8DFFF 0%, #F8F4FF 50%, #FFFFFF 100%);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 35px rgba(124, 92, 252, 0.18);
  --rank-bg: #7C5CFC;
  --tag-bg: rgba(124, 92, 252, 0.12);
  --tag-text: #4A4AF0;
  --border-light: rgba(124, 92, 252, 0.15);
  --comment-bg: rgba(255, 255, 255, 0.85);
  --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
  --bg: #12101E;
  --bg-alt: #1A1630;
  --card-bg: rgba(30, 26, 51, 0.85);
  --card-border: rgba(124, 92, 252, 0.2);
  --text: #E8E6F5;
  --text-light: #C8C4E0;
  --text-muted: #8A86A8;
  --heading: #FFFFFF;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 40px rgba(124, 92, 252, 0.3);
  --glass-bg: rgba(30, 26, 51, 0.6);
  --glass-border: rgba(124, 92, 252, 0.2);
  --footer-bg: #0B0916;
  --footer-text: #A8A0C8;
  --nav-bg: rgba(18, 16, 30, 0.75);
  --hero-grad: linear-gradient(135deg, #1A1630 0%, #12101E 50%, #1E1A33 100%);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 10px 35px rgba(124, 92, 252, 0.35);
  --rank-bg: linear-gradient(135deg, #7C5CFC, #4A4AF0);
  --tag-bg: rgba(124, 92, 252, 0.2);
  --tag-text: #B8A8FF;
  --border-light: rgba(124, 92, 252, 0.25);
  --comment-bg: rgba(30, 26, 51, 0.85);
}

/* ---------- 基础重置 ---------- */
* {
  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', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- 链接 ---------- */
a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ---------- 容器 ---------- */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-alt);
  border-radius: 10px;
}

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

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

/* ---------- 页眉 ---------- */
header {
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 2px 30px rgba(124, 92, 252, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

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

.logo h1 {
  font-size: 32px;
  color: var(--heading);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: var(--transition);
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(124, 92, 252, 0.3));
}

.logo h1:hover {
  filter: drop-shadow(0 4px 16px rgba(124, 92, 252, 0.5));
  transform: scale(1.02);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  position: relative;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.35s ease;
  border-radius: 2px;
}

nav a:hover {
  color: var(--primary);
  border-bottom-color: transparent;
  text-decoration: none;
}

nav a:hover::after {
  width: 100%;
}

/* ---------- Hero 区 ---------- */
.hero {
  background: var(--hero-grad);
  padding: 70px 0;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 74, 240, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

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

.hero h2 {
  font-size: 46px;
  color: var(--heading);
  margin-bottom: 20px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(124, 92, 252, 0.15);
  background: linear-gradient(135deg, var(--heading) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

/* ---------- 区块 ---------- */
section {
  margin-bottom: 70px;
  scroll-margin-top: 100px;
}

.section-title {
  font-size: 32px;
  color: var(--heading);
  margin-bottom: 30px;
  position: relative;
  padding-left: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 32px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(124, 92, 252, 0.4);
}

/* ---------- 卡片网格 ---------- */
.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  will-change: transform;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(124, 92, 252, 0.3);
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

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

.card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

.card-body {
  padding: 16px;
  background: var(--card-bg);
}

.card h3 {
  font-size: 18px;
  color: var(--heading);
  margin-bottom: 8px;
  font-weight: 700;
  transition: var(--transition);
}

.card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.5;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 4px 0 0;
  backdrop-filter: blur(5px);
  transition: var(--transition);
  border: 1px solid transparent;
}

.tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.3);
}

/* ---------- 双列网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* ---------- 详情框 ---------- */
.detail-box {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 35px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.detail-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), transparent);
  border-radius: 18px 18px 0 0;
}

.detail-box:hover {
  box-shadow: var(--card-shadow-hover);
}

.detail-box h3 {
  font-size: 24px;
  color: var(--heading);
  margin-bottom: 15px;
  font-weight: 700;
}

.detail-box p {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- 角色网格 ---------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}

.role-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 25px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.role-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(124, 92, 252, 0.3);
}

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

.role-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
  display: block;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 15px rgba(124, 92, 252, 0.3);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.role-card:hover img {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(124, 92, 252, 0.5);
}

.role-card h3 {
  color: var(--heading);
  margin-bottom: 8px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.role-card p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

/* ---------- APP 下载区 ---------- */
.app-download {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 24px;
  padding: 60px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.app-download::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.app-download::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

.app-download:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 60px rgba(124, 92, 252, 0.4);
}

.app-download h3 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.app-download p {
  font-size: 18px;
  margin-bottom: 30px;
  color: #F0EBFF;
  position: relative;
  z-index: 1;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--secondary);
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  margin: 10px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  background: var(--secondary);
  color: #fff;
  border-color: #fff;
}

.btn:active {
  transform: scale(0.98);
}

/* ---------- 评论区 ---------- */
.comment-item {
  background: var(--comment-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 25px;
  margin-bottom: 15px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.comment-item::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 15px;
  font-size: 60px;
  color: var(--primary);
  opacity: 0.1;
  font-family: Georgia, serif;
  line-height: 1;
}

.comment-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.1);
  border-color: rgba(124, 92, 252, 0.2);
}

.comment-item .user {
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-item .user::before {
  content: '';
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: inline-block;
}

.comment-item .time {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.comment-item p {
  color: var(--text);
  line-height: 1.7;
}

/* ---------- 侧边栏 ---------- */
aside {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 25px;
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 100px;
  align-self: start;
  transition: var(--transition);
}

aside:hover {
  box-shadow: var(--card-shadow-hover);
}

aside h3 {
  font-size: 22px;
  color: var(--heading);
  margin-bottom: 20px;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 10px;
  position: relative;
  font-weight: 700;
}

aside h3::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50%;
  height: 3px;
  background: var(--secondary);
}

/* ---------- 排行榜 ---------- */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  cursor: pointer;
  font-size: 15px;
}

.rank-list li:hover {
  padding-left: 10px;
  color: var(--primary);
  background: var(--tag-bg);
  border-radius: 8px;
}

.rank-num {
  background: var(--rank-bg);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

.rank-list li:hover .rank-num {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(124, 92, 252, 0.5);
}

/* ---------- 统计框 ---------- */
.stat-box {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.stat-box:hover {
  background: var(--tag-bg);
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 8px;
}

.stat-box span {
  color: var(--text-light);
  font-size: 15px;
}

.stat-box strong {
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
}

/* ---------- 页脚 ---------- */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 50px 0 20px;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
}

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

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

.footer-links a:hover {
  color: #fff;
  background: rgba(124, 92, 252, 0.3);
  text-decoration: none;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 14px;
  color: var(--footer-text);
}

.footer-bottom a {
  color: var(--footer-text);
  margin: 0 10px;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: start;
}

/* ---------- 动画 ---------- */
@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);
  }
}

/* 滚动动画 */
.card, .detail-box, .role-card, .comment-item, aside, .app-download {
  animation: fadeInUp 0.6s ease both;
}

.card:nth-child(2), .role-card:nth-child(2), .comment-item:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3), .role-card:nth-child(3), .comment-item:nth-child(3) {
  animation-delay: 0.2s;
}

.card:nth-child(4), .role-card:nth-child(4), .comment-item:nth-child(4) {
  animation-delay: 0.3s;
}

.card:nth-child(5), .role-card:nth-child(5), .comment-item:nth-child(5) {
  animation-delay: 0.4s;
}

.card:nth-child(6), .role-card:nth-child(6), .comment-item:nth-child(6) {
  animation-delay: 0.5s;
}

.card:nth-child(7), .role-card:nth-child(7), .comment-item:nth-child(7) {
  animation-delay: 0.6s;
}

.card:nth-child(8), .role-card:nth-child(8), .comment-item:nth-child(8) {
  animation-delay: 0.7s;
}

.card:nth-child(9), .role-card:nth-child(9), .comment-item:nth-child(9) {
  animation-delay: 0.8s;
}

.card:nth-child(10), .role-card:nth-child(10), .comment-item:nth-child(10) {
  animation-delay: 0.9s;
}

.card:nth-child(11), .role-card:nth-child(11), .comment-item:nth-child(11) {
  animation-delay: 1s;
}

.card:nth-child(12), .role-card:nth-child(12), .comment-item:nth-child(12) {
  animation-delay: 1.1s;
}

/* 滚动监听动画（使用 IntersectionObserver 触发） */
.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);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }
  
  .grid-list {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .layout {
    grid-template-columns: 1fr;
  }
  
  aside {
    position: static;
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0;
  }
  
  nav ul {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }
  
  nav a {
    font-size: 14px;
    padding: 4px 8px;
  }
  
  .hero {
    padding: 50px 0;
    margin-bottom: 40px;
    border-radius: 0 0 24px 24px;
  }
  
  .hero h2 {
    font-size: 30px;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 16px;
    padding: 0 15px;
  }
  
  .section-title {
    font-size: 26px;
    padding-left: 18px;
  }
  
  .section-title::before {
    height: 26px;
    top: 8px;
  }
  
  .grid-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .card h3 {
    font-size: 16px;
  }
  
  .card p {
    font-size: 13px;
  }
  
  .detail-box {
    padding: 20px;
  }
  
  .detail-box h3 {
    font-size: 20px;
  }
  
  .role-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  
  .role-card {
    padding: 15px;
  }
  
  .role-card img {
    width: 90px;
    height: 90px;
  }
  
  .app-download {
    padding: 30px 15px;
    border-radius: 16px;
  }
  
  .app-download h3 {
    font-size: 28px;
  }
  
  .app-download p {
    font-size: 15px;
  }
  
  .btn {
    padding: 12px 25px;
    font-size: 15px;
    margin: 5px;
    display: block;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .comment-item {
    padding: 15px 18px;
  }
  
  aside {
    padding: 20px;
  }
  
  footer {
    padding: 40px 0 15px;
  }
  
  .footer-links {
    gap: 10px;
  }
  
  .footer-links a {
    font-size: 14px;
    padding: 4px 8px;
  }
  
  .footer-bottom {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 26px;
  }
  
  .hero h2 {
    font-size: 24px;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .grid-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  
  .card-body {
    padding: 10px;
  }
  
  .card h3 {
    font-size: 14px;
  }
  
  .card p {
    font-size: 12px;
  }
  
  .tag {
    font-size: 12px;
    padding: 2px 8px;
  }
  
  .section-title {
    font-size: 22px;
  }
  
  .detail-box {
    padding: 15px;
  }
  
  .detail-box p {
    font-size: 14px;
  }
  
  .role-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .role-card img {
    width: 70px;
    height: 70px;
  }
  
  .role-card h3 {
    font-size: 16px;
  }
  
  .role-card p {
    font-size: 13px;
  }
  
  .app-download h3 {
    font-size: 24px;
  }
  
  .app-download p {
    font-size: 14px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .comment-item .user {
    font-size: 15px;
  }
  
  .comment-item p {
    font-size: 14px;
  }
  
  .rank-list li {
    font-size: 14px;
  }
  
  .stat-box span {
    font-size: 14px;
  }
  
  .stat-box strong {
    font-size: 16px;
  }
  
  .footer-links {
    gap: 6px;
  }
  
  .footer-links a {
    font-size: 13px;
  }
}

/* ---------- 暗色模式切换按钮 ---------- */
.theme-toggle {
  background: var(--tag-bg);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-light);
  font-size: 18px;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(180deg);
  box-shadow: 0 4px 15px rgba(124, 92, 252, 0.4);
}

/* ---------- 无障碍 ---------- */
@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;
  }
}

/* ---------- 打印样式 ---------- */
@media print {
  header, footer, .app-download, .btn, aside, .theme-toggle {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .card, .detail-box, .role-card, .comment-item {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

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

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

/* ---------- 加载动画 ---------- */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--tag-bg);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 骨架屏 ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--tag-bg) 25%, var(--bg-alt) 50%, var(--tag-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.mt-3 { margin-top: 30px; }
.mb-3 { margin-bottom: 30px; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* 毛玻璃效果增强 */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* 渐变边框 */
.gradient-border {
  position: relative;
  border-radius: 16px;
  background: var(--card-bg);
  background-clip: padding-box;
  border: 2px solid transparent;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
}

/* 发光效果 */
.glow {
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.3),
              0 0 40px rgba(124, 92, 252, 0.1);
}

.glow:hover {
  box-shadow: 0 0 30px rgba(124, 92, 252, 0.5),
              0 0 60px rgba(124, 92, 252, 0.2);
}