/* ===== 古董收藏网站样式 ===== */
/* 主色调: 古典棕金色系 */

:root {
  --primary-color: #8b4513;
  --accent-color: #d4a574;
  --bg-color: #faf8f5;
  --card-bg: #ffffff;
  --text-primary: #3d2914;
  --text-secondary: #6b5b4f;
  --border-color: #e8dfd0;
  --shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
  --shadow-hover: 0 4px 16px rgba(139, 69, 19, 0.15);
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== 页头 ===== */
.header {
  background: linear-gradient(135deg, #3d2914 0%, #5c4028 100%);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

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

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

.nav a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  transition: color 0.3s;
  position: relative;
}

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

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

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.5);
}

.search-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 16px;
}

/* ===== 主要内容区 ===== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 200px);
}

/* ===== Hero区域 ===== */
.hero {
  background: linear-gradient(135deg, #5c4028 0%, #8b6239 50%, #d4a574 100%);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.hero-desc {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
  position: relative;
}

.hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary-color);
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  position: relative;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ===== 区块标题 ===== */
.section-title {
  font-size: 22px;
  font-weight: 700;
  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;
}

/* ===== 分类卡片 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.category-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.category-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: #fff;
}

.category-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.category-count {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== 内容卡片 ===== */
.content-section {
  margin-bottom: 48px;
}

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

.content-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

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

.card-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #e8dfd0, #d4c4b0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary-color);
}

.card-body {
  padding: 20px;
}

.card-tag {
  display: inline-block;
  background: rgba(212, 165, 116, 0.2);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 文章列表 ===== */
.article-list {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.article-thumb {
  width: 120px;
  height: 90px;
  background: linear-gradient(135deg, #e8dfd0, #d4c4b0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.article-info {
  flex: 1;
}

.article-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.article-title:hover {
  color: var(--primary-color);
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

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

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

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

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

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

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

/* ===== 分类页头部 ===== */
.category-header {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  text-align: center;
}

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

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

/* ===== 筛选标签 ===== */
.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

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

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag {
  padding: 6px 14px;
  background: rgba(212, 165, 116, 0.15);
  border-radius: 16px;
  font-size: 13px;
  color: var(--primary-color);
  transition: all 0.3s;
}

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

/* ===== 文章详情页 ===== */
.article-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.article-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

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

.article-meta-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-featured-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #e8dfd0, #d4c4b0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--primary-color);
  margin-bottom: 32px;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

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

.article-content p {
  margin-bottom: 16px;
}

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

.article-content li {
  margin-bottom: 8px;
}

/* ===== 404页面 ===== */
.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;
}

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

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

.error-btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s;
}

.error-btn:hover {
  background: var(--accent-color);
  color: var(--text-primary);
}

/* ===== 侧边栏 ===== */
.sidebar-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-item-num {
  width: 24px;
  height: 24px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

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

.sidebar-item-title {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 三栏底部 ===== */
.three-col-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}

/* ===== 页脚 ===== */
.footer {
  background: #3d2914;
  color: rgba(255,255,255,0.8);
  padding: 48px 24px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.8;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
}

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

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

  .three-col-section {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 8px;
  }

  .search-box {
    width: 160px;
  }

  .hero {
    padding: 40px 24px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-desc {
    font-size: 15px;
  }

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

  .category-card {
    padding: 20px 16px;
  }

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

  .article-item {
    flex-direction: column;
    gap: 12px;
  }

  .article-thumb {
    width: 100%;
    height: 160px;
  }

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

  .article-container {
    padding: 24px;
  }

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

  .article-featured-image {
    height: 200px;
    font-size: 48px;
  }

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

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

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

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

  .filter-tabs {
    gap: 8px;
  }

  .filter-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .article-meta-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
}
