/* 全局样式重置 + 基础变量 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #2563eb; /* 主色调-蓝色 */
  --primary-light: #3b82f6;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

body {
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 通用容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 通用按钮 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* 通用板块标题 */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-menu a {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu a.active,
.nav-menu a:hover {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero-container {
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  opacity: 0.9;
}

/* 最新文章卡片 */
.article-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.article-card {
  background-color: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-card .card-date {
  padding: 16px 24px;
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
}

.article-card .card-title {
  padding: 24px 24px 16px;
  font-size: 1.25rem;
}

.article-card .card-desc {
  padding: 0 24px 24px;
  color: var(--text-gray);
}

.article-card .card-link {
  display: inline-block;
  margin: 0 24px 24px;
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-card .card-link:hover {
  gap: 10px;
}

/* 博客统计 */
.blog-stats {
  background-color: var(--primary-color);
  color: white;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-item i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

.stat-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 500;
  opacity: 0.9;
}

.stat-item p {
  font-size: 2rem;
  font-weight: 700;
}

/* 文章列表页样式 */
.article-list-page {
  min-height: calc(100vh - 200px);
}

.article-filter {
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-gray);
  font-size: 1.1rem;
}

.article-list-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.article-item {
  background-color: var(--bg-white);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-left: 4px solid transparent;
}

.article-item:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--primary-color);
}

.item-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  color: var(--text-gray);
  font-size: 0.9rem;
}

.item-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.item-title a:hover {
  color: var(--primary-color);
}

.item-desc {
  color: var(--text-gray);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-link {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.item-link:hover {
  gap: 10px;
}

/* 文章详情页样式（260201001.html） */
.article-detail-page {
  max-width: 800px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-header .article-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--text-gray);
  margin: 16px 0;
  font-size: 0.9rem;
}

.article-content {
  background-color: var(--bg-white);
  padding: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  line-height: 1.8;
}

.article-content h2,
.article-content h3 {
  margin: 24px 0 16px;
  color: var(--primary-color);
}

.article-content p {
  margin-bottom: 16px;
  text-align: justify;
}

.article-content code {
  background-color: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #dc2626;
}

.article-content pre {
  background-color: #1e293b;
  color: white;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
  color: var(--text-gray);
  margin: 20px 0;
}

/* 关于页样式（about.html） */
.about-page {
  max-width: 800px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

.about-card {
  background-color: var(--bg-white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 24px;
  overflow: hidden;
  border: 4px solid var(--primary-color);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-card h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.about-card .about-tag {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 24px;
  display: block;
}

.about-card .about-desc {
  line-height: 1.8;
  margin-bottom: 32px;
  text-align: justify;
}

.about-contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.about-contact a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.about-contact a:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
}

/* 底部样式 */
.footer {
  background-color: var(--text-dark);
  color: white;
  padding: 40px 0;
  text-align: center;
  margin-top: 40px;
}

.footer-content p {
  margin-bottom: 16px;
  opacity: 0.8;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 1.2rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 响应式媒体查询 - 平板/手机 */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-menu.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .article-content,
  .about-card {
    padding: 20px;
  }

  .article-header .article-meta {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .stat-item p {
    font-size: 1.5rem;
  }

  .about-avatar {
    width: 120px;
    height: 120px;
  }
}