/* ================= 慢橘五号 · 暖橘奶油风 v2 ================= */
:root {
  --primary: #E8734A;
  --primary-light: #F6A96B;
  --primary-dark: #C95A35;
  --cream: #FFF9F2;
  --card: #FFFFFF;
  --text: #3F2E28;
  --muted: #9A867C;
  --line: #F2E6DA;
  --bg-tag: #FDEFDF;
  --shadow: 0 4px 20px rgba(200, 130, 90, 0.10);
  --shadow-hover: 0 10px 28px rgba(200, 130, 90, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 奶油底纹：两枚极淡橘色光斑，增加页面质感 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 320px at 108% -4%, rgba(232,115,74,.07), transparent 70%),
    radial-gradient(520px 300px at -6% 30%, rgba(246,169,107,.06), transparent 70%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(232,115,74,.22); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ============ 顶部 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 249, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(160, 100, 60, 0.10); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 20px; font-weight: bold;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(232, 115, 74, 0.35);
  transition: transform .3s;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark.big { width: 56px; height: 56px; font-size: 28px; }
.logo-text { font-size: 20px; font-weight: 700; letter-spacing: 1px; line-height: 1.1; }
.logo-text i { display: block; font-style: normal; font-size: 10px; color: var(--muted); letter-spacing: 3px; font-weight: 400; }

.main-nav {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 6px 13px; border-radius: 999px;
  font-size: 15px; white-space: nowrap; color: var(--muted);
  transition: all .2s;
}
.main-nav a:hover { color: var(--primary); background: var(--bg-tag); }
.main-nav a.active { color: #fff; background: var(--primary); box-shadow: 0 4px 10px rgba(232,115,74,.3); }

.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-box {
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; transition: all .2s;
}
.search-box:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(232,115,74,.12); }
.search-box input { border: none; outline: none; width: 150px; padding: 7px 6px 7px 15px; font-size: 13px; background: transparent; }
.search-box button {
  border: none; background: var(--primary); color: #fff;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-dark); }
.user-chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--muted);
  padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  transition: all .2s; white-space: nowrap;
}
.user-chip:hover { border-color: var(--primary-light); color: var(--primary); }
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============ 阅读进度条（文章页，JS 注入） ============ */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  z-index: 200; border-radius: 0 3px 3px 0;
  transition: width .1s linear; pointer-events: none;
}

/* ============ 首页 Hero ============ */
.hero {
  position: relative; overflow: hidden;
  margin: 28px 0 36px;
  padding: 48px 52px;
  border-radius: 26px;
  background: linear-gradient(120deg, #F6A96B 0%, #EE7A4B 55%, #E8734A 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-hover);
}
/* 光斑与圆环装饰 */
.hero::before {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -70px; bottom: -110px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.18);
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-date {
  display: inline-block; font-size: 13px; letter-spacing: 2px;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.32);
  padding: 5px 16px; border-radius: 999px;
}
.hero-quote { font-size: 30px; font-weight: 700; margin: 16px 0 10px; line-height: 1.45; }
.hero-sub { font-size: 15px; opacity: .92; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; }
.hero-actions .btn { min-width: 128px; text-align: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 26px; border-radius: 999px;
  border: 1px solid transparent; /* 统一占位，保证与 ghost 按钮高度一致 */
  cursor: pointer;
  font-size: 15px; transition: all .2s; line-height: 1;
}
.btn-primary { background: #fff; color: var(--primary-dark); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-ghost { background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.35); transform: translateY(-2px); }

.hero-orange { position: relative; width: 190px; height: 190px; flex-shrink: 0; z-index: 1; animation: orange-float 5s ease-in-out infinite; }
@keyframes orange-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
.orange-body {
  position: absolute; inset: 14px;
  background: radial-gradient(circle at 34% 30%, #FFCF9E, #FF9E5E 68%);
  border-radius: 52% 48% 55% 45% / 50% 55% 45% 50%;
  box-shadow: inset -12px -14px 0 rgba(255,255,255,.25), 0 16px 30px rgba(180,80,40,.25);
}
.orange-leaf {
  position: absolute; top: 6px; left: 58%;
  width: 34px; height: 22px;
  background: #4E9F5A; border-radius: 0 100% 0 100%;
  transform: rotate(18deg);
  box-shadow: 0 4px 8px rgba(60,120,60,.3);
}
.hero-dot { position: absolute; border-radius: 50%; background: rgba(255,255,255,.5); }
.hero-dot.d1 { width: 16px; height: 16px; top: 22px; left: 6px; animation: dot-pulse 3s ease-in-out infinite; }
.hero-dot.d2 { width: 10px; height: 10px; bottom: 26px; left: 26px; animation: dot-pulse 3s ease-in-out 1.2s infinite; }
.hero-dot.d3 { width: 8px; height: 8px; top: 46px; right: 0; animation: dot-pulse 3s ease-in-out 2.2s infinite; }
@keyframes dot-pulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ============ 主体布局 ============ */
.main-wrap { min-height: calc(100vh - 300px); padding-bottom: 60px; }
.page-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.page-main { min-width: 0; }

/* 区块标题（列表页/首页通用） */
.section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 4px 0 20px;
}
.section-title { font-size: 20px; font-weight: 700; letter-spacing: 1px; display: inline-flex; align-items: center; }
.section-title::before {
  content: ""; width: 5px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  margin-right: 10px; flex-shrink: 0;
}
.section-sub { font-size: 13px; color: var(--muted); }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); align-self: center; }

/* 精选大卡 */
.featured-card {
  display: grid; grid-template-columns: 46% 1fr;
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 30px;
  box-shadow: var(--shadow); transition: all .25s;
}
.featured-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.featured-cover { position: relative; min-height: 250px; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.featured-card:hover .featured-cover img { transform: scale(1.04); }
.featured-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,249,242,.95); color: var(--primary-dark);
  font-size: 13px; padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.featured-info { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.featured-title {
  font-size: 23px; line-height: 1.45; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .2s;
}
.featured-card:hover .featured-title { color: var(--primary); }
.featured-summary {
  color: var(--muted); font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 文章卡片 */
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.article-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: all .25s;
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-cover { display: block; aspect-ratio: 2.1/1; overflow: hidden; background: var(--bg-tag); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .card-cover img { transform: scale(1.05); }
.card-body { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title {
  font-size: 17px; font-weight: 700; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 标题单行显示 */
}
.card-title a { transition: color .2s; }
.article-card:hover .card-title a { color: var(--primary); }
.card-summary {
  color: var(--muted); font-size: 13.5px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 元信息行（带图标） */
.meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.meta-item.mi-time::before, .meta-item.mi-eye::before {
  content: ""; width: 13px; height: 13px; flex-shrink: 0; opacity: .75;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.meta-item.mi-time { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M8 4.8V8l2.2 1.6'/%3E%3C/svg%3E"); }
.meta-item.mi-eye { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.8 8s2.4-4.4 6.2-4.4S14.2 8 14.2 8s-2.4 4.4-6.2 4.4S1.8 8 1.8 8Z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E"); }
.cat-tag {
  color: var(--primary-dark); background: var(--bg-tag);
  padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  transition: all .2s;
}
.cat-tag:hover { background: var(--primary); color: #fff; }
.cat-tag.big { font-size: 13px; padding: 4px 14px; }

/* ============ 侧栏（滚动吸附） ============ */
.page-side {
  position: sticky; top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto; scrollbar-width: thin;
  overscroll-behavior: contain;
}
.side-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px;
}
.side-title { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.side-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  flex-shrink: 0;
}
.hot-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; }
.hot-list li + li { border-top: 1px dashed var(--line); }
.hot-rank {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 3px;
  border-radius: 6px; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-tag); color: var(--primary-dark);
}
.hot-rank.r1 { background: var(--primary); color: #fff; }
.hot-rank.r2 { background: #F0925F; color: #fff; }
.hot-rank.r3 { background: #F6AE7B; color: #fff; }
.hot-title {
  font-size: 14px; line-height: 1.6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.hot-title:hover { color: var(--primary); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-item {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: var(--bg-tag); color: var(--primary-dark);
  border-radius: 999px; padding: 4px 13px; font-size: 13px;
  transition: all .2s;
}
.tag-item em { font-style: normal; font-size: 11px; opacity: .6; }
.tag-item:hover { background: var(--primary); color: #fff; }

.about-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.about-card a { color: var(--primary); }
.side-note { font-size: 13.5px; color: var(--muted); margin: 8px 0; }
.mini-cover { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; }

/* ============ 列表页头部 ============ */
.list-head { margin: 32px 0 26px; position: relative; padding: 0 0 0 18px; }
.list-head::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}
.list-title { font-size: 28px; letter-spacing: 1px; }
.list-desc { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ============ 文章详情 ============ */
.breadcrumb { margin: 26px 0 8px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb i { font-style: normal; opacity: .5; }
.breadcrumb a:hover { color: var(--primary); }

.article-head { margin: 16px 0 26px; }
.article-title { font-size: 29px; line-height: 1.5; margin: 14px 0 16px; letter-spacing: .5px; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

.article-content {
  position: relative;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 38px 42px;
  font-size: 16.5px; line-height: 1.95;
}
/* 顶部装饰渐变线 */
.article-content::before {
  content: ""; position: absolute; top: 0; left: 42px; right: 42px; height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), transparent);
}
.article-content p { margin-bottom: 20px; text-align: justify; }
.article-content h2 {
  font-size: 19.5px; margin: 36px 0 16px; padding-left: 14px;
  border-left: 4px solid var(--primary); line-height: 1.5;
  letter-spacing: .5px;
}
.article-content blockquote {
  background: linear-gradient(135deg, #FDEFDF, #FBE7D2);
  border-left: 4px solid var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px; margin: 26px 0; color: var(--primary-dark);
  font-weight: 500; position: relative;
}
.article-content blockquote::before { content: "❝"; position: absolute; top: -14px; left: 14px; font-size: 28px; color: var(--primary-light); }
.article-content ul { margin: 0 0 20px; }
.article-content li {
  list-style: none; padding: 8px 0 8px 26px; position: relative;
}
.article-content li::before {
  content: ""; position: absolute; left: 8px; top: 19px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary-light);
}

.article-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.article-tags .tag-item { background: #fff; border: 1px solid var(--line); color: var(--muted); padding: 4px 14px; }
.article-tags .tag-item:hover { border-color: var(--primary); color: var(--primary); background: #fff; }

/* 点赞区 */
.like-bar { text-align: center; margin: 32px 0; }
.like-btn {
  border: none; cursor: pointer; border-radius: 999px;
  padding: 13px 48px; font-size: 15.5px; font-weight: 600;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; box-shadow: 0 6px 18px rgba(232,115,74,.35);
  transition: all .2s;
}
.like-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232,115,74,.45); }
.like-btn.liked { background: #F3D5C2; color: var(--primary-dark); box-shadow: none; cursor: default; transform: none; }
.like-btn.liked:hover { transform: none; }

/* 上一篇下一篇 */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.pn-card {
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 7px; transition: all .2s;
}
.pn-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pn-next { text-align: right; }
.pn-card em { font-style: normal; font-size: 12px; color: var(--primary); font-weight: 600; }
.pn-card span {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pn-disabled { visibility: hidden; }

/* 相关阅读 */
.related-box { margin: 36px 0; }
.block-title { font-size: 19px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.block-title::before {
  content: ""; width: 5px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  background: var(--card); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow); transition: all .2s;
}
.related-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.related-card img { aspect-ratio: 2.1/1; object-fit: cover; transition: transform .4s; width: 100%; }
.related-card:hover img { transform: scale(1.05); }
.related-title {
  display: block; padding: 12px 14px; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.related-card:hover .related-title { color: var(--primary); }

/* ============ 评论区 ============ */
.comment-section { margin: 34px 0 10px; }
.comment-count { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 6px; }
.comment-form {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin: 16px 0 24px;
}
.comment-hello { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.comment-hello b { color: var(--primary-dark); }
.comment-hello input {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; font-size: 13.5px; outline: none; width: 200px; margin-left: 6px;
  background: var(--cream); transition: all .2s;
}
.comment-hello input:focus { border-color: var(--primary-light); background: #fff; }
.comment-form textarea {
  width: 100%; min-height: 96px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; outline: none; font-size: 14.5px; background: var(--cream);
  transition: border .2s;
}
.comment-form textarea:focus { border-color: var(--primary-light); background: #fff; }
.comment-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 14px; }
.comment-tip { font-size: 13px; color: var(--primary); min-height: 20px; }
.comment-tip.error { color: #D9534F; }
.comment-list .comment-item {
  display: flex; gap: 13px; padding: 16px 0;
}
.comment-list .comment-item + .comment-item { border-top: 1px dashed var(--line); }
.comment-item .avatar {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.comment-item .avatar.guest { background: linear-gradient(135deg, #D9C3B5, #C0A898); }
.comment-main { flex: 1; min-width: 0; }
.comment-name { font-size: 14px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment-name time { font-size: 12px; color: var(--muted); font-weight: 400; }
.comment-text { font-size: 14.5px; color: #5A463E; margin-top: 5px; word-break: break-word; }
.comment-empty { padding: 22px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ============ 分页 ============ */
.pagination-box { margin: 32px 0 10px; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination li a, .pagination li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: 10px; background: var(--card); color: var(--muted);
  border: 1px solid var(--line); font-size: 14px; transition: all .2s;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pagination li.active span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination li.disabled span { opacity: .4; }

/* ============ 登录注册 ============ */
.auth-wrap { display: flex; justify-content: center; padding: 56px 0 30px; position: relative; }
.auth-wrap::before, .auth-wrap::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-wrap::before {
  width: 260px; height: 260px; left: 8%; top: 14%;
  background: radial-gradient(circle, rgba(246,169,107,.18), transparent 68%);
}
.auth-wrap::after {
  width: 200px; height: 200px; right: 10%; bottom: 8%;
  background: radial-gradient(circle, rgba(232,115,74,.12), transparent 68%);
}
.auth-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-hover); padding: 40px 42px 36px;
  overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
}
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .logo-mark { margin: 0 auto 12px; }
.auth-brand h1 { font-size: 22px; letter-spacing: 2px; }
.auth-brand p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--cream); border-radius: 999px; padding: 4px; margin-bottom: 24px;
}
.auth-tabs a {
  text-align: center; padding: 9px 0; border-radius: 999px;
  font-size: 14.5px; color: var(--muted); transition: all .2s;
}
.auth-tabs a.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(232,115,74,.3); }
.auth-form label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.auth-form input {
  display: block; width: 100%; margin-top: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 14.5px; outline: none; background: var(--cream);
  transition: all .2s;
}
.auth-form input:focus { border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 3px rgba(232,115,74,.1); }
.btn-block { width: 100%; background: var(--primary); color: #fff; font-weight: 600; padding: 12px; border-radius: 999px; }
.btn-block:hover { background: var(--primary-dark); transform: translateY(-1px); }
.auth-tip { min-height: 20px; font-size: 13px; color: #D9534F; text-align: center; margin-top: 10px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.auth-alt a { color: var(--primary); font-weight: 600; }

/* ============ 通用 ============ */
.empty-tip {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 56px 20px;
  text-align: center; color: var(--muted); font-size: 15px; grid-column: 1 / -1;
}

/* ============ 返回顶部（JS 注入） ============ */
#back-top {
  position: fixed; right: 28px; bottom: 34px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(232,115,74,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .3s;
}
#back-top svg { width: 18px; height: 18px; }
#back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-top:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(232,115,74,.5); }

/* ============ 页脚 ============ */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #46332B, #382721);
  color: #CBB9AE; margin-top: 40px;
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), #F3B07C);
}
.footer-inner {
  display: grid; grid-template-columns: 1.4fr auto auto; gap: 44px;
  padding: 44px 20px 36px; align-items: start;
}
.footer-badge {
  display: inline-block; font-size: 12px; letter-spacing: 1px;
  border: 1px solid rgba(246,169,107,.4); color: #F6B98B;
  padding: 3px 12px; border-radius: 999px; margin-top: 12px;
}
.footer-name { font-size: 19px; color: #fff; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 9px; }
.footer-name .logo-mark { width: 30px; height: 30px; font-size: 15px; }
.footer-slogan { font-size: 13px; opacity: .75; margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer-links a { opacity: .85; transition: all .2s; }
.footer-links a:hover { color: var(--primary-light); opacity: 1; padding-left: 3px; }
.footer-icp { text-align: right; font-size: 13px; }
.footer-icp p { margin-bottom: 8px; opacity: .8; }
.footer-icp a {
  display: inline-block; padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  transition: all .2s;
}
.footer-icp a:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-side { position: static; max-height: none; overflow: visible; }
  .hero { padding: 36px 30px; }
  .hero-orange { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-icp { text-align: left; }
  .article-content { padding: 30px 24px; }
  .article-content::before { left: 24px; right: 24px; }
}
@media (max-width: 768px) {
  /* 两行式头部：logo+搜索/用户 / 分类导航整行横向滚动 */
  .header-inner { gap: 12px; height: auto; flex-wrap: wrap; padding: 10px 0 6px; row-gap: 2px; }
  :root { --header-h: 106px; }
  .main-nav { order: 3; flex-basis: 100%; width: 100%; padding-bottom: 2px; }
  .header-right { margin-left: auto; }
  .search-box input { width: 90px; }
  .user-chip span:not(.avatar) { display: none; }
  .user-chip { padding: 4px; }
  .card-row { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-cover { min-height: 0; }
  .featured-info { padding: 20px 22px; }
  .hero { margin: 18px 0 24px; padding: 30px 24px; border-radius: 20px; }
  .hero-quote { font-size: 22px; }
  .hero-actions .btn { flex: 1; }
  .hero-actions { margin-top: 22px; }
  .article-content { padding: 24px 20px; font-size: 15.5px; line-height: 1.9; }
  .article-content::before { left: 20px; right: 20px; }
  .article-title { font-size: 22px; }
  .section-title { font-size: 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .pn-disabled { display: none; }
  .auth-card { padding: 28px 22px; }
  .auth-wrap { padding: 36px 0 24px; }
  #back-top { right: 16px; bottom: 20px; width: 40px; height: 40px; }
  .list-title { font-size: 24px; }
  .footer-inner { padding: 32px 20px 28px; gap: 20px; }
}

/* ============ 微交互：内容渐入 ============ */
@media (prefers-reduced-motion: no-preference) {
  .article-card, .featured-card, .side-card, .related-card {
    animation: fade-up .5s ease backwards;
  }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
