:root {
  --primary: #49b1f5;
  --primary-dark: #3a93cc;
  --bg: #f5f7f9;
  --card-bg: #fff;
  --text: #3b4859;
  --text-light: #858585;
  --border: #eaecef;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.site-header {
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: rgba(73, 177, 245, 0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* ===== 英雄区 ===== */
.hero {
  background: linear-gradient(135deg, #49b1f5 0%, #7ed0fb 60%, #a5dcfc 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}

.hero h1 {
  font-size: 34px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero p {
  font-size: 16px;
  opacity: 0.95;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== 区块标题 ===== */
.section {
  margin: 36px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 20px;
  color: var(--text);
}

.section-title .more {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-light);
}

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-cover {
  height: 150px;
  background: linear-gradient(135deg, #e3f2fd, #d1e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.card-title a {
  color: inherit;
}

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

.card-desc {
  font-size: 13px;
  color: var(--text-light);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.card-meta .cat {
  background: rgba(73, 177, 245, 0.12);
  color: var(--primary);
  padding: 1px 8px;
  border-radius: 4px;
}

.card-meta .stars {
  color: #f5b94b;
  letter-spacing: 1px;
}

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.article-thumb {
  width: 200px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e3f2fd, #cfe8fb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 40px;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-info h3 {
  font-size: 18px;
  font-weight: 600;
}

.article-info h3 a {
  color: var(--text);
}

.article-info h3 a:hover {
  color: var(--primary);
}

.article-info .excerpt {
  font-size: 13px;
  color: var(--text-light);
  flex: 1;
}

.article-info .meta {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  gap: 14px;
}

.article-info .meta .cat {
  color: var(--primary);
}

/* ===== 排行列表 ===== */
.rank-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}

.rank-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.rank-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.rank-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.rank-list .rank {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #f0f2f5;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.rank-list li:nth-child(1) .rank {
  background: #ffd591;
  color: #ad4e00;
}

.rank-list li:nth-child(2) .rank {
  background: #ffe0b0;
  color: #873800;
}

.rank-list li:nth-child(3) .rank {
  background: #ffe8cc;
  color: #7a3d00;
}

.rank-list li a {
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list li a:hover {
  color: var(--primary);
}

.rank-list .score {
  margin-left: auto;
  color: #f5b94b;
  font-size: 12px;
  flex-shrink: 0;
}

/* ===== 硬件/创业卡片 ===== */
.hardware-card {
  display: flex;
  gap: 14px;
}

.hardware-card .h-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e3f2fd, #d1e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hardware-card .h-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hardware-card .h-body h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.hardware-card .h-body h4 a {
  color: var(--text);
}

.hardware-card .h-body .h-spec {
  font-size: 12px;
  color: var(--text-light);
}

.hardware-card .h-body .h-price {
  font-size: 13px;
  color: #e0701f;
  font-weight: 600;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #22272e;
  color: #aab2bf;
  margin-top: 48px;
  padding: 40px 0 24px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.footer-cols h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-cols p {
  font-size: 13px;
  line-height: 1.8;
}

.footer-cols ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-cols ul a {
  color: #aab2bf;
  font-size: 13px;
}

.footer-cols ul a:hover {
  color: var(--primary);
}

.copyright {
  text-align: center;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

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

.filter-tabs button {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

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

/* ===== 分类聚合页 ===== */
.column-hero {
  background: linear-gradient(135deg, #49b1f5, #7ed0fb);
  color: #fff;
  padding: 32px 0;
  text-align: center;
}

.column-hero h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.column-hero p {
  opacity: 0.95;
  font-size: 14px;
}

/* ===== 面包屑/页标题 ===== */
.page-head {
  padding: 26px 0 6px;
}

.page-head h1 {
  font-size: 24px;
}

.page-head .sub {
  color: var(--text-light);
  font-size: 14px;
}

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

.tag-cloud a {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.tag-cloud a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* ===== 归档列表 ===== */
.archive-year {
  margin-bottom: 28px;
}

.archive-year h2 {
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--primary);
}

.archive-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.archive-list .date {
  color: var(--text-light);
  font-size: 12px;
  width: 48px;
  flex-shrink: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .rank-section {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

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

@media (max-width: 600px) {
  .hero h1 {
    font-size: 26px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

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