/* ===== 基础重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f8f9fa;
  --bg-gray: #f0f2f5;
  --border-color: #e8e8e8;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

ul {
  list-style: none;
}

/* ===== 布局容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* ===== 分屏布局 ===== */
.split-section {
  padding: 60px 0;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  min-height: 400px;
}

.split-panel {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.split-panel:hover {
  box-shadow: var(--shadow-hover);
}

.panel-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

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

.panel-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  flex: 1;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent-color);
  color: var(--bg-white);
  border-radius: var(--radius);
  font-weight: 500;
  margin-top: 24px;
  transition: background 0.3s ease;
}

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

/* ===== 三栏内容区 ===== */
.content-section {
  padding: 40px 0 60px;
  background: var(--bg-white);
}

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

.col-box {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
}

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

.col-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.col-list a {
  color: var(--text-secondary);
  display: block;
}

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

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-gray);
  padding: 16px 0;
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

/* ===== 分类页特殊样式 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding: 40px 0;
}

.category-block {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.category-block h2 {
  font-size: 20px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--bg-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.category-item:hover {
  background: var(--bg-gray);
  color: var(--accent-color);
}

.category-item::before {
  content: "•";
  color: var(--accent-color);
  margin-right: 10px;
}

/* ===== 文章页特殊样式 ===== */
.article-section {
  padding: 40px 0;
}

.article-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-content h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.article-meta {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-body {
  color: var(--text-secondary);
  line-height: 1.9;
}

.article-body p {
  margin-bottom: 20px;
}

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

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

/* ===== 推荐文章区 ===== */
.recommend-section {
  padding: 40px 0;
  background: var(--bg-light);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.recommend-list {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.recommend-list a {
  color: var(--text-secondary);
  padding: 8px 16px;
  background: var(--bg-white);
  border-radius: 20px;
  font-size: 14px;
}

.recommend-list a:hover {
  color: var(--accent-color);
  box-shadow: var(--shadow);
}

/* ===== 两栏推荐 ===== */
.two-col-section {
  padding: 40px 0;
  background: var(--bg-white);
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.col-block {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
}

.col-block h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.col-block ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

/* ===== Footer ===== */
.footer {
  background: var(--text-primary);
  color: var(--bg-white);
  padding: 40px 0;
  text-align: center;
}

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

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

.error-content {
  max-width: 480px;
}

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

.error-title {
  font-size: 28px;
  margin-bottom: 16px;
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    height: auto;
    padding: 16px 20px;
    gap: 12px;
  }

  .nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .split-grid,
  .category-grid,
  .three-col-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .split-panel {
    padding: 24px;
  }

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

  .article-content {
    padding: 24px;
  }

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

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