/* ============================================================
   发布网 - 前台首页样式（简约蓝色现代主题）
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eaf2ff;
  --primary-bg: #f6f9ff;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #94a3b8;
  --border: #e8edf5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-hover: 0 12px 28px rgba(37, 99, 235, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--text); background: transparent; line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { scroll-margin-top: 72px; }
#notices { scroll-margin-top: 72px; }

/* ========== 1、顶部导航栏 ========== */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #a8d8ff 0%, #74c0fc 55%, #4dabf7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -1px 0 rgba(255, 255, 255, .45),
    0 3px 14px rgba(77, 171, 247, .35);
}
.nav-inner { display: flex; align-items: center; height: 60px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: #0b3d6e; }
.brand-logo { height: 32px; width: auto; border-radius: 6px; }
.brand-name { letter-spacing: 1px; }
.brand-logo-text {
  width: 34px; height: 34px; border-radius: 10px; background: #fff;
  color: #228be6; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -2px 4px rgba(34, 139, 230, .25), 0 2px 5px rgba(11, 61, 110, .2);
}
.nav-search {
  flex: 0 1 220px; height: 36px; display: flex; align-items: center;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px;
  padding: 0 5px 0 14px; transition: border-color .2s, box-shadow .2s;
  box-shadow: inset 0 1px 3px rgba(11, 61, 110, .12);
}
.nav-search:focus-within { border-color: #228be6; background: #fff; box-shadow: 0 0 0 3px rgba(34, 139, 230, .18); }
.nav-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 13px; height: 100%; color: #0b3d6e; }
.nav-search input::placeholder { color: rgba(11, 61, 110, .55); }
.nav-search button {
  width: 28px; height: 28px; flex-shrink: 0; border: none; border-radius: 50%;
  background: linear-gradient(180deg, #74c0fc, #339af0); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: filter .2s;
  box-shadow: inset 0 -2px 3px rgba(11, 61, 110, .25), 0 1px 3px rgba(11, 61, 110, .25);
}
.nav-search button:hover { filter: brightness(1.05); }
.nav-links { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav-links a {
  padding: 8px 16px; border-radius: 8px; color: #0b3d6e; font-size: 14px;
  white-space: nowrap; flex-shrink: 0; transition: all .2s;
}
.nav-links a:hover { color: #0b3d6e; background: rgba(255, 255, 255, .55); }
.nav-links a.active {
  color: #0b3d6e; background: #fff; font-weight: 600;
  box-shadow: 0 2px 6px rgba(11, 61, 110, .18), inset 0 -1px 0 rgba(34, 139, 230, .2);
}
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.btn-login, .btn-reg { padding: 6px 16px; border-radius: 8px; font-size: 13px; transition: all .2s; white-space: nowrap; }
.btn-login { color: #0b3d6e; border: 1px solid rgba(11, 61, 110, .55); background: transparent; }
.btn-login:hover { background: #0b3d6e; color: #fff; }
.btn-reg {
  background: linear-gradient(180deg, #339af0, #1c7ed6); color: #fff;
  box-shadow: inset 0 -2px 3px rgba(11, 61, 110, .3), 0 2px 5px rgba(11, 61, 110, .25);
}
.btn-reg:hover { filter: brightness(1.08); }
.user-center { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 20px; transition: background .2s; }
.user-center:hover { background: rgba(255, 255, 255, .55); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .6); }
.user-name { font-size: 13px; color: #0b3d6e; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-admin {
  padding: 7px 14px; border: 1px solid rgba(11, 61, 110, .5); color: #0b3d6e;
  border-radius: 8px; font-size: 13px; transition: all .2s; white-space: nowrap;
}
.nav-admin:hover { background: #0b3d6e; color: #fff; border-color: #0b3d6e; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: #0b3d6e; border-radius: 2px; transition: all .25s; }

/* ========== 全局固定底层背景（二次元男生，整图完整展示，固定在视口底部居中，半透明不遮挡，不拦截点击） ========== */
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: min(100vw, 1200px);
  aspect-ratio: 3 / 4;   /* 与图片 3:4 比例一致，整图完整展示、等比例不变形 */
  background: url('/images/boy.png') no-repeat center bottom;
  background-size: 100% auto;
  mix-blend-mode: multiply;   /* 图片白底自动透明，只透出人物线条，不产生灰色方块 */
  opacity: 0.6;               /* 淡显但清晰可辨（原图近纯白，0.2 透明度完全不可见） */
  pointer-events: none;
  z-index: 0;
}

/* 移动端：图片按高度放大至人物铺满整屏（人物占画面下部56%，高度179%即人物满屏），超出部分自动裁切 */
@media (max-width: 767px) {
  body::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    margin: 0;
    aspect-ratio: auto;
    background-size: auto 179%;
    background-position: center bottom;
  }
}

/* ========== 2、滚动文字公告 ========== */
.notice-bar { background: var(--primary-light); border-bottom: 1px solid var(--border); }
.notice-inner { display: flex; align-items: center; height: 40px; gap: 12px; overflow: hidden; }
.notice-tag {
  flex-shrink: 0; background: var(--primary); color: #fff; font-size: 12px;
  padding: 2px 10px; border-radius: 6px;
}
.notice-marquee { flex: 1; overflow: hidden; }
.notice-track {
  display: inline-flex; white-space: nowrap; will-change: transform;
  animation: noticeMove 26s linear infinite;
}
.notice-bar:hover .notice-track { animation-play-state: paused; }
.notice-item { color: var(--text); font-size: 13px; font-weight: 600; margin-right: 48px; transition: color .2s; }
.notice-item:hover { color: var(--primary); }
@keyframes noticeMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ========== 3、大图轮播 ========== */
.hero { padding: 24px 0 6px; }
.hero-inner { position: relative; }
.hero-slider {
  position: relative; overflow: hidden; border-radius: var(--radius);
  height: clamp(240px, 30vw, 400px); background: var(--primary-light);
  box-shadow: var(--shadow);
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease;
  background-size: cover; background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-link { display: block; width: 100%; height: 100%; position: relative; }
.hero-caption {
  position: absolute; left: 28px; bottom: 22px; background: rgba(15, 23, 42, .55);
  color: #fff; font-size: 16px; padding: 8px 16px; border-radius: 8px; max-width: 70%;
}
.hero-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--text);
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 5; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.hero-btn:hover { background: var(--primary); color: #fff; }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); cursor: pointer; transition: all .25s; }
.hero-dot.active { width: 22px; border-radius: 5px; background: #fff; }
.hero-default {
  height: clamp(220px, 28vw, 360px); border-radius: var(--radius);
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center; padding: 20px;
}
.hero-default h1 { font-size: clamp(24px, 4vw, 38px); margin-bottom: 10px; letter-spacing: 2px; }
.hero-default p { color: rgba(255, 255, 255, .85); font-size: 14px; }

/* ========== 4、广告横幅 ========== */
.ad-banner { padding: 28px 0 6px; }
.ad-banner-link { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-height: 130px; }
.ad-banner-link img { width: 100%; height: 130px; object-fit: cover; transition: transform .4s; }
.ad-banner-link:hover img { transform: scale(1.02); }
.ad-banner-code { margin-top: 10px; text-align: center; color: var(--primary); font-weight: 700; }

/* ========== 5+6、内容区（左侧卡片 + 右侧榜单） ========== */
.content-row { display: flex; gap: 24px; padding: 28px 0 6px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-title {
  font-size: 18px; font-weight: 700; position: relative; padding-left: 12px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 2px; background: var(--primary);
}
.section-more { color: var(--muted); font-size: 13px; }
.section-more b { color: var(--primary); }

/* 分类标签 */
.cate-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cate-tab {
  padding: 6px 14px; font-size: 13px; border: 1px solid #a5c8fa; background: #fff;
  color: var(--text-2); border-radius: 20px; cursor: pointer; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.cate-tab:hover { color: var(--primary); border-color: var(--primary); }
.cate-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cate-icon { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; vertical-align: -3px; margin-right: 4px; }
.cate-tab.active .cate-icon { opacity: .9; }

/* 帖子分类筛选 */
.topic-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.topic-tab {
  padding: 6px 14px; font-size: 13px; border: 1px solid #a5c8fa; background: #fff;
  color: var(--text-2); border-radius: 20px; cursor: pointer; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.topic-tab:hover { color: var(--primary); border-color: var(--primary); }
.topic-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 站点卡片 */
.cate-group { margin-bottom: 26px; }
.cate-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cate-title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.site-card {
  display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid #a5c8fa;
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(59, 130, 246, .20),
    0 3px 8px rgba(96, 165, 250, .28);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.site-card:hover {
  transform: translateY(-4px); border-color: #7db4f7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(59, 130, 246, .20),
    0 10px 24px rgba(96, 165, 250, .35);
}
.site-logo { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--primary-light); display: flex; align-items: center; justify-content: center; }
.site-logo img { width: 100%; height: 100%; object-fit: cover; }
.site-logo-text { font-size: 20px; font-weight: 700; color: var(--primary); }
.site-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.site-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-desc {
  font-size: 12px; color: #000; font-weight: 700; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.site-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.site-tags { display: flex; gap: 4px; flex-wrap: wrap; overflow: hidden; }
.site-tag {
  font-size: 11px; color: var(--primary); background: var(--primary-light);
  padding: 1px 7px; border-radius: 5px;
}
.site-clicks { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* 侧边卡片 */
.side-card {
  background: transparent; padding: 16px; transition: transform .25s;
}
.side-card:hover { transform: translateY(-3px); }
.side-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; padding-left: 10px; position: relative; }
.side-title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; border-radius: 2px; background: var(--primary);
}
.side-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 12px 0; }

.notice-list { list-style: none; }
.notice-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.notice-list li:last-child { border-bottom: none; }
.notice-list li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.notice-title { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.notice-title:hover { color: var(--primary); }
.notice-time { color: var(--muted); font-size: 12px; flex-shrink: 0; background: var(--primary-bg); padding: 1px 8px; border-radius: 5px; }

/* ========== 7、站内最新帖子 ========== */
.latest-topics { padding-top: 8px; }
.topic-list { background: transparent; overflow: hidden; }
.topic-item {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 13px 18px; border-bottom: 1px solid #a5c8fa; transition: background .2s;
}
.topic-item:last-child { border-bottom: none; }
.topic-item:hover { background: var(--primary-bg); }
.topic-main { flex: 1; min-width: 0; }
.topic-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-badges { display: none; }
.topic-desc {
  font-size: 12px; color: #6b7280; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-item:hover .topic-title { color: var(--primary); }
.flag { display: inline-block; font-size: 11px; font-style: normal; padding: 1px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.flag-top { background: var(--primary); color: #fff; }
.flag-essence { background: #fff7e8; color: #f59e0b; border: 1px solid #fcd9a8; }
.topic-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.topic-meta .flag { margin-right: 0; vertical-align: 0; }
.topic-board { color: var(--primary); background: var(--primary-light); padding: 1px 8px; border-radius: 5px; margin-left: -0.5em; }
.topic-stat b { color: var(--text-2); }
.topic-time { color: var(--muted); }

/* ========== 8、友情链接 ========== */
.friend-links { padding: 32px 0 6px; }
.links-wrap { display: flex; flex-wrap: wrap; gap: 10px; background: transparent; padding: 18px 20px; }
.link-item {
  font-size: 13px; color: var(--text-2); padding: 5px 14px; border: 1px solid #a5c8fa;
  border-radius: 8px; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.link-item:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }

/* ========== 9、页脚 ========== */
.site-footer {
  margin-top: 52px; background: #0f172a; color: #cbd5e1; padding: 36px 0 30px; text-align: center;
}
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: 1px; }
.footer-copy { font-size: 13px; color: #94a3b8; }
.footer-info { font-size: 13px; color: #94a3b8; margin-top: 6px; }
.footer-info b { color: #60a5fa; }
.footer-icp { color: #94a3b8; margin-left: 10px; }
.footer-icp:hover { color: #fff; }

/* 空状态 */
.empty-box {
  text-align: center; padding: 40px 0; color: var(--muted);
  background: transparent;
}
.empty-link {
  display: inline-block; margin-top: 12px; color: var(--primary); font-size: 13px;
  border: 1px solid #a5c8fa; padding: 6px 16px; border-radius: 8px; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.empty-link:hover { background: var(--primary); color: #fff; }

/* ========== 搜索结果页 ========== */
.search-page { padding-top: 26px; padding-bottom: 20px; min-height: 60vh; }
.search-head { margin-bottom: 22px; }
.search-summary { color: var(--muted); font-size: 13px; margin-top: 8px; }
.search-summary b { color: var(--primary); }
.search-block { margin-bottom: 34px; }
.search-block-title {
  font-size: 15px; font-weight: 600; margin-bottom: 14px; padding-left: 10px; position: relative;
}
.search-block-title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; border-radius: 2px; background: var(--primary);
}

/* ========== 详情页（帖子/公告） ========== */
.detail-page { padding: 24px 0 8px; min-height: 60vh; }
.detail-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.detail-crumb a { color: var(--muted); transition: color .2s; }
.detail-crumb a:hover { color: var(--primary); }
.detail-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 28px; margin-bottom: 20px;
}
.detail-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.detail-title { font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--text); }
.detail-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 12px; color: var(--muted); font-size: 13px;
}
.detail-meta b { color: var(--primary); }
.detail-content { padding-top: 18px; font-size: 15px; line-height: 1.9; color: var(--text); word-break: break-word; }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 10px 0; display: inline-block; vertical-align: middle; cursor: zoom-in; }
.detail-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; font-size: 13px;
  color: var(--text-2); background: #fff; border: 1px solid #a5c8fa; border-radius: 20px; cursor: pointer; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.action-btn:hover { color: var(--primary); border-color: var(--primary); }
.action-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.action-btn.active .action-icon { color: #fff; }
.action-icon { font-style: normal; }
.action-count { font-weight: 600; }
.action-report:hover { color: #d92b1c; border-color: #d92b1c; }

/* 举报弹窗 */
.report-mask {
  position: fixed; inset: 0; z-index: 9998; display: flex;
  align-items: center; justify-content: center; background: rgba(0, 0, 0, .45);
}
.report-box {
  width: 420px; max-width: 92vw; background: #fff; border-radius: 14px;
  padding: 22px 24px; box-shadow: var(--shadow-hover);
}
.report-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.report-reason {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 14px; line-height: 1.6;
  border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text);
  background: var(--primary-bg); resize: vertical; min-height: 96px;
}
.report-reason:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff; }
.report-tip { min-height: 20px; font-size: 12px; color: #d92b1c; margin-top: 6px; }
.report-msg { min-height: 20px; font-size: 13px; color: #d92b1c; margin-top: 6px; }
.report-msg.success { color: #16a34a; }
.report-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.report-cancel, .report-submit {
  padding: 7px 18px; font-size: 13px; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.report-cancel { color: var(--muted); background: #fff; border: 1px solid var(--border); }
.report-cancel:hover { color: var(--primary); border-color: var(--primary); }
.report-submit { color: #fff; background: var(--primary); border: 1px solid var(--primary); }
.report-submit:disabled { opacity: .6; cursor: not-allowed; }

/* 图片点击放大（灯箱） */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: lightboxIn .2s ease;
}
.lightbox img {
  max-width: 90%; max-height: 90%; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
@keyframes lightboxIn { from { opacity: 0; } to { opacity: 1; } }
.flag-lou { background: var(--primary-light); color: var(--primary); margin-left: 6px; }

/* 回复列表 */
.detail-reply-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.detail-reply-title { font-size: 16px; font-weight: 700; position: relative; padding-left: 12px; }
.detail-reply-title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 2px; background: var(--primary);
}
.detail-reply-count { font-size: 13px; color: var(--muted); }
.reply-list { margin-top: 4px; }
.reply-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--border); }
.reply-item:last-child { border-bottom: none; }
.reply-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 16px; font-weight: 700;
}
.reply-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reply-body { flex: 1; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.reply-author { font-size: 14px; font-weight: 600; color: var(--text); }
.reply-floor { font-size: 12px; color: var(--primary); background: var(--primary-light); padding: 0 8px; border-radius: 5px; }
.reply-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.reply-content { font-size: 14px; line-height: 1.8; color: var(--text-2); word-break: break-word; }
.reply-ops { margin-top: 8px; }
.reply-like-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: 12px;
  color: var(--muted); background: #fff; border: 1px solid #a5c8fa; border-radius: 12px; cursor: pointer; transition: all .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25);
}
.reply-like-btn:hover { color: var(--primary); border-color: var(--primary); }
.reply-like-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); }

@media (max-width: 576px) {
  .detail-card { padding: 18px 16px; }
  .detail-title { font-size: 18px; }
  .detail-meta { gap: 10px; }
  .reply-item { gap: 10px; }
  .reply-time { display: none; }
}

/* ========== 发表回复表单 ========== */
.nav-logout { font-size: 13px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; transition: all .2s; white-space: nowrap; }
.nav-logout:hover { color: var(--primary); border-color: var(--primary); }
.reply-form { padding-top: 14px; }
.reply-textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; font-size: 14px; line-height: 1.7;
  border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none;
  color: var(--text); background: var(--primary-bg); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.reply-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff; }
.reply-img-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.reply-img-item { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.reply-img-item img { width: 100%; height: 100%; object-fit: cover; }
.reply-img-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(15, 23, 42, .6); color: #fff; border: none; cursor: pointer;
  font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.reply-img-del:hover { background: var(--primary); }
.reply-tools { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.reply-upload {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; font-size: 13px;
  color: var(--primary); border: 1px dashed var(--primary); border-radius: 8px; cursor: pointer;
  background: var(--primary-light); transition: all .2s;
}
.reply-upload:hover { background: var(--primary); color: #fff; }
.reply-tip { font-size: 12px; color: var(--muted); }
.reply-submit {
  margin-left: auto; padding: 8px 28px; font-size: 14px; font-weight: 600;
  background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer;
  transition: background .2s;
}
.reply-submit:hover { background: var(--primary-dark); }
.reply-submit:disabled { opacity: .6; cursor: not-allowed; }
.reply-msg { margin-top: 10px; font-size: 13px; color: var(--primary); min-height: 0; }
.reply-msg.error { color: #d92b1c; }
.reply-login-tip {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 26px 0 8px; color: var(--muted); font-size: 14px;
}
.reply-login-btn {
  padding: 7px 20px; font-size: 13px; color: #fff; background: var(--primary);
  border-radius: 8px; transition: background .2s;
}
.reply-login-btn:hover { background: var(--primary-dark); }
.reply-img { max-width: 100%; max-height: 320px; border-radius: 8px; margin-top: 8px; display: block; }

/* ========== 发帖页 ========== */
.post-page { max-width: 900px; }
.post-entry { display: flex; justify-content: center; margin-top: 22px; }
.post-entry .btn-reg { padding: 9px 34px; font-size: 14px; }
.post-form { padding-top: 18px; }
.post-field { margin-bottom: 18px; }
.post-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.post-label i { color: #d92b1c; font-style: normal; }
.post-input, .post-select {
  width: 100%; height: 40px; padding: 0 14px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text);
  background: var(--primary-bg); transition: border-color .2s, box-shadow .2s;
}
.post-input:focus, .post-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff; }
.post-textarea { width: 100%; height: auto; min-height: 120px; padding-top: 10px; padding-bottom: 10px; resize: vertical; }
.post-select { width: 260px; padding-right: 30px; }
.post-tip { font-size: 12px; color: var(--muted); margin-top: 8px; }
.post-msg { min-height: 22px; font-size: 13px; margin-bottom: 8px; }
.post-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.post-actions .btn-login { border: 1px solid #a5c8fa; color: var(--muted); background: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(59, 130, 246, .18), 0 2px 6px rgba(96, 165, 250, .25); }
.post-actions .btn-login:hover { color: var(--primary); border-color: var(--primary); }

/* 富文本编辑器容器（发帖页） */
.editor-box { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.editor-box .w-e-toolbar { border-bottom: 1px solid var(--border); }
.editor-box .w-e-text { padding: 8px 12px; min-height: 280px; }
.editor-box .w-e-text img { max-width: 100%; cursor: zoom-in; }

/* ========== 登录页 ========== */
.auth-page { display: flex; justify-content: center; padding: 60px 20px 80px; min-height: 62vh; }
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 32px 28px;
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-title { font-size: 22px; font-weight: 700; color: var(--text); }
.auth-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.auth-field input {
  width: 100%; height: 40px; padding: 0 14px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text);
  background: var(--primary-bg); transition: border-color .2s, box-shadow .2s;
}
.auth-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff; }
.auth-msg { min-height: 20px; font-size: 13px; color: #d92b1c; margin-bottom: 8px; text-align: center; }
.auth-btn {
  width: 100%; height: 42px; font-size: 15px; font-weight: 600; color: #fff;
  background: var(--primary); border: none; border-radius: 8px; cursor: pointer; transition: background .2s;
}
.auth-btn:hover { background: var(--primary-dark); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--primary); margin-left: 4px; }
.auth-switch a:hover { text-decoration: underline; }

/* ========== 个人中心 ========== */
.user-page { max-width: 820px; }
.user-card {
  display: flex; align-items: center; gap: 24px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 32px; margin-bottom: 20px;
}
.user-avatar-lg {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 34px; font-weight: 700; border: 2px solid var(--primary-light);
}
.user-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar-upload { position: relative; cursor: pointer; }
.user-avatar-upload .avatar-edit-mask {
  position: absolute; inset: 0; border-radius: 50%; background: rgba(15, 23, 42, .5);
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.user-avatar-upload:hover .avatar-edit-mask { opacity: 1; }
.user-info { flex: 1; min-width: 0; }
.user-name-lg { font-size: 22px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-level {
  display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 500;
  color: var(--primary); background: var(--primary-bg); border-radius: 12px;
}
.user-account { font-size: 13px; color: var(--muted); margin-top: 4px; }
.user-stats { display: flex; gap: 36px; margin-top: 16px; }
.user-stat { display: flex; align-items: baseline; gap: 6px; }
.user-stat b { font-size: 20px; color: var(--primary); }
.user-stat span { font-size: 12px; color: var(--muted); }
.user-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.user-sign-btn { padding: 7px 18px; font-size: 13px; cursor: pointer; }
.user-sign-btn:disabled { opacity: .55; cursor: not-allowed; }
.user-logout {
  display: inline-block; padding: 7px 18px; font-size: 13px;
  color: var(--muted); border: 1px solid var(--border); border-radius: 8px; transition: all .2s;
}
.user-logout:hover { color: var(--primary); border-color: var(--primary); }
.user-notice-list { list-style: none; margin-top: 4px; }
.user-notice-item { padding: 12px 0; border-bottom: 1px dashed var(--border); cursor: pointer; }
.user-notice-item:last-child { border-bottom: none; }
.user-notice-title { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-notice-type {
  display: inline-block; padding: 1px 8px; font-size: 11px; font-weight: 500;
  color: var(--primary); background: var(--primary-bg); border-radius: 10px; flex-shrink: 0;
}
.user-notice-content { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.7; word-break: break-word; }
.user-notice-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pm-send { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.pm-send-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.pm-send-row { margin-bottom: 10px; }
.pm-send-receiver { height: 38px; max-width: 320px; }
.pm-send-content { width: 100%; box-sizing: border-box; resize: vertical; padding: 10px 12px; }
.pm-send-msg { min-height: 20px; font-size: 13px; color: #d92b1c; margin-bottom: 6px; }
.pm-send-btn { cursor: pointer; }
.pm-send-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 系统通知小弹窗（居中，手动确定关闭） */
.notice-mask {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s;
}
.notice-mask.show { opacity: 1; }
.notice-toast {
  width: 360px; max-width: 92vw; box-sizing: border-box;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-hover);
  padding: 22px 24px; transform: scale(.94); transition: transform .25s;
}
.notice-mask.show .notice-toast { transform: scale(1); }
.notice-toast-head { display: flex; align-items: center; gap: 8px; }
.notice-toast-type {
  display: inline-block; padding: 1px 8px; font-size: 11px; font-weight: 500; flex-shrink: 0;
  color: var(--primary); background: var(--primary-bg); border-radius: 10px;
}
.notice-toast-title { flex: 1; font-size: 15px; font-weight: 700; color: #165dff; text-align: center; transform: translateX(-2em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-toast-body { font-size: 14px; color: var(--text-2); margin-top: 12px; line-height: 1.7; word-break: break-word; max-height: 40vh; overflow: auto; }
.notice-toast-time { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: right; }
.notice-toast-actions { text-align: center; margin-top: 18px; }
.notice-toast-ok {
  padding: 8px 40px; font-size: 14px; color: #fff;
  background: var(--primary); border: 1px solid var(--primary); border-radius: 8px;
  cursor: pointer; transition: all .2s;
}
.notice-toast-ok:hover { opacity: .9; }
.user-meta-list { list-style: none; margin-top: 4px; }
.user-meta-list li { display: flex; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.user-meta-list li:last-child { border-bottom: none; }
.user-meta-label { width: 110px; flex-shrink: 0; color: var(--muted); }
.user-meta-val { color: var(--text-2); word-break: break-all; }

@media (max-width: 576px) {
  .user-card { flex-direction: column; text-align: center; padding: 24px 18px; }
  .user-stats { justify-content: center; }
  .user-meta-label { width: 84px; }
}

/* 维护页 */
.maintenance { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--primary-bg); }
.maintenance-box { text-align: center; background: #fff; padding: 48px 60px; border-radius: var(--radius); box-shadow: var(--shadow); }
.maintenance-icon { font-size: 44px; margin-bottom: 12px; }
.maintenance-box h1 { color: var(--primary); margin-bottom: 10px; }
.maintenance-box p { color: var(--text-2); }

/* ========== 响应式 ========== */
/* 中等宽度（宽屏/平板横屏）：压缩间距与搜索框，保证导航菜单完整平铺不挤压 */
@media (max-width: 1100px) {
  .nav-inner { gap: 16px; }
  .nav-search { flex-basis: 220px; }
  .nav-links a { padding: 8px 12px; }
  .nav-right { gap: 10px; }
  .btn-login, .btn-reg { padding: 6px 12px; }
}

@media (max-width: 992px) {
  .content-row { flex-direction: column; }
  .side-col { width: 100%; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .topic-meta { gap: 10px; }
}

/* 宽屏保护：769px 以上导航菜单始终平铺，汉堡菜单不显示 */
@media (min-width: 769px) {
  .nav-links { position: static; display: flex; }
  .nav-toggle { display: none; }
}

/* 手机端：汉堡菜单收起导航 */
@media (max-width: 768px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 10px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: linear-gradient(180deg, #a8d8ff, #74c0fc);
    flex-direction: column; padding: 8px 16px 12px;
    box-shadow: 0 8px 16px rgba(34, 139, 230, .2); display: none; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .nav-search { order: 3; flex-basis: 100%; }
  .nav-toggle { display: flex; }
  .nav-right { margin-left: auto; gap: 10px; }
  .nav-admin { display: none; }
}

@media (max-width: 576px) {
  .container { padding: 0 14px; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .site-card { flex-direction: column; align-items: center; text-align: center; padding: 12px; }
  .site-logo { width: 44px; height: 44px; }
  .site-foot { flex-direction: column; gap: 4px; }
  .topic-item { align-items: flex-end; gap: 8px; padding: 11px 8px; }
  .topic-main { min-width: 28%; }
  .topic-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
  .topic-badges .flag { margin-right: 0; }
  .topic-meta .flag, .topic-meta .topic-board { display: none; }
  .topic-meta { max-width: 68%; justify-content: flex-end; flex-wrap: wrap; row-gap: 3px; gap: 8px; }
  .section-title { font-size: 16px; }
  .hero-caption { left: 16px; bottom: 16px; font-size: 13px; }
  .nav-admin { display: none; }
  .user-name { display: none; }
  .btn-login, .btn-reg { padding: 5px 12px; font-size: 12px; }
  .search-block-title, .section-title { font-size: 15px; }
  .ad-banner-link { max-height: 90px; }
  .ad-banner-link img { height: 90px; }
}
