* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

/* 头部导航（带Logo） */
header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 99;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo 样式（PC+手机自适应） */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo-img {
  height: 40px;
  max-width: 150px;
  object-fit: contain;
}
.site-title {
  margin-left: 10px;
  font-size: 20px;
  font-weight: bold;
  color: #e63946;
}

.nav a {
  margin-left: 1.5rem;
  color: #555;
  text-decoration: none;
  font-size: 1rem;
}
.nav a:hover {
  color: #e63946;
}

/* 主体容器 */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* 首页卡片流 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}
.post-card:hover {
  transform: translateY(-5px);
}
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.card-content {
  padding: 1.2rem;
}
.card-date {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}
.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}
.card-title a {
  color: #222;
  text-decoration: none;
}
.card-title a:hover {
  color: #e63946;
}
.card-excerpt {
  font-size: 0.95rem;
  color: #666;
}

/* 文章详情页 */
.post-page {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.post-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222;
}
.post-meta {
  color: #999;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.post-content img, .post-content video {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}
.post-content p {
  margin: 1rem 0;
  font-size: 1.05rem;
}

/* 分页 */
.pagination {
  text-align: center;
  margin: 3rem 0;
}
.pagination a {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.3rem;
  background: #fff;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
}
.pagination a:hover {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.9rem;
}

/* 手机适配 */
@media (max-width: 768px) {
  .logo-img {
    height: 32px;
    max-width: 120px;
  }
  .site-title {
    font-size: 16px;
  }
  .nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}