/* ========================================
   茶道 - 长文风格样式表
   主色调: #455a64
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #455a64;
  --accent-light: #607d8b;
  --accent-dark: #37474f;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-body: #fafafa;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --max-width: 680px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --line-height: 1.8;
}

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

/* 基础样式 */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-body);
}

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

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

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

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

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

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
}

.logo span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

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

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

.search-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

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

/* ========================================
   Main 主内容区
   ======================================== */
.main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* ========================================
   Hero 区块
   ======================================== */
.hero {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

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

/* ========================================
   Section 区块
   ======================================== */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* ========================================
   Card 卡片
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--accent-light);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card:hover .card-title {
  color: var(--accent-color);
}

.card-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-meta span + span::before {
  content: "·";
  margin: 0 0.5rem;
}

.card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   List 列表
   ======================================== */
.list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.list-item a {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

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

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

/* ========================================
   Article 文章
   ======================================== */
.article-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

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

.article-meta span + span::before {
  content: "·";
  margin: 0 0.5rem;
}

.read-time {
  color: var(--accent-color);
}

/* 特色图片 */
.featured-image {
  margin: 2rem 0;
  border-radius: 4px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
}

/* 文章内容 */
.article-content {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-family: var(--font-body);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--accent-color);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.article-content blockquote {
  border-left: 3px solid var(--accent-color);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* 标签 */
.tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.tag {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: #f0f0f0;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag:hover {
  background: var(--accent-color);
  color: #fff;
}

/* ========================================
   Category 分类页
   ======================================== */
.category-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.category-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

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

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.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;
}

/* ========================================
   404 页面
   ======================================== */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--accent-color);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

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

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border-radius: 3px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

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

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

.footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

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

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

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

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

  .hero {
    padding: 2rem 0;
  }

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

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

  .article-content {
    font-size: 1rem;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 0.875rem;
  }

  .card {
    padding: 1rem;
  }

  .logo span {
    display: none;
  }
}
