/* 稀有乐器 - 样式文件 */
/* 基于歌词风格 (lyrics) - accent-color: #8B4513 (古朴棕色) */

/* CSS 变量定义 */
:root {
  --accent-color: #8B4513;
  --accent-light: #A0522D;
  --accent-dark: #5D3A1A;
  --bg-primary: #FDF8F0;
  --bg-secondary: #F5EDE0;
  --bg-card: #FFFFFF;
  --text-primary: #2C1810;
  --text-secondary: #6B5B4F;
  --text-muted: #9B8B7F;
  --border-color: #E0D5C8;
  --shadow: 0 2px 8px rgba(139, 69, 19, 0.08);
  --shadow-hover: 0 4px 16px rgba(139, 69, 19, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

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

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

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

/* 头部导航 */
.header {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.logo::before {
  content: "♪";
  font-size: 1.8rem;
}

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

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

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

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
  border-radius: 1px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 8px 16px;
  width: 240px;
}

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

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

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

/* Hero 区域 */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

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

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

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: var(--bg-card);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-search input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 1rem;
  outline: none;
}

.hero-search button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 16px 32px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--accent-dark);
}

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

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

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

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

/* 内容区块标题 */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* 内容列表 */
.content-section {
  padding: 48px 0;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow 0.2s;
}

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

.content-item .icon {
  width: 56px;
  height: 56px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.content-item .info {
  flex: 1;
}

.content-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.content-item .meta span {
  margin-right: 16px;
}

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

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

.column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.column ul {
  list-style: none;
}

.column li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.column a {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.column a::before {
  content: "•";
  color: var(--accent-color);
}

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

/* 面包屑导航 */
.breadcrumb {
  padding: 16px 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;
}

/* 分类页头部 */
.category-header {
  text-align: center;
  padding: 48px 20px 32px;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

/* 排序选项 */
.sort-options {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.sort-options a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 4px 0;
}

.sort-options a.active {
  color: var(--accent-color);
  font-weight: 500;
  border-bottom: 2px solid var(--accent-color);
}

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

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

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

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

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

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

/* 文章详情页 */
.article-header {
  text-align: center;
  padding: 48px 20px 32px;
  background: var(--bg-secondary);
}

.article-cover {
  width: 200px;
  height: 200px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--shadow);
}

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

.article-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-meta span {
  margin: 0 8px;
}

.article-info {
  max-width: 600px;
  margin: 24px auto 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: left;
}

.article-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px 16px;
}

.article-info dt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-info dd {
  color: var(--text-primary);
  font-size: 0.95rem;
}

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

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 2;
}

.lyrics-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 32px 0;
  box-shadow: var(--shadow);
  text-align: center;
}

.lyrics-box h3 {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 24px;
  font-weight: 500;
}

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

/* 相关推荐 */
.related-section {
  background: var(--bg-secondary);
  padding: 48px 0;
}

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

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

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

.related-item .icon {
  width: 64px;
  height: 64px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.related-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 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: 16px;
  opacity: 0.8;
}

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

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

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

.btn {
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

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

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

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  padding: 48px 0 24px;
  margin-top: 64px;
}

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

.footer-brand h3 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 12px;
}

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

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

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

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

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

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

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

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

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

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

  .nav {
    order: 3;
    width: 100%;
    margin-top: 12px;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .search-box {
    width: auto;
    flex: 1;
    margin-left: 16px;
  }

  .hero {
    padding: 48px 20px 40px;
  }

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

  .category-tags {
    gap: 10px;
  }

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

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

  .content-item {
    padding: 16px;
  }

  .content-item .icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

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

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

  .article-info dl {
    grid-template-columns: 80px 1fr;
    gap: 10px 12px;
  }

  .lyrics-box {
    padding: 24px;
  }

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

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

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

@media (max-width: 480px) {
  .hero-search {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }

  .hero-search button {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .sort-options {
    flex-wrap: wrap;
    gap: 16px;
  }

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