/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基础样式 */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  color: #2c3e50;
  background: #f4f4f4;
  font-size: 16px;
}

.wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a:hover {
  color: #3498db;
}

/* 头部样式 */
.site-header {
  background: #fff;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.site-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.site-title h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.site-title h1 a {
  color: #2c3e50;
  text-decoration: none;
}

.site-description {
  color: #666;
  font-size: 1rem;
}

.main-navigation {
  text-align: center;
}

.nav-menu {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: #666;
  font-size: 1.1rem;
  padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #3498db;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #2c3e50;
}

/* 内容区布局 */
.content-area {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* 主内容区样式 */
.site-main {
  background: #fff;
  padding: 2rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.post:last-child {
  margin-bottom: 1rem;
  border-bottom: none;
}

.post-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-title a {
  color: #2c3e50;
}

.post-title a:hover {
  color: #3498db;
}

.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-meta span {
  margin-right: 1.5rem;
}

.post-content {
  color: #444;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1rem;
}

.read-more {
  color: #3498db;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

.post-footer {
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.post-tags a {
  display: inline-block;
  margin-right: 0.5rem;
  color: #666;
}

.post-tags a:hover {
  color: #3498db;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-numbers {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #666;
}

.page-numbers.current {
  background: #3498db;
  color: #fff;
  border-color: #3498db;
}

.page-numbers:hover:not(.current) {
  background: #f8f9fa;
}

/* 侧边栏样式 */
.sidebar {
  align-self: start;
}

.widget {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eee;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.widget li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.author-info {
  text-align: center;
}

.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.author-info p {
  color: #666;
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  background: #f8f9fa;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  font-size: 0.9rem;
  color: #666;
}

.tag-link:hover {
  background: #3498db;
  color: #fff;
}

/* 页脚样式 */
.site-footer {
  background: #2c3e50;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links a {
  color: #fff;
  margin-left: 1.5rem;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .content-area {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .wrapper {
    padding: 0 15px;
  }

  .site-header {
    padding: 1rem 0;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

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

  .site-main {
    padding: 1rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links a {
    margin: 0 0.75rem;
  }
}