/* ===== 茶具 - 资源导航风格 ===== */
/* 配色: 茶色系 --accent-color: #8B4513 */

:root {
  --accent-color: #8B4513;
  --accent-light: #A0522D;
  --accent-dark: #654321;
  --bg-primary: #FDFBF7;
  --bg-secondary: #F5F0E8;
  --bg-card: #FFFFFF;
  --text-primary: #2C2416;
  --text-secondary: #6B5B4F;
  --text-muted: #9B8B7F;
  --border-color: #E8E0D5;
  --shadow: 0 2px 8px rgba(44, 36, 22, 0.08);
  --shadow-hover: 0 4px 16px rgba(44, 36, 22, 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, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

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

/* ===== Header ===== */
.header {
  background: var(--bg-card);
  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 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

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

.nav a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

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

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

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}

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

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

/* ===== Search Box ===== */
.search-box {
  max-width: 600px;
  margin: 0 auto 32px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px 16px 52px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-card);
  transition: all 0.2s;
}

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

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

/* ===== Category Filter ===== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.category-filter a {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.category-filter a:hover,
.category-filter a.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ===== Link Cards ===== */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.link-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.link-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-light);
}

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

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

.link-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-url {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.link-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.link-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.rating {
  color: #FFB800;
}

.verified {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #22C55E;
}

/* ===== Statistics ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
}

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

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== Article Lists ===== */
.article-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.article-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.article-list h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.article-list li {
  margin-bottom: 12px;
}

.article-list a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: color 0.2s;
}

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

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

.breadcrumb .separator {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Category Header ===== */
.category-header {
  margin-bottom: 32px;
}

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

.category-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ===== Sub Categories ===== */
.sub-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.sub-categories a {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.sub-categories a:hover {
  background: var(--accent-color);
  color: white;
}

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

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

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

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

/* ===== Article Detail ===== */
.article-header {
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

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

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

.article-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 24px 0;
}

/* ===== Link Detail Box ===== */
.link-detail-box {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.link-detail-box .url {
  font-size: 14px;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 16px;
}

.link-actions {
  display: flex;
  gap: 12px;
}

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

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

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

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

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

/* ===== Detail List ===== */
.detail-list {
  list-style: none;
  margin-bottom: 24px;
}

.detail-list li {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

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

.detail-list .label {
  width: 120px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.detail-list .value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tags a {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tags a:hover {
  background: var(--accent-color);
  color: white;
}

/* ===== Related Links ===== */
.related-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.related-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
}

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

.related-card .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.related-card .title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

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

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

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

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  margin-top: 60px;
}

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

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

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

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

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .article-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .main {
    padding: 20px 16px;
  }

  .hero {
    padding: 32px 16px;
  }

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

  .category-filter {
    gap: 8px;
  }

  .category-filter a {
    padding: 8px 16px;
    font-size: 13px;
  }

  .link-card {
    padding: 16px;
  }

  .link-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .stats {
    flex-direction: column;
    gap: 24px;
  }

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

  .article-content {
    padding: 20px;
  }

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

  .error-code {
    font-size: 80px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .link-card {
    flex-direction: column;
  }

  .link-icon {
    align-self: flex-start;
  }

  .sub-categories {
    gap: 8px;
  }

  .sub-categories a {
    padding: 6px 12px;
    font-size: 13px;
  }
}
