/* 稀有乐器 - 样式文件 */
/* 主色调: #e91e63 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #e91e63;
  --accent-light: #f48fb1;
  --accent-dark: #c2185b;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-dark: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(233,30,99,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

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

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

/* ===== 页头 ===== */
.header {
  background: var(--bg-primary);
  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 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

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

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.9rem;
  background: var(--bg-secondary);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.5;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #fce4ec 100%);
  padding: 80px 0;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-title span {
  color: var(--accent-color);
}

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

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

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid var(--border-color);
  border-radius: 32px;
  font-size: 1rem;
  text-align: center;
  background: var(--bg-primary);
  transition: all 0.2s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(233,30,99,0.1);
}

/* ===== 分类标签 ===== */
.genre-tags {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.genre-tag {
  padding: 10px 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

/* ===== 内容区域 ===== */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
}

/* ===== 卡片列表 ===== */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

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

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

/* ===== 文章列表 ===== */
.article-list {
  max-width: 720px;
  margin: 0 auto;
}

.article-item {
  display: flex;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
}

.article-item:last-child {
  border-bottom: none;
}

.article-thumb {
  width: 80px;
  height: 80px;
  background: var(--bg-dark);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.article-info {
  flex: 1;
}

.article-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

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

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== 三栏布局 ===== */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.col-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.col-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.col-list li:last-child {
  border-bottom: none;
}

.col-list a {
  color: var(--text-secondary);
  display: block;
}

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

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

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* ===== 页面标题区 ===== */
.page-header {
  text-align: center;
  padding: 60px 0 40px;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

/* ===== 排序选项 ===== */
.sort-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.sort-bar a {
  color: var(--text-secondary);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

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

/* ===== 内容项（分类页用） ===== */
.content-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.content-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent-light);
}

.content-item-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.content-item-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

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

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.pagination a:hover,
.pagination a.active {
  background: var(--accent-color);
  color: white;
}

/* ===== 文章详情页 ===== */
.article-header {
  text-align: center;
  padding: 60px 0 40px;
}

.article-cover {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-secondary));
  border-radius: var(--radius-lg);
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--shadow);
}

.article-main-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.article-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.article-info-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

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

/* ===== 文章内容区 ===== */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.lyrics-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.lyrics-section {
  margin-bottom: 32px;
}

.lyrics-section:last-child {
  margin-bottom: 0;
}

.lyrics-label {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lyrics-text {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-primary);
  white-space: pre-line;
}

/* ===== 相关内容 ===== */
.related-section {
  padding: 40px 0;
}

.related-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.related-item {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.related-item:hover {
  background: var(--accent-color);
  color: white;
}

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

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

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

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== 404 页面 ===== */
.error-page {
  min-height: calc(100vh - var(--header-height) - 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;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.8;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: white;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

  .search-box {
    width: 160px;
  }

  .hero {
    padding: 48px 0;
  }

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

  .hero-desc {
    font-size: 1rem;
    padding: 0 20px;
  }

  .genre-tags {
    gap: 10px;
    padding: 0 20px;
  }

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

  .three-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .article-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .article-thumb {
    width: 100%;
    height: 160px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .sort-bar {
    gap: 16px;
    font-size: 0.85rem;
  }

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

  .article-cover {
    width: 160px;
    height: 160px;
  }

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

  .lyrics-box {
    padding: 24px;
  }

  .lyrics-text {
    font-size: 1rem;
  }

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

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

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

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}
