/* ========================================
   动漫音乐 - 全局样式
   www.shougongpi.cn - 动漫音乐爱好者的社区平台
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #e91e63;
  --accent-light: #f48fb1;
  --accent-dark: #c2185b;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #ffffff;
  --text-secondary: #b8b8d1;
  --text-muted: #7a7a9d;
  --border-color: #2d3561;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

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: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

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

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

ul {
  list-style: none;
}

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

/* ========================================
   Header 页头
   ======================================== */
.header {
  background: var(--bg-secondary);
  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;
  padding: 16px 0;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

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

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  min-width: 240px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

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

.search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: var(--gradient-hero);
  padding: 80px 0 60px;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-search .search-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  min-width: auto;
}

.hero-search .search-box input {
  font-size: 1rem;
}

/* ========================================
   Genre Tags
   ======================================== */
.genre-section {
  padding: 40px 0;
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-secondary);
}

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

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

.genre-tag:hover {
  background: var(--accent-color);
  color: var(--text-primary);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* ========================================
   Song Cards
   ======================================== */
.songs-section {
  padding: 60px 0;
}

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

.section-heading {
  font-size: 1.5rem;
  font-weight: 600;
}

.view-all {
  font-size: 0.9rem;
  color: var(--accent-light);
}

.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.song-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.song-header {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.song-cover {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.song-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.song-info .artist {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.song-info .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.song-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.song-tag {
  padding: 4px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   Article Lists
   ======================================== */
.articles-section {
  padding: 40px 0 60px;
  background: var(--bg-secondary);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.article-list h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--accent-light);
}

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

.article-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-list li a::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
}

.article-list li a:hover {
  color: var(--text-primary);
}

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

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

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

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

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

/* ========================================
   Page Header
   ======================================== */
.page-header {
  background: var(--gradient-hero);
  padding: 40px 0;
  text-align: center;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ========================================
   Sort Bar
   ======================================== */
.sort-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.sort-item {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.sort-item:hover,
.sort-item.active {
  color: var(--accent-light);
}

/* ========================================
   Song List (Category Page)
   ======================================== */
.song-list {
  padding: 40px 0;
}

.song-list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.song-number {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent-light);
  flex-shrink: 0;
}

.song-list-cover {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.song-list-info {
  flex: 1;
}

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

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

.song-list-meta {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.page-btn,
.page-number {
  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-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover,
.page-number:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

/* ========================================
   Article Detail
   ======================================== */
.article-detail {
  padding: 40px 0;
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
}

.album-cover-large {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  border-radius: var(--radius-lg);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: var(--shadow-lg);
}

.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

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

.song-details {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

.song-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-light);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.detail-item {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
}

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

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   Lyrics Section
   ======================================== */
.lyrics-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-color);
  max-width: 700px;
  margin: 0 auto 40px;
}

.lyrics-section h3 {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--accent-light);
}

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

.lyrics-verse {
  margin-bottom: 24px;
}

.lyrics-label {
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: block;
}

.lyrics-text {
  white-space: pre-line;
}

/* ========================================
   Related Songs
   ======================================== */
.related-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.related-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.related-cover {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  border-radius: var(--radius-md);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.related-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   404 Page
   ======================================== */
.error-page {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

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

.btn {
  padding: 12px 32px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

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

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

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

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

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .search-box {
    min-width: auto;
    flex: 1;
  }

  .hero-title {
    font-size: 1.75rem;
  }

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

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

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

  .song-list-item {
    flex-wrap: wrap;
  }

  .song-list-meta {
    width: 100%;
    text-align: left;
    margin-top: 8px;
  }

  .lyrics-section {
    padding: 24px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

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

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

@media (max-width: 480px) {
  .hero {
    padding: 60px 0 40px;
  }

  .genre-tag {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

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

  .song-cover {
    width: 100px;
    height: 100px;
  }

  .album-cover-large {
    width: 150px;
    height: 150px;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }
}
