/* 老式玩具 - 资源导航风格样式表 */
/* 主色调: #8B4513 ( saddle brown - 复古棕色) */

:root {
  --primary: #8B4513;
  --primary-light: #A0522D;
  --primary-dark: #654321;
  --accent: #D2691E;
  --bg-main: #FDF5E6;
  --bg-card: #FFF8DC;
  --bg-header: #8B4513;
  --text-main: #333;
  --text-light: #666;
  --text-muted: #999;
  --border: #D2B48C;
  --shadow: rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 1200px;
}

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

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

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

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

/* Header */
.header {
  background: var(--bg-header);
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.logo span {
  color: #FFD700;
}

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

.nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.nav a:hover {
  color: #FFD700;
}

/* Search Box */
.search-box {
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
}

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

/* Main Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Section Title */
.section-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.category-btn {
  padding: 0.5rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow);
}

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

.card-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-tag {
  background: var(--primary-light);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Link List */
.link-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.link-item {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: background 0.2s;
}

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

.link-item:hover {
  background: rgba(139, 69, 19, 0.05);
}

.link-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
}

.link-title {
  font-size: 1.05rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.link-url {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

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

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #28a745;
  margin-top: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

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

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

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

.breadcrumb strong {
  color: var(--primary);
  font-weight: 600;
}

/* Article Detail */
.article-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.article-content h2 {
  color: var(--primary);
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text-main);
}

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

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

/* Info Box */
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  width: 120px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.info-value {
  flex: 1;
  color: var(--text-main);
  font-size: 0.9rem;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--bg-main);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
}

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

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

.page-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Stats */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Three Column Section */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.col-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.col-section h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.col-section ul {
  list-style: none;
}

.col-section li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

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

.col-section a {
  color: var(--text-main);
  font-size: 0.9rem;
  display: block;
}

.col-section a:hover {
  color: var(--primary);
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-code {
  font-size: 6rem;
  font-weight: bold;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

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

.error-desc {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background 0.2s;
}

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

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0;
  margin-top: 3rem;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

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

.footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: none;
    order: 3;
  }

  .nav {
    justify-content: center;
    order: 2;
  }

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

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

  .stats-bar {
    flex-direction: column;
    gap: 1rem;
  }

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

  .link-item {
    flex-direction: column;
    gap: 0.75rem;
  }

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

  .article-content {
    padding: 1.25rem;
  }
}
