/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

a {
  text-decoration: none;
  color: #2c3e50;
  transition: color 0.3s ease;
}

a:hover {
  color: #3498db;
}

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

/* 导航栏 */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
}

.logo span {
  color: #3498db;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  font-weight: 500;
}

/* 主内容区 */
.main-content {
  display: flex;
  margin: 40px 0;
  gap: 30px;
}

/* 文章列表 */
.posts {
  flex: 2;
}

.post-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-content {
  padding: 25px;
}

.post-category {
  display: inline-block;
  background: #e8f4fc;
  color: #3498db;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.post-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.post-excerpt {
  color: #666;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  color: #888;
  font-size: 0.9rem;
}

.post-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
}

.post-date {
  margin-left: 20px;
}

/* 侧边栏 */
.sidebar {
  flex: 1;
}

.sidebar-widget {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.about-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.author-bio-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 15px;
}

.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

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

.categories-list a {
  display: flex;
  justify-content: space-between;
}

.category-count {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
}

.subscribe-form input {
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
}

.subscribe-form button {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.subscribe-form button:hover {
  background: #2980b9;
}

/* 页脚 */
main-footer {
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: #2c3e50;
  color: white;
  padding: 20px 20px 20px;
  margin-top: 20px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 0px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 0px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ddd;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  color: white;
  transition: background 0.3s ease;
}

.social-icon:hover {
  background: #3498db;
}

.copyright {
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .nav-links {
    display: none;
  }

  .footer-content {
    flex-direction: column;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-date {
    margin-left: 0;
    margin-top: 10px;
  }
}
