/* ============================================
   复古灯具 - 样式表
   www.lvcuchen.cn
   关键词: 复古灯具 复古灯具介绍 复古灯具定制 手工艺术台灯
   ============================================ */

/* CSS 变量定义 */
:root {
  --primary-color: #8B4513;
  --accent-color: #D2691E;
  --bg-color: #FDF5E6;
  --card-bg: #FFF8DC;
  --text-color: #3E2723;
  --text-muted: #6D4C41;
  --border-color: #D7CCC8;
  --shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
  --shadow-hover: 0 4px 16px rgba(139, 69, 19, 0.25);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

ul {
  list-style: none;
}

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

/* ============================================
   页头 Header
   ============================================ */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #6D4C41 100%);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.logo span {
  color: #FFE0B2;
}

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

.nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  border-bottom-color: #FFE0B2;
}

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

.search-box input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.search-box button:hover {
  background: var(--primary-color);
}

/* ============================================
   主内容区 Main Container
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.section-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--card-bg) 0%, #fff 100%);
  padding: 60px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}

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

.category-filter a {
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s;
}

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

/* ============================================
   卡片 Card
   ============================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  border: 1px solid var(--border-color);
}

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

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

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

.card-meta {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ============================================
   链接列表 Link List
   ============================================ */
.link-list {
  display: grid;
  gap: 16px;
}

.link-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s;
}

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

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

.link-content {
  flex: 1;
}

.link-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 4px;
}

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

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

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 12px;
  border-radius: 12px;
  margin-top: 8px;
}

/* ============================================
   网格布局 Grid
   ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ============================================
   面包屑 Breadcrumb
   ============================================ */
.breadcrumb {
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

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

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

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

/* ============================================
   分页 Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-color);
  transition: all 0.3s;
}

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

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

/* ============================================
   统计 Statistics
   ============================================ */
.stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 30px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

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

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

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

/* ============================================
   文章列表 Article List
   ============================================ */
.article-list {
  display: grid;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.article-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent-color);
}

.article-thumb {
  width: 120px;
  height: 80px;
  background: var(--bg-color);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.article-content {
  flex: 1;
}

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

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

.article-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   文章详情 Article Detail
   ============================================ */
.article-header {
  text-align: center;
  margin-bottom: 40px;
}

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

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

.article-body {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  line-height: 1.8;
}

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

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

.article-body p {
  margin-bottom: 16px;
  color: var(--text-color);
}

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

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

.article-body ul li {
  list-style: disc;
}

.article-body ol li {
  list-style: decimal;
}

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

.tag {
  padding: 6px 14px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s;
}

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

/* ============================================
   侧边栏 Sidebar
   ============================================ */
.sidebar-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

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

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

.sidebar-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-color);
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

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

.sidebar-list .count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-color);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============================================
   页脚 Footer
   ============================================ */
.footer {
  background: var(--primary-color);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

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

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

.footer-brand h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
}

.footer-section h4 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 16px;
}

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

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   404 页面
   ============================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

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

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

.error-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 400px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  transition: background 0.3s;
}

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

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

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

  .stats {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 15px;
  }

  .nav {
    gap: 15px;
  }

  .nav a {
    font-size: 13px;
  }

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

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

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .article-item {
    flex-direction: column;
  }

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

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

  .article-body {
    padding: 24px;
  }

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

  .category-filter {
    gap: 8px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .card {
    padding: 16px;
  }

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

  .error-title {
    font-size: 22px;
  }
}
