/* ===== 全局变量与基础样式 ===== */
:root {
  --primary: #311B92;
  --primary-light: #4527A0;
  --primary-dark: #1A0E5C;
  --accent: #FFCA28;
  --accent-light: #FFD54F;
  --bg: #F5F5F6;
  --card: #FFFFFF;
  --text: #212121;
  --text-light: #616161;
  --text-muted: #9E9E9E;
  --border: #E0E0E0;
  --shadow: 0 2px 12px rgba(49, 27, 146, 0.08);
  --shadow-lg: 0 8px 32px rgba(49, 27, 146, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: 80px;
}

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

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

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

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(49, 27, 146, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar .logo {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar .logo .icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.navbar nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.navbar nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.navbar nav a:hover,
.navbar nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== 英雄区域 ===== */
.hero {
  position: relative;
  height: 85vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(49, 27, 146, 0.7) 0%, rgba(26, 14, 92, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 0 24px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-content .btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 202, 40, 0.4);
  color: var(--primary-dark);
}

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

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

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 区块标题 ===== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 卡片网格 ===== */
.grid {
  display: grid;
  gap: 24px;
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.card-img-wide {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(49, 27, 146, 0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 8px;
}

/* ===== 有声书专辑卡片 ===== */
.album-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.album-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

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

.album-cover .play-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
}

.album-card:hover .play-btn {
  opacity: 1;
  transform: translateY(0);
}

.album-info {
  padding: 16px;
}

.album-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.album-info .author {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.album-info .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== 演播者卡片 ===== */
.actor-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.actor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.actor-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--accent);
}

.actor-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.actor-card .role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.actor-card .stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== 悬浮播放器 ===== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mini-player .player-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}

.mini-player.playing .player-cover {
  animation-play-state: running;
}

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

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

.mini-player .player-info h5 {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player .player-info span {
  font-size: 0.8rem;
  opacity: 0.7;
}

.mini-player .player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mini-player .player-controls button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

.mini-player .player-controls button:hover {
  opacity: 1;
  color: var(--accent);
}

.mini-player .player-controls .play-pause {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 1rem;
}

.mini-player .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.mini-player .progress-bar .progress {
  height: 100%;
  width: 35%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.8;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 20px 0;
  margin-top: 64px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

/* ===== 页面头部 ===== */
.page-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 64px;
}

.page-hero .hero-bg {
  filter: brightness(0.35);
}

.page-hero .hero-content h1 {
  font-size: 2.4rem;
}

/* ===== 详情页 ===== */
.detail-header {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  margin-top: 64px;
}

.detail-cover {
  width: 300px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.detail-info {
  flex: 1;
}

.detail-info h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.detail-info .meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.detail-info .description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}

/* ===== 章节列表 ===== */
.chapter-list {
  list-style: none;
}

.chapter-list li {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.chapter-list li:hover {
  background: rgba(49, 27, 146, 0.04);
}

.chapter-list .ch-num {
  width: 32px;
  height: 32px;
  background: rgba(49, 27, 146, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-right: 16px;
  flex-shrink: 0;
}

.chapter-list .ch-title {
  flex: 1;
  font-size: 0.95rem;
}

.chapter-list .ch-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 0 24px 18px;
  max-height: 500px;
}

/* ===== 搜索页 ===== */
.search-box {
  max-width: 600px;
  margin: 40px auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px 16px 48px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(49, 27, 146, 0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* ===== VIP 定价 ===== */
.pricing-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border: 2px solid var(--accent);
  transform: scale(1.05);
}

.pricing-card.featured::before {
  content: "推荐";
  position: absolute;
  top: 16px;
  right: -28px;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 4px 36px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}

.pricing-card ul li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-light);
  padding-left: 24px;
  position: relative;
}

.pricing-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== 404 页面 ===== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 40px 24px;
  margin-top: 64px;
}

.error-page h1 {
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
}

.error-page h2 {
  font-size: 1.8rem;
  margin: 16px 0;
  color: var(--text);
}

.error-page p {
  color: var(--text-light);
  margin-bottom: 32px;
}

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(49, 27, 146, 0.06);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== 呼吸灯效果 ===== */
.breathing-glow {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 202, 40, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 202, 40, 0.6); }
}

/* ===== 链接列表 ===== */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.link-list a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 20px;
    gap: 12px;
  }

  .navbar nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

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

  .detail-header {
    flex-direction: column;
    align-items: center;
  }

  .detail-cover {
    width: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .section {
    padding: 48px 0;
  }

  .page-hero {
    height: 240px;
  }

  .page-hero .hero-content h1 {
    font-size: 1.8rem;
  }
}

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

  .hero {
    height: 70vh;
  }

  .mini-player .player-controls button:not(.play-pause) {
    display: none;
  }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }
