/* 稀有乐器 - 歌词风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #e91e63;
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #fff;
  --bg-light: #f8f9fa;
  --bg-dark: #f0f2f5;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,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-color);
  background-color: var(--bg-color);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #c2185b;
}

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

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

/* 头部 */
.header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

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

.nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 10px 40px 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

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

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

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

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

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-light);
  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: var(--radius-lg);
  font-size: 1rem;
  transition: border-color 0.3s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--accent-color);
}

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

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

.genre-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: var(--shadow);
}

/* 内容区块 */
.section {
  padding: 64px 0;
}

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

/* 卡片列表 */
.card-list {
  display: grid;
  gap: 24px;
}

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

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

.card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.3s, transform 0.3s;
}

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

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

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

/* 乐器卡片 */
.instrument-card {
  text-align: center;
  padding: 32px 24px;
}

.instrument-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.instrument-card .card-title {
  margin-bottom: 12px;
}

.instrument-card .card-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* 文章卡片 */
.article-card {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.article-thumb {
  width: 120px;
  height: 80px;
  background: var(--bg-light);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

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

.article-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-summary {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.column-list {
  list-style: none;
}

.column-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.column-list a {
  color: var(--text-color);
  display: block;
  transition: color 0.3s;
}

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

.column-list .item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin-left: 8px;
  color: var(--text-muted);
}

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

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

/* 页面标题 */
.page-header {
  text-align: center;
  padding: 48px 0;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.sort-option {
  color: var(--text-light);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.3s;
}

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

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  transition: box-shadow 0.3s;
}

.list-item:hover {
  box-shadow: var(--shadow);
}

.list-item-thumb {
  width: 100px;
  height: 100px;
  background: var(--bg-light);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

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

.list-item-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.list-item-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-color);
  font-size: 0.875rem;
  transition: all 0.3s;
}

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

.pagination .current {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* 文章详情 */
.article-header {
  text-align: center;
  padding: 64px 0 48px;
}

.article-cover {
  width: 200px;
  height: 200px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 4rem;
}

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

.article-meta-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.article-info-section {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.article-info-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.article-info-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.article-info-list li {
  font-size: 0.875rem;
  color: var(--text-light);
}

.article-info-list strong {
  color: var(--primary-color);
}

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

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin: 32px 0 16px;
}

.article-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* 相关推荐 */
.related-section {
  background: var(--bg-light);
  padding: 48px 0;
  border-top: 1px solid var(--border-color);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 24px;
  text-align: center;
}

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

.related-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.3s;
}

.related-item:hover {
  box-shadow: var(--shadow);
}

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

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

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

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 24px;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

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

.btn-primary:hover {
  background: #c2185b;
  color: #fff;
}

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

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

/* 页脚 */
.footer {
  background: var(--primary-color);
  color: #fff;
  padding: 48px 0 24px;
}

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

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

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

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

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

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

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

  .search-box {
    order: 2;
  }

  .search-box input {
    width: 180px;
  }

  .hero {
    padding: 48px 0;
  }

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

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

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

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

  .list-item {
    flex-direction: column;
    text-align: center;
  }

  .list-item-thumb {
    width: 120px;
    height: 120px;
  }

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

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

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

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

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

  .genre-tags {
    gap: 8px;
  }

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

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
  }

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