/* ========== 动漫音乐 - 全局样式 ========== */
:root {
  --accent-color: #e91e63;
  --accent-light: #f48fb1;
  --accent-dark: #c2185b;
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --border-color: #2a2a3a;
  --gradient-start: #1a1a2e;
  --gradient-end: #16213e;
  --max-width: 1200px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ========== 容器 ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 页头 ========== */
.header {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
}

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

.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.search-box input:focus {
  border-color: var(--accent-color);
}

.search-box button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* ========== Hero 区域 ========== */
.hero {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(233, 30, 99, 0.1) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
}

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  backdrop-filter: blur(10px);
}

.hero-search input::placeholder {
  color: var(--text-muted);
}

/* ========== 分类标签 ========== */
.genre-tags {
  padding: 40px 0;
  text-align: center;
}

.genre-tags h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  padding: 10px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s;
}

.tag:hover,
.tag.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* ========== 歌曲卡片 ========== */
.section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-more {
  color: var(--accent-color);
  font-weight: 500;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.song-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.song-card:hover {
  border-color: var(--accent-color);
  transform: translateX(4px);
}

.song-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--accent-color);
}

.song-number.top {
  background: var(--accent-color);
  color: var(--text-primary);
}

.song-cover {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.song-info {
  flex: 1;
}

.song-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.song-artist {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.song-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.song-duration {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ========== 内容网格 ========== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-column h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.grid-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: background 0.3s;
}

.grid-item:hover {
  background: var(--bg-secondary);
}

.grid-item-thumb {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grid-item-info {
  flex: 1;
  min-width: 0;
}

.grid-item-title {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== 面包屑 ========== */
.breadcrumb {
  padding: 20px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-primary);
}

/* ========== 分类页头部 ========== */
.category-header {
  padding: 40px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-header p {
  color: var(--text-secondary);
}

/* ========== 排序选项 ========== */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.sort-options {
  display: flex;
  gap: 8px;
}

.sort-option {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.sort-option:hover,
.sort-option.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.sort-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* ========== 文章页 ========== */
.article-hero {
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.album-cover {
  width: 200px;
  height: 200px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: 0 20px 60px rgba(233, 30, 99, 0.3);
}

.article-hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 歌曲信息 ========== */
.song-details {
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin: 32px 0;
}

.detail-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  width: 120px;
  color: var(--text-muted);
}

.detail-value {
  flex: 1;
  color: var(--text-primary);
}

/* ========== 歌词区域 ========== */
.lyrics-section {
  padding: 40px 0;
}

.lyrics-section h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.5rem;
}

.lyrics-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.lyrics-content {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-secondary);
  text-align: center;
}

.lyrics-content p {
  margin-bottom: 16px;
}

.lyrics-section-title {
  color: var(--accent-color);
  font-weight: 600;
  margin: 24px 0 16px;
}

/* ========== 相关歌曲 ========== */
.related-songs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.3s;
}

.related-card:hover {
  transform: translateY(-4px);
  border: 1px solid var(--accent-color);
}

.related-cover {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.related-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.related-artist {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ========== 404 页面 ========== */
.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 24px;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  padding: 12px 32px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: all 0.3s;
}

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

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

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
}

/* ========== 页脚 ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 60px;
}

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

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-title {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .search-box {
    width: 100%;
    order: 2;
  }

  .hero {
    padding: 60px 0;
  }

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

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

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

  .song-card {
    flex-wrap: wrap;
  }

  .song-meta {
    width: 100%;
    margin-top: 8px;
    padding-left: 48px;
  }

  .related-songs {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    max-width: 100%;
  }

  .error-code {
    font-size: 5rem;
  }

  .error-actions {
    flex-direction: column;
  }

  .lyrics-box {
    padding: 24px;
  }

  .album-cover {
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sort-bar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .pagination {
    flex-wrap: wrap;
  }
}
