/* ============================================================
   大众解梦·大气响应式模板 (rldh)  v1.0.26
   深蓝鎏金 · 内容站 · PC/手机自适应
   ============================================================ */
:root {
  --c-primary: #2b4a8a;
  --c-primary-dark: #1c3264;
  --c-primary-darker: #16264e;
  --c-accent: #c9a24b;
  --c-accent-light: #e8cf96;
  --c-bg: #f2f3f7;
  --c-card: #ffffff;
  --c-text: #2e3340;
  --c-muted: #70798c;
  --c-border: #e4e7ef;
  --c-link: #2b4a8a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(23, 38, 78, .06);
  --shadow-hover: 0 10px 26px rgba(23, 38, 78, .13);
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
}

img { max-width: 100%; height: auto; border: 0; }
a { color: var(--c-link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--c-accent); }
ul, ol { list-style: none; }
input, textarea, button, select { font-family: inherit; font-size: 14px; outline: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ============ 顶部 ============ */
.site-header {
  background: linear-gradient(120deg, #16264e 0%, #24407e 55%, #2e5aa8 100%);
  color: #fff;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 18px 0 14px;
}
.site-brand { min-width: 0; }
.site-name { font-size: 26px; font-weight: 700; line-height: 1.3; }
.site-name a { color: #fff; }
.site-name a:hover { color: var(--c-accent-light); }
.site-name::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-light));
}
.site-slogan {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
  max-width: 640px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.header-search { width: 360px; max-width: 100%; }
.header-search form {
  display: flex;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(13, 27, 61, .25);
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 10px 16px;
  color: var(--c-text);
  background: transparent;
}
.header-search button {
  border: 0;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #c9a24b, #a8812f);
  cursor: pointer;
  font-weight: 600;
  transition: opacity .2s;
}
.header-search button:hover { opacity: .9; }

/* 导航 */
.site-nav { background: rgba(11, 21, 46, .35); }
.nav-list { display: flex; flex-wrap: wrap; }
.nav-list > li { position: relative; }
.nav-list a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  border-bottom: 2px solid transparent;
}
.nav-list > li > a:hover,
.nav-list > li.current-menu-item > a {
  color: var(--c-accent-light);
  border-bottom-color: var(--c-accent);
}
/* 二级菜单 */
.nav-list li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 24px rgba(11, 21, 46, .18);
  z-index: 99;
}
.nav-list li:hover > ul { display: block; }
.nav-list li ul a {
  color: var(--c-text);
  padding: 9px 16px;
  font-size: 14px;
  border-bottom: 0;
  white-space: nowrap;
}
.nav-list li ul a:hover { color: var(--c-accent); background: #f6f7fb; }

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 主体布局 ============ */
.site-main { padding: 22px 0 40px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.main-col { min-width: 0; }
.side-col { min-width: 0; }

/* ============ 列表卡片 ============ */
.post-card {
  display: flex;
  gap: 18px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-card.post-top { border-left: 3px solid var(--c-accent); }
.post-thumb { flex: 0 0 240px; }
.post-thumb a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.post-thumb img {
  width: 240px;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-title { font-size: 19px; font-weight: 700; line-height: 1.45; }
.post-title a { color: var(--c-text); }
.post-title a:hover { color: var(--c-primary); }
.top-badge {
  display: inline-block;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #c9a24b, #a8812f);
  border-radius: 4px;
  padding: 1px 7px;
  margin-right: 6px;
  vertical-align: 2px;
}
.post-intro {
  margin-top: 10px;
  color: var(--c-muted);
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--c-muted);
}
.meta-cat a {
  color: var(--c-primary);
  background: #eef2fb;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
}
.meta-cat a:hover { color: #fff; background: var(--c-primary); }
.read-more {
  margin-left: auto;
  color: var(--c-primary);
  font-weight: 600;
  font-size: 13px;
}
.read-more i { font-style: normal; transition: transform .2s ease; display: inline-block; }
.read-more:hover i { transform: translateX(4px); }

/* ============ 文章正文页 ============ */
.post-detail {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 28px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-muted);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--c-border);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.crumb-sep { color: #c3cad8; }
.crumb-here {
  color: var(--c-text);
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-head .post-title { font-size: 26px; line-height: 1.4; }
.post-head .post-meta { margin-top: 12px; padding-top: 0; border: 0; }
.post-body { margin-top: 18px; font-size: 16px; line-height: 1.9; color: #333a4a; }
.post-body p { margin-bottom: 16px; }
.post-body h2, .post-body h3, .post-body h4 {
  margin: 24px 0 12px;
  line-height: 1.4;
  color: var(--c-text);
  font-weight: 700;
}
.post-body h2 {
  font-size: 21px;
  padding-left: 12px;
  border-left: 4px solid var(--c-accent);
}
.post-body h3 { font-size: 18px; }
.post-body img {
  display: block;
  margin: 12px auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--c-accent);
  background: #faf8f1;
  color: #6b6250;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 24px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 6px; }
.post-body pre, .post-body code {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  background: #f4f5f9;
  border-radius: 6px;
}
.post-body code { padding: 2px 6px; font-size: 14px; }
.post-body pre { padding: 14px 16px; overflow-x: auto; line-height: 1.6; }
.post-body pre code { padding: 0; background: transparent; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}
.post-body th, .post-body td {
  border: 1px solid var(--c-border);
  padding: 8px 12px;
  text-align: left;
}
.post-body th { background: #f4f6fc; color: var(--c-primary); font-weight: 600; }
.post-body hr { border: 0; border-top: 1px dashed var(--c-border); margin: 22px 0; }
.post-tags { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--c-border); }
.tags-label { font-size: 14px; color: var(--c-muted); }
.tag-link {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 12px;
  font-size: 13px;
  color: var(--c-primary);
  background: #eef2fb;
  border-radius: 999px;
}
.tag-link:hover { color: #fff; background: var(--c-primary); }

/* 上下篇 */
.post-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.post-nav-item {
  flex: 1;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.post-nav-label { display: block; font-size: 12px; color: var(--c-muted); margin-bottom: 4px; }
.post-nav-link {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-nav-link:hover { color: var(--c-primary); }
.post-nav-empty { font-size: 14px; color: #b9c0cf; }

/* 相关阅读 */
.related-box { margin-bottom: 16px; }
.related-list { padding: 6px 18px 10px; }
.related-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--c-border);
}
.related-list li:last-child { border-bottom: 0; }
.related-list a {
  color: var(--c-text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-list a:hover { color: var(--c-primary); }
.rel-date { flex: none; font-size: 12px; color: var(--c-muted); }

/* ============ 侧栏组件 ============ */
.widget {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fbfcfe, #f5f7fc);
}
.widget-title span {
  position: relative;
  padding-left: 14px;
}
.widget-title span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-accent-light));
}
.widget-body { padding: 14px 18px; }
.widget-list li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--c-border);
}
.widget-list li:last-child { border-bottom: 0; }
.widget-list a {
  color: var(--c-text);
  font-size: 14px;
}
.widget-list a:hover { color: var(--c-primary); }
.widget-list a::before {
  content: "·";
  color: var(--c-accent);
  font-weight: 700;
  margin-right: 8px;
}
.widget-content { font-size: 14px; color: var(--c-text); }
.widget-content a { color: var(--c-link); }

/* 最新发布 */
.new-list { counter-reset: new; padding: 6px 18px 10px; }
.new-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}
.new-list li:last-child { border-bottom: 0; }
.new-num {
  flex: none;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-muted);
  background: #eef0f5;
  border-radius: 6px;
}
.new-list li:nth-child(1) .new-num,
.new-list li:nth-child(2) .new-num,
.new-list li:nth-child(3) .new-num {
  color: #fff;
  background: linear-gradient(135deg, #c9a24b, #a8812f);
}
.new-list a {
  color: var(--c-text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.new-list a:hover { color: var(--c-primary); }

/* ============ 分页 ============ */
.pagination { margin: 6px 0 0; }
.pagination-inner { display: flex; flex-wrap: wrap; gap: 8px; }
.page-link {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  padding: 7px 12px;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: all .2s ease;
}
a.page-link:hover {
  color: #fff;
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.page-link.current {
  color: #fff;
  background: linear-gradient(135deg, #c9a24b, #a8812f);
  border-color: transparent;
  cursor: default;
}

/* ============ 广告位 ============ */
.ad-slot {
  text-align: center;
  margin: 16px 0;
  padding: 10px;
  background: #fff;
  border: 1px dashed #d7dce8;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ad-slot img, .ad-slot iframe, .ad-slot script + * { max-width: 100%; }
.ad-top { margin: 0 0 18px; }
.ad-home { margin: 6px 0 16px; }
.ad-article { margin: 16px 0 0; }
.ad-sidebar, .ad-sidebar2 { margin: 0 0 16px; }
.ad-footer { margin: 0 0 18px; }

/* ============ 列表页标题 ============ */
.list-head {
  background: linear-gradient(120deg, #24407e, #2e5aa8);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  color: #fff;
  box-shadow: var(--shadow);
}
.list-head-title { font-size: 22px; line-height: 1.4; margin: 0; }
.list-head-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .85);
  margin: 6px 0 0;
}

/* ============ 搜索页 / 404 ============ */
.search-head {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.search-title { font-size: 20px; color: var(--c-text); }
.search-count { margin-top: 6px; font-size: 13px; color: var(--c-muted); }
.search-empty {
  background: var(--c-card);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}
.search-empty-title { font-size: 17px; color: var(--c-text); }
.search-empty-tip { margin-top: 8px; font-size: 13px; color: var(--c-muted); }
.search-empty-cats { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.search-empty-cats a {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  color: var(--c-primary);
  font-size: 13px;
  background: var(--c-card);
  transition: all .2s ease;
}
.search-empty-cats a:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.error-404 {
  text-align: center;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 70px 24px;
  box-shadow: var(--shadow);
}
.error-code {
  font-size: 90px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #2b4a8a, #c9a24b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-title { margin-top: 14px; font-size: 22px; }
.error-desc { margin: 12px auto 22px; max-width: 520px; color: var(--c-muted); font-size: 14px; }
.error-search {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fbfcfe;
}
.error-search input { flex: 1; min-width: 0; border: 0; padding: 10px 16px; }
.error-search button {
  border: 0;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, #c9a24b, #a8812f);
  cursor: pointer;
}
.btn-home {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, #24407e, #2e5aa8);
  font-weight: 600;
}
.btn-home:hover { opacity: .9; color: #fff; }

/* ============ 页脚 ============ */
.site-footer {
  background: #131b31;
  color: #aab4cc;
  margin-top: 10px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 34px 0 26px;
}
.footer-title { font-size: 16px; color: #fff; margin-bottom: 14px; }
.footer-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--c-accent);
}
.footer-desc { font-size: 13px; line-height: 1.9; color: #8b96b4; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #aab4cc; font-size: 14px; }
.footer-links a:hover { color: var(--c-accent-light); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: #78839f;
}
.footer-bottom a { color: #9aa6c2; }
.footer-bottom a:hover { color: var(--c-accent-light); }
.footer-icp { font-size: 12px; color: #7c88a6; }
.footer-copyright {
  width: 100%;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.9;
  color: #7c88a6;
  text-align: center;
  letter-spacing: .2px;
}
.footer-copyright a { color: #9aa6c2; text-decoration: none; }
.footer-copyright a:hover { color: var(--c-accent-light); }

/* 返回顶部 */
.backtop {
  position: fixed;
  right: 24px;
  bottom: 30px;
  width: 44px;
  height: 44px;
  line-height: 42px;
  text-align: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, #24407e, #2e5aa8);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(23, 38, 78, .3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s ease;
  z-index: 99;
}
.backtop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.backtop:hover { background: var(--c-accent); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .widget, .ad-sidebar, .ad-sidebar2 { margin-bottom: 16px; }
}

@media (max-width: 768px) {
  .header-bar { padding: 14px 0 12px; }
  .site-name { font-size: 22px; }
  .header-search { width: 100%; order: 3; margin-top: 12px; }
  .nav-toggle { display: flex; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav .container { padding: 0; }
  .nav-list { flex-direction: column; }
  .nav-list > li > a { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid transparent; }
  .nav-list > li > a:hover, .nav-list > li.current-menu-item > a { border-left-color: var(--c-accent); border-bottom-color: rgba(255, 255, 255, .08); }
  .nav-list li ul {
    display: block;
    position: static;
    min-width: 0;
    background: rgba(11, 21, 46, .25);
    box-shadow: none;
    border-radius: 0;
  }
  .nav-list li ul a { color: rgba(255, 255, 255, .82); padding: 9px 16px 9px 28px; }
  .nav-list li ul a:hover { color: var(--c-accent-light); background: transparent; }
  .post-card { flex-direction: column; padding: 16px; }
  .post-thumb { flex: none; }
  .post-thumb img, .post-thumb a { width: 100%; height: auto; aspect-ratio: 3/2; }
  .post-detail { padding: 18px 16px 22px; }
  .post-head .post-title { font-size: 21px; }
  .post-body { font-size: 15.5px; }
  .post-nav { flex-direction: column; }
  .side-col { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding: 26px 0 20px; }
  .breadcrumb .crumb-here { max-width: 45%; }
}

@media (max-width: 480px) {
  .post-meta { gap: 8px 12px; }
  .read-more { margin-left: 0; }
  .backtop { right: 14px; bottom: 18px; width: 40px; height: 40px; line-height: 38px; font-size: 18px; }
  .error-code { font-size: 64px; }
}
