/* 书籍网站样式 - 阅读清单风格 */
:root {
  --accent-color: #8bc34a;
  --accent-dark: #689f38;
  --accent-light: #c5e1a5;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-card: #fafafa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
}

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

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

.nav a {
  font-size: 14px;
  font-weight: 500;
}

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

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

.search-box input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  width: 180px;
}

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

/* Main Container */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: #fff;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.stat-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Section Title */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Book Card */
.book-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

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

.book-cover {
  width: 80px;
  height: 110px;
  background: var(--bg-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.book-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.book-info .author {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.book-info .rating {
  color: #ffc107;
  font-size: 14px;
}

.book-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-reading {
  background: #e3f2fd;
  color: #1976d2;
}

.status-toread {
  background: #fff3e0;
  color: #f57c00;
}

.status-finished {
  background: #e8f5e9;
  color: #388e3c;
}

.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Book List */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.book-list .book-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.book-list .book-cover {
  width: 60px;
  height: 80px;
}

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

/* Section Grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.section-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.article-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.article-list a::before {
  content: '•';
  color: var(--accent-color);
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

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

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-muted);
}

/* Category Header */
.category-header {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
}

.category-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

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

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

/* Article Page */
.article-header {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 24px;
}

.article-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

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

.article-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 24px;
}

.article-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.book-detail-cover {
  width: 200px;
  height: 280px;
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}

.book-details h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.detail-list {
  list-style: none;
  margin-bottom: 24px;
}

.detail-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

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

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

.detail-list .value {
  font-weight: 500;
}

.book-description {
  margin-top: 32px;
}

.book-description h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.book-description p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.book-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

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

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

/* Notes Section */
.notes-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
}

.notes-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.notes-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

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

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

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

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer p {
  color: var(--text-secondary);
  font-size: 13px;
}

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

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

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

  .article-body {
    grid-template-columns: 160px 1fr;
    gap: 24px;
  }

  .book-detail-cover {
    width: 160px;
    height: 224px;
  }
}

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

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

  .search-box {
    flex: 1;
    max-width: 200px;
  }

  .search-box input {
    width: 100%;
  }

  .hero {
    padding: 32px 24px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card h3 {
    font-size: 24px;
  }

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

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

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

  .book-detail-cover {
    width: 160px;
    height: 224px;
    margin: 0 auto;
  }

  .article-header,
  .article-content {
    padding: 24px;
  }

  .category-header {
    padding: 24px;
  }

  .category-header h1 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 16px;
  }

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

  .filter-tabs {
    justify-content: center;
  }

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

  .btn {
    width: 100%;
  }
}
