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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #f5f5f0;
  color: #333;
  line-height: 1.8;
}

a {
  color: #e6a23c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== 顶部广告栏 ===== */
.ad-banner-top {
  background: #fff8e6;
  border-bottom: 1px solid #f0e0c0;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  color: #999;
}

.ad-banner-top .ad-label {
  display: inline-block;
  font-size: 11px;
  color: #ccc;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.ad-placeholder {
  display: inline-block;
  background: #f9f9f0;
  border: 1px dashed #ddd;
  border-radius: 4px;
  color: #ccc;
  font-size: 13px;
}

.ad-banner-top .ad-placeholder {
  width: 728px;
  max-width: 90%;
  height: 90px;
  line-height: 90px;
}

/* ===== 头部导航 ===== */
.header {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #e6a23c;
  letter-spacing: 1px;
}

.logo span {
  color: #67c23a;
}

.nav a {
  margin-left: 28px;
  font-size: 15px;
  color: #666;
  transition: color 0.2s;
}

.nav a:hover {
  color: #e6a23c;
  text-decoration: none;
}

/* ===== 主内容区 ===== */
.main {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
}

/* ===== 文章列表 ===== */
.articles {
  flex: 1;
  min-width: 0;
}

.article-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.article-card h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.article-card h2 a {
  color: #333;
}

.article-card h2 a:hover {
  color: #e6a23c;
}

.article-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

.article-meta span {
  margin-right: 16px;
}

.article-summary {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

.article-tags {
  margin-top: 14px;
}

.tag {
  display: inline-block;
  background: #fdf6ec;
  color: #e6a23c;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 8px;
}

/* ===== 文章中广告 ===== */
.ad-in-article {
  background: #fff8e6;
  border: 1px solid #f0e0c0;
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
  text-align: center;
}

.ad-in-article .ad-label {
  font-size: 11px;
  color: #ccc;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.ad-in-article .ad-placeholder {
  width: 100%;
  height: 250px;
  line-height: 250px;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.sidebar-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sidebar-box h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #fdf6ec;
}

/* 侧边栏广告 */
.ad-sidebar .ad-placeholder {
  width: 100%;
  height: 250px;
  line-height: 250px;
}

/* 热门文章 */
.hot-list {
  list-style: none;
}

.hot-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

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

.hot-list a {
  color: #555;
}

.hot-list a:hover {
  color: #e6a23c;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud .tag {
  cursor: pointer;
}

/* ===== 文章详情页 ===== */
.article-detail {
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.article-detail h1 {
  font-size: 26px;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-detail h2 {
  font-size: 20px;
  color: #444;
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid #e6a23c;
}

.article-detail p {
  font-size: 16px;
  color: #555;
  margin-bottom: 18px;
  line-height: 2;
}

.article-detail ul, .article-detail ol {
  margin: 14px 0 18px 20px;
  color: #555;
  font-size: 16px;
  line-height: 2;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: #e6a23c;
}

/* ===== 底部广告 ===== */
.ad-banner-bottom {
  background: #fff8e6;
  border-top: 1px solid #f0e0c0;
  text-align: center;
  padding: 20px 0;
}

.ad-banner-bottom .ad-label {
  font-size: 11px;
  color: #ccc;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.ad-banner-bottom .ad-placeholder {
  width: 728px;
  max-width: 90%;
  height: 90px;
  line-height: 90px;
}

/* =====  footer ===== */
.footer {
  background: #fff;
  border-top: 1px solid #eee;
  text-align: center;
  padding: 32px 24px;
  color: #999;
  font-size: 14px;
}

.footer a {
  color: #e6a23c;
}

/* ===== 响应式 ===== */
@media (max-width: 800px) {
  .main {
    flex-direction: column;
    padding: 0 12px;
  }

  .sidebar {
    width: 100%;
  }

  .header-inner {
    padding: 0 12px;
  }

  .article-card {
    padding: 20px;
  }

  .article-detail {
    padding: 20px;
  }

  .ad-banner-top .ad-placeholder,
  .ad-banner-bottom .ad-placeholder {
    height: 60px;
    line-height: 60px;
    font-size: 11px;
  }
}
