﻿/* ===== 基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  background: #f0f0f0;
  color: #333;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: #333; }
a:hover { color: #333; }
.ico { width: 18px; height: 18px; vertical-align: middle; fill: currentColor; flex-shrink: 0; }
.ico-lg { width: 26px; height: 26px; }
.ico-xl { width: 30px; height: 30px; }

/* ===== 顶部红色导航栏 ===== */
.top-nav {
  background: #c62828;
  height: 48px;
  line-height: 48px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.top-nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.top-nav-left {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.top-nav-left::-webkit-scrollbar { display: none; }
.top-nav-left .dragon-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  opacity: 0.9;
}
.top-nav-left a {
  color: #fff;
  padding: 0 18px;
  font-size: 16px;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}
/* 非选中态：导航栏 hover/click/focus/visited/active 颜色/背景/下划线/描边全部不变 */
.top-nav-left a:hover,
.top-nav-left a:visited,
.top-nav-left a:focus,
.top-nav-left a:active {
  background: transparent;
  color: #fff;
  text-decoration: none;
  outline: none;
}
/* 当前页选中态：红底白字上的白色块 + 红色字（参考虎扑导航） */
.top-nav-left a.active,
.top-nav-left a.active:hover,
.top-nav-left a.active:focus,
.top-nav-left a.active:active {
  background: #fff;
  color: #c62828;
  text-decoration: none;
  outline: none;
}
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.top-nav-right a {
  color: #fff;
  font-size: 16px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  line-height: 1;
}
.top-nav-right a:hover { text-decoration: underline; color: #fff; }
.top-nav-right .username { font-weight: bold; }

/* 「板块」悬停下拉 */
.nav-boards-trigger { display: inline-flex; align-items: center; cursor: pointer; }
.nav-boards-panel {
  position: absolute;
  z-index: 1100;
  min-width: 0;
  background: #fff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  padding: 6px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-boards-panel.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nbp-list { display: flex; flex-direction: column; }
.nbp-item {
  display: block;
  padding: 0 12px;
  font-size: 15px;
  line-height: 36px;
  color: #333;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.nbp-item:hover { background: #fdecec; color: #c62828; }
/* 面板挂在 .top-nav 下，会吃到「导航白字」和「暗黑全局 a 色」规则；
   提高特异性压回，保证任何主题下面板都是白底深字、hover 浅红底论坛红 */
.nav-boards-panel a.nbp-item { color: #333; }
.nav-boards-panel a.nbp-item:hover { background: #fdecec; color: #c62828; }

/* 右上角用户头像悬停菜单 */
.nav-user-wrap { position: relative; display: inline-flex; align-items: center; height: 100%; }
.nav-user-wrap .nav-user-link { padding: 0 10px; height: 100%; }
.nav-user-menu {
  position: absolute; top: 100%; right: 0; z-index: 1100;
  min-width: 132px; background: #fff; border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18); padding: 6px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-user-wrap:hover .nav-user-menu,
.nav-user-wrap:focus-within .nav-user-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-user-menu a {
  display: block; height: auto; padding: 0 12px; line-height: 36px;
  font-size: 15px; color: #333 !important; border-radius: 4px;
  white-space: nowrap; text-decoration: none;
}
.nav-user-menu a:hover { background: #fdecec; color: #c62828 !important; text-decoration: none; }
[data-theme="dark"] .nav-user-menu { background: var(--d-surface, #1f1f1f); box-shadow: 0 8px 20px rgba(0,0,0,.5); }
[data-theme="dark"] .nav-user-menu a { color: var(--d-text, #e6e6e6) !important; }
[data-theme="dark"] .nav-user-menu a:hover { background: var(--d-redbg); color: var(--d-red, #ef6b6b) !important; }

/* ===== Logo + 搜索区域 ===== */
.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logo-main {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-img {
  height: 80px;
  width: auto;
  display: block;
}
.logo-url {
  font-size: 28px;
  color: #c62828;
  font-weight: bold;
  letter-spacing: 2px;
}
.logo-text h1 {
  font-size: 38px;
  color: #c62828;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.2;
}
.logo-text p {
  font-size: 15px;
  color: #888;
  margin-top: 6px;
}
.search-area {
  display: flex;
  align-items: center;
  gap: 0;
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  width: 360px;
  max-width: 100%;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 18px;
  font-size: 15px;
  background: transparent;
}
.search-box button {
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
}
.search-box button:hover { color: #c62828; }

/* ===== 主内容区 ===== */
.main {
  width: 100%;
  max-width: 1300px;
  margin: 8px auto 16px auto;
  padding: 0 16px;
  flex: 1 0 auto;
}
.article-page,
.trade-page {
  flex: 1 0 auto;
}

/* ===== 统计栏 + 发新帖 ===== */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 4px 0;
  margin: 0 0 6px 0;
}
.stats-info {
  font-size: 14px;
  color: #666;
}
.stats-info span {
  margin-right: 16px;
}
.stats-info strong {
  color: #333;
  font-weight: bold;
}
.btn-newpost {
  background: linear-gradient(to bottom, #c62828, #b71c1c);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-newpost:hover {
  background: linear-gradient(to bottom, #d32f2f, #c62828);
  color: #fff;
}

/* ===== 三列最新帖子 ===== */
.latest-section {
  background: #fff;
  border-radius: 6px;
  padding: 20px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}
.latest-col h3 {
  font-size: 18px;
  color: #333;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}
.latest-col.essence h3 {
  color: #333;
}
.latest-col ul {
  list-style: none;
}
.latest-col li {
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.latest-col li:last-child {
  border-bottom: none;
}
.latest-col li .thread-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
}
.latest-col li .thread-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 280px;
}
.latest-col li .thread-title:hover {
  color: #c62828;
}
.latest-col li .doc-ico {
  width: 16px;
  height: 16px;
  fill: #bbb;
  flex-shrink: 0;
}
.latest-col.essence li .doc-ico {
  fill: #c62828;
}
.latest-col li .thread-date {
  font-size: 14px;
  color: #999;
  flex-shrink: 0;
}

/* ===== 在线人数条 ===== */
.online-bar {
  background: #fff;
  border-radius: 6px;
  padding: 12px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #666;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}
.online-bar .online-tag {
  background: #c62828;
  color: #fff;
  padding: 4px 14px;
  border-radius: 3px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.online-bar .online-tag .ico { fill: #fff; }
.online-bar strong { color: #c62828; }
.online-bar .online-users {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.online-bar .online-user {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #666;
}
.online-bar .online-user .avatar {
  width: 22px;
  height: 22px;
  background: #c62828;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ===== 板块分组 ===== */
.forum-section {
  background: #fff;
  border-radius: 6px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}
.section-header {
  background: linear-gradient(to bottom, #fafafa, #f5f5f5);
  padding: 14px 20px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.section-header h2 {
  font-size: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header h2 .ico { fill: #888; width: 20px; height: 20px; }
.section-toggle {
  color: #999;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  width: 24px;
  text-align: center;
  transition: transform 0.2s;
}
.section-toggle.collapsed {
  transform: rotate(-90deg);
}
.section-body {
  padding: 10px 20px 20px;
}
.section-body.collapsed {
  display: none;
}
.forum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.forum-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.forum-item:nth-child(odd) {
  border-right: 1px solid #f5f5f5;
}
.forum-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f5f5f5;
}
.forum-icon .ico-xl { fill: #999; }

.forum-info {
  flex: 1;
  min-width: 0;
}
.forum-info h4 {
  font-size: 18px;
  color: #333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.forum-info h4 a {
  color: #333;
}
.forum-info h4 a:hover {
  color: #333;
}
.forum-info h4 .today-count {
  font-size: 14px;
  color: #c62828;
  font-weight: bold;
}
.forum-info .forum-meta,
.forum-info .forum-last-post {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 2px;
}
.forum-info p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 6px;
}
.forum-info .moderator {
  font-size: 13px;
  color: #aaa;
}
.forum-info .moderator span {
  color: #c62828;
}

/* ===== 底部 ===== */
.footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 16px 20px;
  color: #999;
  font-size: 12px;
  line-height: 1.6;
  margin-top: auto;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-left {
  color: #999;
}
.footer-right {
  color: #999;
}
.footer a {
  color: #999;
  margin: 0 6px;
}
.footer a:hover {
  color: #c62828;
}
.footer .copyright {
  margin-top: 8px;
}

/* ===== 响应式 ===== */
@media (max-width: 1000px) {
  .latest-grid { grid-template-columns: 1fr; }
  .forum-grid { grid-template-columns: 1fr; }
  .forum-item:nth-child(odd) { border-right: none; }
}
@media (max-width: 768px) {
  .top-nav-left a { padding: 0 12px; font-size: 15px; }
  .logo-text h1 { font-size: 30px; }
  .stats-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}

/* ===== 以下为其他页面样式 ===== */

/* 面包屑 */
.breadcrumb { font-size: 14px; color: #888; margin-bottom: 12px; }
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: #c62828; }
.breadcrumb span { margin: 0 6px; }

/* 通用卡片 */
.card { background: #fff; border-radius: 6px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 16px; }
.card-title { font-size: 18px; font-weight: bold; color: #333; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid #eee; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 20px; border-radius: 4px; font-size: 15px; cursor: pointer; border: none; text-align: center; }
.btn-primary { background: linear-gradient(to bottom, #c62828, #b71c1c); color: #fff; }
.btn-primary:hover { background: linear-gradient(to bottom, #d32f2f, #c62828); color: #fff; }
.btn-default { background: #f5f5f5; color: #666; border: 1px solid #ddd; }
.btn-default:hover { background: #e8e8e8; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-danger { background: #e53935; color: #fff; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 15px; color: #555; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #c62828; }
.form-group textarea { min-height: 200px; resize: vertical; font-family: inherit; }

/* 登录注册页 */
.auth-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { background: #fff; border-radius: 8px; padding: 32px; width: 100%; max-width: 420px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.auth-box h2 { text-align: center; color: #c62828; margin-bottom: 24px; font-size: 24px; }
.auth-box .btn { width: 100%; padding: 12px; font-size: 16px; }
.auth-box .auth-link { text-align: center; margin-top: 16px; font-size: 14px; color: #888; }
.auth-box .auth-link a { color: #c62828; }

/* 帖子列表 */
.thread-list { }
.thread-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 14px; }
.thread-item:last-child { border-bottom: none; }
.thread-item .thread-author { width: 48px; height: 48px; background: #fff url('/images/default_avatar.png') center/cover; color: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.thread-item .thread-author img { width: 100%; height: 100%; object-fit: cover; }
.thread-item .thread-main { flex: 1; min-width: 0; }
.thread-item .thread-title { font-size: 17px; color: #333; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .thread-title a { color: #333; }
.thread-item .thread-title a:hover { color: #c62828; }
.thread-item .thread-title .tag { display: inline-block; padding: 1px 6px; font-size: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.thread-item .thread-title .tag.top { background: #c62828; color: #fff; }
.thread-item .thread-title .tag.digest { background: #ff9800; color: #fff; }
.thread-item .thread-title .tag.locked { background: #999; color: #fff; }
.thread-item .thread-meta { font-size: 13px; color: #999; }
.thread-item .thread-meta span { margin-right: 12px; }
.thread-item .thread-stats { text-align: right; flex-shrink: 0; font-size: 13px; color: #888; }
.thread-item .thread-stats .replies { font-size: 18px; font-weight: bold; color: #c62828; }

/* 壹原始风格帖子列表 */
.thread-item-ys { padding: 14px 0; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 14px; }
.thread-item-ys:last-child { border-bottom: none; }
.thread-item-ys .thread-avatar-ys { width: 44px; height: 44px; background: #fff url('/images/default_avatar.png') center/cover; color: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; font-weight: bold; overflow: hidden; }
.thread-item-ys .thread-avatar-ys img { width: 100%; height: 100%; object-fit: cover; }
.thread-item-ys .thread-content-ys { flex: 1; min-width: 0; }
.thread-item-ys .thread-title-ys { font-size: 17px; color: #333; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.thread-item-ys .thread-title-ys a { color: #333; }
.thread-item-ys .thread-title-ys a:hover { color: #c62828; }
/* 置顶帖标题自动红色 */
.thread-item-ys.is-top .thread-title-ys > a { color: #c62828; }
.thread-item-ys.is-top .thread-title-ys > a:hover { color: #a81f1f; }
/* 最后一个置顶帖与普通帖之间的细微分割线（比常规分隔线略深一点） */
.thread-item-ys.top-divider { border-bottom: 1px solid #d9d9d9; }
.thread-item-ys .thread-title-ys .tag { display: inline-block; padding: 1px 6px; font-size: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.thread-item-ys .thread-title-ys .tag.top { background: #c62828; color: #fff; }
.thread-item-ys .thread-title-ys .tag.digest { background: #ff9800; color: #fff; }
.thread-item-ys .thread-title-ys .tag.locked { background: #999; color: #fff; }
.thread-item-ys .thread-info-ys { font-size: 13px; color: #999; display: flex; align-items: center; gap: 8px; }
.thread-item-ys .thread-info-ys a { color: #999; text-decoration: none; }
.thread-item-ys .thread-info-ys a:hover { color: #c62828; }
.thread-item-ys .thread-right-ys { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 16px; flex-shrink: 0; }
.thread-item-ys .thread-right-ys .stat-item { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #999; }
.thread-item-ys .thread-right-ys .stat-item .ico { width: 16px; height: 16px; fill: #999; }
/* 板块页帖子列表：编辑/删除（与"回复/收藏"同款纯文字效果，仅本人或管理员可见） */
.thread-item-ys .thread-op-btn {
  font-size: 14px; color: #888; text-decoration: none; cursor: pointer;
  display: inline-block; line-height: 20px;
}
.thread-item-ys .thread-op-btn:hover { color: #c62828; }
.thread-item-ys .thread-ops { display: inline-flex; align-items: center; gap: 10px; }

/* 精华标签（标题后面，钻石图标） */
.thread-item-ys .digest-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: #c62828; font-size: 14px; font-weight: 500; vertical-align: middle; }
.thread-item-ys .digest-tag .ico { width: 16px; height: 16px; fill: #c62828; }

/* 置顶标签（标题后面，向上箭头图标，和钻石一样大小） */
.thread-item-ys .top-tag { display: inline-flex; align-items: center; margin-left: 6px; color: #c62828; vertical-align: middle; }
.thread-item-ys .top-tag .ico { width: 16px; height: 16px; fill: #c62828; }

/* ===== 「精彩瞬间」图片卡片网格（瀑布流，参考 170170.cn fid=7） ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.g-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.g-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.14); transform: translateY(-2px); }
.g-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f1f1;
  overflow: hidden;
}
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-cover.no-img { display: flex; align-items: center; justify-content: center; background: #f1f1f1; }
.g-ph { width: 40px; height: 40px; fill: #c2c2c2; }
.g-body { padding: 8px 10px 10px; flex: 1; display: flex; flex-direction: column; }
.g-title {
  font-size: 15px; line-height: 1.4; color: #222; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 42px;
}
.g-title:hover { color: #c62828; }
.g-meta { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #999; }
.g-meta .stat-item { display: inline-flex; align-items: center; gap: 3px; }
.g-meta .stat-item .ico { width: 15px; height: 15px; fill: #999; }
.g-meta .g-author { margin-left: auto; color: #666; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-top {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: #c62828; color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 3px;
}

/* 帖子详情页管理员置顶分级下拉 */
.top-sel { position: relative; display: inline-block; }
.top-sel-menu { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 60; min-width: 110px; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 4px 0; }
.top-sel-menu.show { display: block; }
.top-sel-menu a { display: block; padding: 7px 14px; font-size: 13px; color: #333; white-space: nowrap; }
.top-sel-menu a:hover { background: #f5f5f5; color: #c62828; }
.top-sel-menu a.cur { color: #c62828; font-weight: bold; background: #fdecec; }

/* 导航栏用户头像 */
.nav-user-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; }
.nav-user-link:hover { color: #fff; }
.nav-avatar { width: 24px; height: 24px; background: #fff url('/images/default_avatar.png') center/cover; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; flex-shrink: 0; overflow: hidden; color: transparent; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 退出按钮样式 */
.logout-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; }
.logout-link:hover { color: #fff; }
.logout-icon { width: 20px; height: 20px; background: #c62828; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logout-icon .ico { width: 12px; height: 12px; fill: #fff; }

/* 用户信息悬浮卡片（已废弃，保留样式防止报错） */
.user-hover-wrapper { position: relative; display: inline-block; }
.user-hover-wrapper .username { cursor: pointer; }
.user-hover-card { position: absolute; top: 100%; right: 0; width: 220px; background: #fff; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.2s ease; margin-top: 6px; overflow: hidden; }
.user-hover-wrapper:hover .user-hover-card { opacity: 1; visibility: visible; transform: translateY(0); }
.hover-card-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.hover-avatar { width: 40px; height: 40px; background: #f0f0f0; color: #666; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; flex-shrink: 0; overflow: hidden; }
.hover-user-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.hover-username { font-size: 14px; font-weight: bold; color: #333; }
.hover-level { display: inline-block; padding: 1px 6px; background: #e3f2fd; color: #1976d2; border-radius: 8px; font-size: 10px; flex-shrink: 0; }
.hover-card-stats { display: flex; padding: 8px 12px; border-bottom: 1px solid #f0f0f0; }
.hover-card-stats .stat-item { flex: 1; text-align: center; }
.hover-card-stats .stat-num { display: block; font-size: 14px; font-weight: bold; color: #333; margin-bottom: 1px; }
.hover-card-stats .stat-label { display: block; font-size: 11px; color: #999; }
.hover-card-actions { display: flex; padding: 0; }
.hover-card-actions .hover-action { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 4px; font-size: 11px; color: #666; transition: all 0.15s; border-right: 1px solid #f0f0f0; }
.hover-card-actions .hover-action:last-child { border-right: none; }
.hover-card-actions .hover-action:hover { background: #f8f8f8; color: #c62828; }
.hover-card-actions .hover-action .ico { width: 16px; height: 16px; fill: currentColor; }

/* 排序切换 */
.sort-tabs { display: flex; gap: 16px; margin-bottom: 16px; border-bottom: 1px solid #eee; }
.sort-tabs a { padding: 8px 0; font-size: 15px; color: #666; border-bottom: 2px solid transparent; }
.sort-tabs a.active { color: #c62828; border-bottom-color: #c62828; }

/* 分页 */
/* Blue风格分页 */
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 16px; margin-bottom: 20px; gap: 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; font-size: 14px; color: #666; background: #fff; border: 1px solid #e8e8e8; border-left: none; cursor: pointer; transition: all 0.2s; }
.pagination > *:first-child { border-left: 1px solid #e8e8e8; border-radius: 4px 0 0 4px; }
.pagination > *:last-child { border-radius: 0 4px 4px 0; }
.pagination .current { background: #c62828; color: #fff; border-color: #c62828; font-weight: 500; }
.pagination a:hover { background: #f5f5f5; color: #c62828; }
.pagination .current:hover { background: #c62828; color: #fff; }
.pagination .dots { border-left: none; cursor: default; background: transparent; border: none; min-width: 20px; }
.pagination .total { color: #c62828; font-weight: 500; background: transparent; border: none; border-left: 1px solid #e8e8e8; }
.pagination .next-btn { color: #c62828; font-size: 12px; }
.pagination .next-btn:hover { background: #f5f5f5; }
.pagination .prev-btn { color: #666; font-size: 12px; }
.pagination .disabled { color: #ccc; cursor: not-allowed; }
.pagination .disabled:hover { background: #fff; color: #ccc; }

/* 帖子详情 */
.thread-main-card { padding-bottom: 16px; }
.thread-detail-header { padding-bottom: 16px; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.thread-detail-header .thread-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.thread-detail-header h1 { font-size: 24px; color: #333; margin: 0; flex: 1; min-width: 0; }
.thread-detail-header .thread-stats-top { flex-shrink: 0; display: flex; gap: 16px; font-size: 13px; color: #999; padding-top: 8px; white-space: nowrap; }
.thread-detail-header .meta { font-size: 14px; color: #888; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.thread-detail-header .meta .meta-louzhu { color: #c62828; font-weight: bold; font-size: 14px; }
.thread-detail-header .actions { margin-top: 12px; display: flex; gap: 8px; }
.post-item { padding: 20px 0 0; display: flex; gap: 16px; }
.post-item .post-author { width: 60px; text-align: center; flex-shrink: 0; }
.post-item .post-author .avatar { width: 48px; height: 48px; background: #fff url('/images/default_avatar.png') center/cover; color: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 0 auto 8px; overflow: hidden; }
.post-item .post-author .avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-item .post-author .name { font-size: 14px; color: #333; font-weight: bold; }
.post-item .post-author .role { font-size: 12px; color: #c62828; margin-top: 2px; }
.post-item .post-content { flex: 1; min-width: 0; }
.post-item .post-meta { font-size: 13px; color: #999; margin-bottom: 8px; display: flex; justify-content: space-between; }
.post-item .post-meta .post-louzhu { color: #c62828; font-weight: bold; font-size: 13px; }
.post-item .post-body { font-size: 16px; color: #333; line-height: 1.8; white-space: pre-wrap; word-break: break-all; }
.post-item .post-stats { margin-top: 12px; display: flex; justify-content: flex-end; gap: 20px; padding-top: 10px; border-top: 1px solid #f5f5f5; font-size: 13px; color: #999; }
.post-item .post-stats span { display: inline-flex; align-items: center; gap: 4px; }
.op-post-stats { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: none; padding-top: 0; }
.op-post-stats .douyin-footer-left { display: flex; align-items: center; gap: 16px; }
.op-post-stats .douyin-footer-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.op-post-stats .douyin-time { font-size: 13px; color: #999; display: inline; gap: 0; }
.op-post-stats .douyin-reply { font-size: 14px; color: #888; text-decoration: none; cursor: pointer; }
.op-post-stats .douyin-reply:hover { color: #c62828; }
.op-post-stats .douyin-vote { display: flex; align-items: center; gap: 2px; }
.op-post-stats .vote-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: transparent; border: none; cursor: pointer; padding: 0; }
.op-post-stats .vote-btn .vote-icon { width: 20px; height: 20px; object-fit: contain; display: block; }
.op-post-stats .vote-count { font-size: 13px; color: #666; min-width: 14px; line-height: 1; display: inline-flex; align-items: center; }
.op-post-stats .op-fav-btn { margin-left: 10px; }
/* 收藏 / 编辑：与"回复"完全一致的纯文字效果（无背景、无边框、无圆角） */
.op-post-stats .op-fav-btn,
.op-post-stats .op-edit-btn {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-left: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #888;
  text-decoration: none;
  line-height: 28px;
  cursor: pointer;
  display: inline-block;
  box-shadow: none;
}
/* 悬停效果与"回复"一致：变论坛红 */
.op-post-stats .op-fav-btn:hover,
.op-post-stats .op-edit-btn:hover { color: #c62828; }
/* 已收藏状态常驻论坛红（纯文字，不加底色） */
.op-post-stats .op-fav-btn.on { color: #c62828; }
/* 帖子被编辑后，在操作栏中间显示的最后修改时间（与收藏/编辑同高同字号） */
.post-edited-tip {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #888;
  line-height: 28px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .post-edited-tip { color: #aaa; }
.post-item .post-actions { margin-top: 12px; display: flex; gap: 12px; font-size: 14px; }
.post-item .post-actions a { color: #888; }
.post-item .post-actions a:hover { color: #c62828; }

/* 壹原始风格回复列表 */
#postList { }
.post-item-ys { background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.post-item-ys .post-header-ys { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #f5f5f5; flex-wrap: wrap; }
.post-item-ys .avatar-ys { width: 36px; height: 36px; background: #fff url('/images/default_avatar.png') center/cover; color: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: bold; flex-shrink: 0; overflow: hidden; }
.post-item-ys .avatar-ys img { width: 100%; height: 100%; object-fit: cover; }
.post-item-ys .username-ys { font-size: 15px; font-weight: bold; color: #333; flex-shrink: 0; padding-top: 6px; }
.post-item-ys .badge-ys { display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 3px; background: #f0f0f0; color: #888; flex-shrink: 0; margin-top: 5px; }
.post-item-ys .admin-badge { background: #c62828; color: #fff; }
.post-item-ys .time-ys { font-size: 13px; color: #999; flex-shrink: 0; padding-top: 8px; }
.post-item-ys .floor-ys { font-size: 13px; color: #c62828; font-weight: bold; flex-shrink: 0; padding-top: 8px; }
.post-item-ys .post-content-inline { font-size: 16px; color: #333; line-height: 1.9; flex: 1; min-width: 300px; word-break: break-all; background: transparent; padding: 0; border-radius: 0; margin-top: 0; }
.post-item-ys .post-content-inline p { margin-bottom: 10px; }
.post-item-ys .post-content-inline img { max-width: 100%; border-radius: 4px; }
.post-item-ys .post-content-inline blockquote { border-left: 4px solid #e0e0e0; background: #f5f5f5; padding: 10px 14px; margin: 10px 0; color: #666; border-radius: 0 4px 4px 0; }
.post-item-ys.top-post { background: #fff; }
.post-item-ys .post-body-ys { font-size: 16px; color: #333; line-height: 1.9; padding: 0 4px; margin-bottom: 12px; word-break: break-all; }
.post-item-ys .post-body-ys p { margin-bottom: 10px; }
.post-item-ys .post-body-ys img { max-width: 100%; border-radius: 4px; }
.post-item-ys .post-body-ys blockquote { border-left: 4px solid #e0e0e0; background: #fafafa; padding: 10px 14px; margin: 10px 0; color: #666; border-radius: 0 4px 4px 0; }
.post-item-ys .post-footer-ys { display: flex; justify-content: flex-end; gap: 16px; padding-top: 8px; border-top: 1px solid #f8f8f8; }
.post-item-ys .post-footer-ys a { font-size: 14px; color: #888; }
.post-item-ys .post-footer-ys a:hover { color: #c62828; }
.post-item-ys .post-footer-ys .delete-link:hover { color: #e53935; }

/* 抖音风格回复 */
.post-item-ys.douyin-style { display: flex; align-items: flex-start; gap: 10px; padding: 16px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-bottom: none; margin-bottom: 12px; flex-wrap: wrap; }
.post-item-ys.douyin-style.child-post { background: #fafafa; padding: 12px; margin-bottom: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid #eee; }
/* 楼主主帖：外层已有 .card 白色背景，不需要再套一层白色卡片 */
.post-item-ys.douyin-style.op-post { background: transparent; box-shadow: none; border-radius: 0; padding: 16px 0; margin-bottom: 0; }
/* 楼主主帖内容只有一两行时，正文至少占两行高度，让外层白色背景不显得过矮（约多一行留白，长内容不受影响） */
.post-item-ys.douyin-style.op-post .douyin-text { min-height: 3.6em; }
.thread-main-card { padding-bottom: 0; }
.reply-group { margin-bottom: 12px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.reply-group .top-post { margin-bottom: 0; border-radius: 0; box-shadow: none; }
.reply-group .child-container { background: #f7f8fa; padding: 4px 0; margin-left: 62px; margin-right: 24px; margin-bottom: 26px; border-radius: 6px; }
.reply-group .child-post-flat { background: transparent; border-radius: 0; box-shadow: none; margin-bottom: 0; border-bottom: 1px solid #ececec; }
.reply-group .child-post-flat:last-child { border-bottom: none; }
.reply-group .child-container .child-toggle { background: transparent; padding: 6px 16px 8px; }
.post-item-ys.douyin-style .douyin-avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff url('/images/default_avatar.png') center/cover; color: transparent; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; flex-shrink: 0; overflow: hidden; }
.post-item-ys.douyin-style .douyin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-item-ys.douyin-style .douyin-content { flex: 1; min-width: 0; overflow: hidden; }
.post-item-ys.douyin-style .douyin-username { font-size: 15px; font-weight: normal; color: #333; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.post-item-ys.douyin-style .forum-uname { color: #333; font-weight: bold; }
.post-item-ys.douyin-style .forum-level { font-size: 12px; color: #2b7cd3; background: #eaf4ff; border: 1px solid #b9dcff; padding: 0 5px; border-radius: 3px; line-height: 18px; }
.post-item-ys.douyin-style .douyin-floor { font-size: 14px; color: #c62828; font-weight: bold; background: none; padding: 0; border-radius: 0; margin-left: auto; }
.post-item-ys.douyin-style .reply-to-line { display: inline-flex; align-items: center; gap: 4px; color: #999; font-size: 14px; font-weight: normal; }
.post-item-ys.douyin-style .reply-to-icon { color: #b0b0b0; flex-shrink: 0; }
.post-item-ys.douyin-style .reply-to-name { color: #888; }
.post-item-ys.douyin-style.child-post-flat .forum-uname { color: #888; font-weight: normal; }
.post-item-ys.douyin-style .douyin-text { font-size: 16px; color: #333; line-height: 1.8; word-break: break-word; margin-bottom: 8px; display: block; }
.post-item-ys.douyin-style .douyin-text p { margin-bottom: 8px; }
.post-item-ys.douyin-style .douyin-text img { max-width: 100%; border-radius: 4px; }
.post-item-ys.douyin-style .douyin-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; position: relative; }
.post-item-ys.douyin-style .douyin-footer-left { display: flex; align-items: center; gap: 16px; }
.post-item-ys.douyin-style .douyin-footer-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.post-item-ys.douyin-style .douyin-time { font-size: 13px; color: #999; }
.post-item-ys.douyin-style .douyin-reply { font-size: 14px; color: #888; text-decoration: none; }
.post-item-ys.douyin-style .douyin-reply:hover { color: #c62828; }
.post-item-ys.douyin-style .douyin-vote { display: flex; align-items: center; gap: 0px; }
.post-item-ys.douyin-style .vote-count { font-size: 13px; color: #666; min-width: 14px; text-align: left; font-weight: 500; margin-left: -2px; }
.post-item-ys.douyin-style .vote-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; transition: all 0.2s; background: transparent; border: none; cursor: pointer; padding: 0; }
.post-item-ys.douyin-style .vote-btn:hover { transform: scale(1.15); }
.post-item-ys.douyin-style .vote-btn .vote-icon { width: 20px; height: 20px; object-fit: contain; }
.post-item-ys.douyin-style .vote-count { font-size: 13px; color: #666; min-width: 16px; text-align: center; font-weight: 500; }
.post-item-ys.douyin-style .delete-link { font-size: 14px; color: #999; }
.post-item-ys.douyin-style .delete-link:hover { color: #e53935; }

/* 嵌套回复样式（抖音风格） */
.post-item-ys.douyin-style .child-replies { margin-top: 8px; position: relative; flex-basis: 100%; width: 100%; box-sizing: border-box; }
.post-item-ys.douyin-style .toggle-link { font-size: 13px; color: #999; text-decoration: none; cursor: pointer; }
.post-item-ys.douyin-style .toggle-link:hover { color: #c62828; }
.post-item-ys.douyin-style .child-replies::before {
  display: none;
}
.post-item-ys.douyin-style .child-post { 
  background: #f8f8f8; 
  padding: 12px; 
  margin-bottom: 8px;
  border-bottom: none;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.post-item-ys.douyin-style .child-post::before {
  display: none;
}
.post-item-ys.douyin-style .child-post:last-child { margin-bottom: 0; }

/* Reddit风格回复操作栏 */
.post-item-ys .post-actions-reddit { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding-top: 8px; }
.post-item-ys .vote-buttons { display: flex; align-items: center; gap: 4px; background: #f5f5f5; border-radius: 20px; padding: 2px 8px; }
.post-item-ys .vote-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: #888; transition: all 0.2s; font-size: 16px; line-height: 1; }
.post-item-ys .vote-btn:hover { background: #e8e8e8; color: #c62828; }
.post-item-ys .vote-count { font-size: 13px; font-weight: bold; color: #333; min-width: 20px; text-align: center; }
.post-item-ys .action-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #888; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; }
.post-item-ys .action-btn:hover { background: #f5f5f5; color: #c62828; }
.post-item-ys .action-btn .ico { width: 14px; height: 14px; }
.post-item-ys .action-btn.delete-link:hover { color: #e53935; }

/* 快速回复框 */
.quick-reply-box { background: #f8f8f8; border: 1px solid #e8e8e8; border-radius: 6px; padding: 14px; margin: 0 0 12px 24px; }
.quick-reply-textarea { width: 100%; height: 90px; border: 1px solid #ddd; border-radius: 4px; padding: 10px; font-size: 14px; resize: vertical; box-sizing: border-box; outline: none; }
.quick-reply-textarea:focus { border-color: #c62828; box-shadow: 0 0 0 2px rgba(198,40,40,0.1); }
.quick-reply-editor-container { margin-bottom: 10px; }
/* 同 #reply-editor：固定高度后逐层拉满，避免可输入区只有一行高 */
.quick-reply-editor-container .w-e-text-container { height: 120px !important; }
.quick-reply-editor-container .w-e-scroll { height: 100% !important; }
.quick-reply-editor-container [data-slate-editor] { min-height: 100%; }
/* 楼层内"高级回复"工具栏：与发帖同款，窄空间允许换行；工具栏与编辑区拼成一体 */
.quick-reply-toolbar { border: 1px solid #ddd; border-bottom: none; border-radius: 4px 4px 0 0; background: #fafafa; }
.quick-reply-toolbar .w-e-bar { flex-wrap: wrap; }
.quick-reply-toolbar .w-e-bar-item { padding: 2px 2px; }
.quick-reply-edit { border: 1px solid #ddd; border-radius: 0 0 4px 4px; }
.quick-reply-edit .w-e-text-container { border-radius: 0 0 4px 4px; }
/* 回复编辑器的视频插入（B站/本地），与发帖弹窗一致 */
.rv-vpanel { display:none; position:fixed; z-index:9999; width:380px; max-width:calc(100vw - 16px); border:1px solid #ddd; border-radius:6px; padding:12px; background:#fff; box-shadow:0 6px 20px rgba(0,0,0,.15); }
.rv-vpanel.show { display:block; }
.rv-vpanel input { width:100%; padding:8px 10px; border:1px solid #ddd; border-radius:4px; font-size:14px; box-sizing:border-box; }
.rv-vor { text-align:center; color:#aaa; font-size:12px; margin:8px 0; }
.rv-upbtn { width:100%; padding:9px; border:1px dashed #c62828; color:#c62828; background:#fff; border-radius:4px; cursor:pointer; font-size:13px; }
.rv-upbtn:hover { background:#fdecec; }
.rv-vtip { font-size:12px; color:#2e7d32; margin-top:6px; min-height:16px; }
.rv-vsubmit { display:flex; gap:8px; margin-top:8px; }
.rv-video-item { display:inline-flex; align-items:center; }
.rv-video-btn { display:inline-flex; align-items:center; justify-content:center; width:34px; height:32px; border:0; background:transparent; color:#666; cursor:pointer; border-radius:3px; padding:0; }
.rv-video-btn:hover { background:#e8e8e8; color:#c62828; }
.bili-slot { background:#f5f5f5; border-left:4px solid #c62828; color:#888; padding:8px 12px; border-radius:0 4px 4px 0; }
.w-e-text-container video, .douyin-text video { max-width:100%; border-radius:4px; background:#000; }
/* 插入的超链接：红色带下划线（编辑器内 + 帖子/文章正文展示一致） */
.w-e-text-container a,
.post-body-ys a, .post-content-inline a, .post-body a, .article-body a, .douyin-text a{
 color:#c62828; text-decoration:underline; text-underline-offset:2px; word-break:break-all;
}
.w-e-text-container a:hover,
.post-body-ys a:hover, .post-content-inline a:hover, .post-body a:hover, .article-body a:hover, .douyin-text a:hover{ color:#e03a3a; }
[data-theme="dark"] .w-e-text-container a,
[data-theme="dark"] .post-body-ys a, [data-theme="dark"] .post-content-inline a, [data-theme="dark"] .post-body a, [data-theme="dark"] .article-body a, [data-theme="dark"] .douyin-text a{ color:var(--d-red); }
.quick-reply-actions { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.quick-reply-actions .btn { padding: 6px 16px; font-size: 14px; }

/* 壹原始风格板块详情页 */
.forum-breadcrumb-bar { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 6px; padding: 12px 20px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.forum-breadcrumb-bar .breadcrumb { margin: 0; font-size: 14px; color: #666; }
.forum-breadcrumb-bar .breadcrumb a { color: #666; }
.forum-breadcrumb-bar .breadcrumb a:hover { color: #666; }
.forum-breadcrumb-bar .btn { padding: 8px 20px; font-size: 14px; }

.forum-info-card { display: flex; gap: 16px; background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.forum-info-card .forum-icon { width: 56px; height: 56px; background: #f5f5f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.forum-info-card .forum-info { flex: 1; }
.forum-info-card .forum-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.forum-info-card .forum-title-row h2 { font-size: 20px; color: #333; margin: 0; }
.forum-info-card .forum-thread-count { font-size: 13px; color: #999; font-weight: normal; }
.forum-info-card .forum-thread-count span { color: #333; font-weight: bold; }
.forum-info-card .forum-desc { font-size: 14px; color: #888; margin: 0 0 8px 0; line-height: 1.6; }
.forum-info-card .forum-moderator { font-size: 13px; color: #999; }
.forum-info-card .forum-moderator span { color: #666; font-weight: 500; }

.forum-tabs-bar { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 6px 6px 0 0; padding: 0 20px; border-bottom: 1px solid #eee; }
.forum-tabs { display: flex; gap: 0; }
.forum-tabs a { display: flex; align-items: center; gap: 6px; padding: 14px 20px; font-size: 15px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.forum-tabs a:hover { color: #c62828; }
.forum-tabs a.active { color: #c62828; border-bottom-color: #c62828; font-weight: 500; }
.forum-tabs a .ico { width: 16px; height: 16px; fill: currentColor; }
.forum-sort { font-size: 13px; color: #999; display: flex; align-items: center; gap: 6px; }
.forum-sort select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #666; outline: none; cursor: pointer; }
.forum-sort select:focus { border-color: #c62828; }

/* 帖子列表白色背景容器，和Tab栏连在一起 */
.thread-list { background: #fff; border-radius: 0 0 6px 6px; padding: 0 20px 10px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* 回复框 */
.reply-box { margin-top: 20px; }
.reply-box textarea { width: 100%; min-height: 120px; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; resize: vertical; font-family: inherit; }
.reply-box .reply-actions { margin-top: 10px; text-align: right; }

/* 提示消息 */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* 管理后台 */
.admin-layout { display: flex; min-height: calc(100vh - 48px); }
.admin-sidebar { width: 196px; background: #000; color: #fff; padding: 14px 0; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; }
.admin-sidebar .admin-logo { display: flex; align-items: center; justify-content: center; padding: 8px 18px 14px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .admin-logo img { display: block; width: 132px; height: auto; }
.admin-sidebar ul { flex: 1; }
.admin-sidebar ul li a { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 9px; padding: 10px 18px 10px 22px; color: #b3b8c2; font-size: 14.5px; }
.admin-sidebar ul li a::before { content: ''; width: 9px; height: 9px; border: 1.5px solid #5b6068; border-radius: 50%; box-sizing: border-box; flex-shrink: 0; transition: border-color .15s, background .15s; }
.admin-sidebar ul li a::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.admin-sidebar ul li a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-sidebar ul li a:hover::before { border-color: #9aa0aa; }
.admin-sidebar ul li a.active { color: #fff; background: rgba(198,40,40,.16); }
.admin-sidebar ul li a.active::before { border-color: #e06464; background: #c62828; }
.admin-sidebar ul li a.active::after { background: #c62828; }
.admin-sidebar ul li.nav-back { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-sidebar ul li.nav-back a { color: #8a8f99; }
.admin-sidebar ul li.nav-back a::before { display: none; }
.admin-sidebar ul li.nav-back a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-sidebar-foot { display: flex; align-items: center; justify-content: flex-start; padding: 12px 18px 6px 22px; }
.admin-sidebar .admin-theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 34px; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #c4c9d2; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; }
.admin-sidebar .admin-theme-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar .admin-theme-btn .ico { width: 19px; height: 19px; fill: currentColor; }
.admin-content { flex: 1; padding: 20px; background: #f5f5f5; overflow-x: auto; }
.admin-content h2 { font-size: 20px; margin-bottom: 16px; color: #333; }
.admin-table { width: 100%; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.admin-table th { background: #fafafa; padding: 12px; text-align: left; font-size: 14px; color: #666; border-bottom: 1px solid #eee; }
.admin-table td { padding: 12px; font-size: 14px; color: #444; border-bottom: 1px solid #f0f0f0; }
.admin-table tr:hover { background: #fafafa; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-stat-card { background: #fff; border-radius: 6px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.admin-stat-card .label { font-size: 14px; color: #888; margin-bottom: 8px; }
.admin-stat-card .value { font-size: 28px; font-weight: bold; color: #c62828; }

/* ===== 板块页主内容 ===== */
.forum-page-layout { display: block; }
.forum-main-col { width: 100%; min-width: 0; }

/* 头像可点击进入个人主页 */
.avatar-link { display:inline-block; text-decoration:none; cursor:pointer; line-height:0; color:inherit; }
.avatar-link:hover { opacity:.82; }

/* B站嵌入视频 */
.bili-player{width:100% !important;max-width:100%;aspect-ratio:16/9;height:auto !important;border:0;border-radius:6px;margin:10px 0;background:#000;display:block;}

/* 本地上传视频原生播放器 */
.local-video{width:100%;max-width:100%;aspect-ratio:16/9;background:#000;border-radius:6px;margin:10px 0;display:block;}

.douyin-text video,.post-content-inline video{width:100%;max-width:100%;border-radius:6px;background:#000;margin:8px 0;}
div[data-w-e-type='video']{margin:10px 0;}

/* ============================================================
   暗黑模式（data-theme="dark" 挂在 <html> 上，由右上角按钮切换）
   ============================================================ */
[data-theme="dark"]{
  --d-bg:#141414; --d-surface:#1f1f1f; --d-surface2:#282828; --d-surface3:#2f2f2f;
  --d-border:#3a3a3a; --d-border2:#484848;
  --d-text:#e6e6e6; --d-text2:#b3b3b3; --d-text3:#8f8f8f;
  --d-red:#ff7a7a; --d-redbg:#3a2222;
}
/* 页面底与默认文字 */
[data-theme="dark"] body{ background:var(--d-bg); color:var(--d-text); }
[data-theme="dark"] a{ color:var(--d-text); }
[data-theme="dark"] a:hover{ color:var(--d-red); }
/* 顶部红导航保持红；选中项黑暗模式与亮色一致（红底白字），不随主题变 */
/* 「板块」悬停下拉：黑暗模式下保持白色面板不变（用户要求，不随主题变深） */
/* 主题切换按钮 */
.theme-toggle{ display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;margin-right:6px;border:0;background:transparent;color:#fff;border-radius:4px;cursor:pointer;padding:0; }
.theme-toggle:hover{ background:rgba(255,255,255,.15); }
.theme-toggle .ico{ width:20px;height:20px;fill:#fff; }

/* —— 白色卡片/容器统一转深 —— */
[data-theme="dark"] .header,
[data-theme="dark"] .latest-section,
[data-theme="dark"] .online-bar,
[data-theme="dark"] .forum-section,
[data-theme="dark"] .footer,
[data-theme="dark"] .card,
[data-theme="dark"] .auth-box,
[data-theme="dark"] .post-item-ys,
[data-theme="dark"] .reply-group,
[data-theme="dark"] .forum-breadcrumb-bar,
[data-theme="dark"] .forum-info-card,
[data-theme="dark"] .forum-tabs-bar,
[data-theme="dark"] .thread-list,
[data-theme="dark"] .admin-table,
[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .top-sel-menu,
[data-theme="dark"] .user-hover-card,
[data-theme="dark"] .rv-vpanel,
[data-theme="dark"] .article-card,
[data-theme="dark"] .pp-card,
[data-theme="dark"] .pp-left,
[data-theme="dark"] .pp-stat-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .trade-header,
[data-theme="dark"] .filter-section,
[data-theme="dark"] .trade-list,
[data-theme="dark"] .skills-card,
[data-theme="dark"] .remark-section,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .tab-section,
[data-theme="dark"] .flow-card,
[data-theme="dark"] .np-box,
[data-theme="dark"] .em-box,
[data-theme="dark"] .ted-box,
[data-theme="dark"] .vi-box,
[data-theme="dark"] .cap-box{ background:var(--d-surface); color:var(--d-text); box-shadow:0 1px 3px rgba(0,0,0,.4); }
[data-theme="dark"] .post-item-ys.douyin-style.op-post{ background:transparent; }
/* 黑暗模式下大 Logo 换白色版（content 替换 img 显示，尺寸与原图一致 500x178） */
[data-theme="dark"] img.logo-img { content: url('/images/logo-white.png'); }
[data-theme="dark"] .header,
[data-theme="dark"] .footer{ border-color:var(--d-border); }

/* —— 浅灰嵌套区转更深一档 —— */
[data-theme="dark"] .section-header,
[data-theme="dark"] .forum-icon,
[data-theme="dark"] .forum-info-card .forum-icon,
[data-theme="dark"] .btn-default,
[data-theme="dark"] .post-item-ys .badge-ys,
[data-theme="dark"] .post-item-ys.douyin-style.child-post,
[data-theme="dark"] .reply-group .child-container,
[data-theme="dark"] .post-item-ys.douyin-style .child-post,
[data-theme="dark"] .post-item-ys .vote-buttons,
[data-theme="dark"] .quick-reply-box,
[data-theme="dark"] .quick-reply-toolbar,
[data-theme="dark"] .bili-slot,
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-content,
[data-theme="dark"] .admin-table tr:hover,
[data-theme="dark"] .trade-table th,
[data-theme="dark"] .trade-table tr:hover,
[data-theme="dark"] .skills-card-header,
[data-theme="dark"] .trade-detail .section-header,
[data-theme="dark"] .article-meta .user-group,
[data-theme="dark"] .article-body .qq-group,
[data-theme="dark"] .download-box .version-info,
[data-theme="dark"] .avatar-upload-btn,
[data-theme="dark"] .post-body pre,
[data-theme="dark"] .post-body blockquote,
[data-theme="dark"] .post-item-ys .post-content-inline blockquote,
[data-theme="dark"] .post-item-ys .post-body-ys blockquote,
[data-theme="dark"] .hover-avatar,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .top-sel-menu a:hover,
[data-theme="dark"] .hover-card-actions .hover-action:hover,
[data-theme="dark"] .post-item-ys .action-btn:hover,
[data-theme="dark"] .cap-track{ background:var(--d-surface2); color:var(--d-text2); }
[data-theme="dark"] .section-header{ background:var(--d-surface2); }
[data-theme="dark"] .btn-default{ border-color:var(--d-border); color:var(--d-text2); }
[data-theme="dark"] .btn-default:hover{ background:var(--d-surface3); }

/* —— 边框统一调暗 —— */
[data-theme="dark"] .latest-col h3,
[data-theme="dark"] .forum-item,
[data-theme="dark"] .forum-item:nth-child(odd),
[data-theme="dark"] .card-title,
[data-theme="dark"] .thread-item,
[data-theme="dark"] .thread-item-ys,
[data-theme="dark"] .thread-item-ys.top-divider,
[data-theme="dark"] .post-item-ys .post-header-ys,
[data-theme="dark"] .post-item-ys .post-footer-ys,
[data-theme="dark"] .post-item-ys.douyin-style.child-post,
[data-theme="dark"] .reply-group .child-post-flat,
[data-theme="dark"] .forum-tabs-bar,
[data-theme="dark"] .sort-tabs,
[data-theme="dark"] .thread-detail-header,
[data-theme="dark"] .article-header,
[data-theme="dark"] .article-nav,
[data-theme="dark"] .settings-header,
[data-theme="dark"] .settings-footer,
[data-theme="dark"] .pp-tabs,
[data-theme="dark"] .pp-item,
[data-theme="dark"] .pp-stat-cell,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .trade-table th,
[data-theme="dark"] .trade-table td,
[data-theme="dark"] .skills-card-header,
[data-theme="dark"] .detail-header,
[data-theme="dark"] .info-row,
[data-theme="dark"] .flow-card-title,
[data-theme="dark"] .np-head,
[data-theme="dark"] .np-foot,
[data-theme="dark"] .em-head,
[data-theme="dark"] .em-foot,
[data-theme="dark"] .ted-head,
[data-theme="dark"] .ted-foot,
[data-theme="dark"] .vi-head,
[data-theme="dark"] .vi-foot,
[data-theme="dark"] .search-box,
[data-theme="dark"] .quick-reply-box,
[data-theme="dark"] .quick-reply-toolbar,
[data-theme="dark"] .quick-reply-edit,
[data-theme="dark"] #reply-toolbar,
[data-theme="dark"] #reply-editor,
[data-theme="dark"] #editor-toolbar,
[data-theme="dark"] #editor-container,
[data-theme="dark"] #emToolbar,
[data-theme="dark"] #emEditor,
[data-theme="dark"] #tedToolbar,
[data-theme="dark"] #tedEditor,
[data-theme="dark"] #npToolbar,
[data-theme="dark"] #npEditor,
[data-theme="dark"] #viToolbar,
[data-theme="dark"] #viEditor,
[data-theme="dark"] .rv-vpanel,
[data-theme="dark"] .rv-vpanel input,
[data-theme="dark"] .top-sel-menu,
[data-theme="dark"] .hover-card-header,
[data-theme="dark"] .hover-card-stats,
[data-theme="dark"] .hover-card-actions .hover-action,
[data-theme="dark"] .quick-reply-textarea{ border-color:var(--d-border) !important; }

/* —— 主/次/弱文字 —— */
[data-theme="dark"] .latest-col h3,
[data-theme="dark"] .latest-col.essence h3,
[data-theme="dark"] .section-header h2,
[data-theme="dark"] .forum-info h4,
[data-theme="dark"] .forum-info h4 a,
[data-theme="dark"] .card-title,
[data-theme="dark"] .thread-detail-header h1,
[data-theme="dark"] .post-item-ys .username-ys,
[data-theme="dark"] .post-item-ys.douyin-style .douyin-username,
[data-theme="dark"] .post-item-ys.douyin-style .forum-uname,
[data-theme="dark"] .post-item-ys .post-content-inline,
[data-theme="dark"] .post-item-ys .post-body-ys,
[data-theme="dark"] .post-item-ys.douyin-style .douyin-text,
[data-theme="dark"] .thread-item .thread-title,
[data-theme="dark"] .thread-item .thread-title a,
[data-theme="dark"] .thread-item-ys .thread-title-ys,
[data-theme="dark"] .thread-item-ys .thread-title-ys a,
[data-theme="dark"] .forum-info-card .forum-title-row h2,
[data-theme="dark"] .forum-info-card .forum-thread-count span,
[data-theme="dark"] .admin-content h2,
[data-theme="dark"] .article-title h1,
[data-theme="dark"] .article-body,
[data-theme="dark"] .article-body .qq-group .group-name,
[data-theme="dark"] .pp-name,
[data-theme="dark"] .pp-item .thread-title-ys a,
[data-theme="dark"] .settings-header h2,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .trade-title,
[data-theme="dark"] .trade-table th,
[data-theme="dark"] .trade-table td,
[data-theme="dark"] .role-title,
[data-theme="dark"] .expire-time,
[data-theme="dark"] .expire-warning,
[data-theme="dark"] .expire-danger,
[data-theme="dark"] .detail-title,
[data-theme="dark"] .detail-title .level,
[data-theme="dark"] .info-value,
[data-theme="dark"] .skills-content,
[data-theme="dark"] .skill-name,
[data-theme="dark"] .remark-content,
[data-theme="dark"] .remark-section .remark-content,
[data-theme="dark"] .tab-item,
[data-theme="dark"] .flow-card-title,
[data-theme="dark"] .flow-contact,
[data-theme="dark"] .np-head,
[data-theme="dark"] .em-head,
[data-theme="dark"] .ted-head,
[data-theme="dark"] .top-sel-menu a,
[data-theme="dark"] .hover-username,
[data-theme="dark"] .hover-card-stats .stat-num,
[data-theme="dark"] .stats-info strong{ color:var(--d-text); }
[data-theme="dark"] .stats-info,
[data-theme="dark"] .online-bar,
[data-theme="dark"] .online-bar .online-user,
[data-theme="dark"] .forum-tabs a,
[data-theme="dark"] .forum-sort,
[data-theme="dark"] .forum-sort select,
[data-theme="dark"] .forum-breadcrumb-bar .breadcrumb,
[data-theme="dark"] .forum-breadcrumb-bar .breadcrumb a,
[data-theme="dark"] .sort-tabs a,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span,
[data-theme="dark"] .post-item-ys .vote-count,
[data-theme="dark"] .op-post-stats .vote-count,
[data-theme="dark"] .btn,
[data-theme="dark"] .form-group label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-table td,
[data-theme="dark"] .filter-label,
[data-theme="dark"] .filter-option,
[data-theme="dark"] .server-btn,
[data-theme="dark"] .sort-option,
[data-theme="dark"] .skill-name,
[data-theme="dark"] .info-label,
[data-theme="dark"] .article-nav a,
[data-theme="dark"] .article-body .contact-box .contact-item .label,
[data-theme="dark"] .pp-meta,
[data-theme="dark"] .pp-meta .pp-sig,
[data-theme="dark"] .pp-tab,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .btn-cancel,
[data-theme="dark"] .btn-back{ color:var(--d-text2); }
[data-theme="dark"] .logo-text p,
[data-theme="dark"] .latest-col li .thread-date,
[data-theme="dark"] .latest-col li .thread-title,
[data-theme="dark"] .forum-info .forum-meta,
[data-theme="dark"] .forum-info .forum-last-post,
[data-theme="dark"] .forum-info p,
[data-theme="dark"] .forum-info .moderator,
[data-theme="dark"] .thread-item-ys .thread-info-ys,
[data-theme="dark"] .thread-item-ys .thread-info-ys a,
[data-theme="dark"] .thread-item-ys .thread-right-ys .stat-item,
[data-theme="dark"] .thread-item-ys .thread-right-ys .stat-item .ico,
[data-theme="dark"] .thread-item .thread-meta,
[data-theme="dark"] .thread-item .thread-stats,
[data-theme="dark"] .post-item-ys .time-ys,
[data-theme="dark"] .post-item-ys.douyin-style .douyin-time,
[data-theme="dark"] .post-item-ys.douyin-style .reply-to-line,
[data-theme="dark"] .post-item-ys.douyin-style .reply-to-name,
[data-theme="dark"] .post-item-ys.douyin-style .toggle-link,
[data-theme="dark"] .post-item-ys.douyin-style .delete-link,
[data-theme="dark"] .thread-detail-header .thread-stats-top,
[data-theme="dark"] .thread-detail-header .meta,
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb a,
[data-theme="dark"] .footer,
[data-theme="dark"] .footer a,
[data-theme="dark"] .forum-info-card .forum-thread-count,
[data-theme="dark"] .forum-info-card .forum-desc,
[data-theme="dark"] .forum-info-card .forum-moderator,
[data-theme="dark"] .section-toggle,
[data-theme="dark"] .forum-icon .ico-xl,
[data-theme="dark"] .admin-stat-card .label,
[data-theme="dark"] .article-meta,
[data-theme="dark"] .auth-box .auth-link,
[data-theme="dark"] .download-box .subtitle,
[data-theme="dark"] .download-box .download-info,
[data-theme="dark"] .pp-item .thread-info-ys,
[data-theme="dark"] .pp-item .stat-item,
[data-theme="dark"] .pp-empty,
[data-theme="dark"] .pp-stat-label,
[data-theme="dark"] .avatar-tip,
[data-theme="dark"] .trade-desc,
[data-theme="dark"] .role-info,
[data-theme="dark"] .filter-sep,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .flow-note,
[data-theme="dark"] .np-count,
[data-theme="dark"] .em-count,
[data-theme="dark"] .ted-count,
[data-theme="dark"] .rv-vor,
[data-theme="dark"] .hover-card-stats .stat-label{ color:var(--d-text3); }
[data-theme="dark"] .latest-col li .doc-ico{ fill:var(--d-text3); }

/* —— 暗底下的红色文字提亮（红底白字按钮不在此列） —— */
[data-theme="dark"] .logo-url,
[data-theme="dark"] .logo-text h1,
[data-theme="dark"] .thread-item-ys.is-top .thread-title-ys > a,
[data-theme="dark"] .thread-item-ys.is-top .thread-title-ys > a:hover,
[data-theme="dark"] .thread-item-ys .digest-tag,
[data-theme="dark"] .thread-item-ys .top-tag,
[data-theme="dark"] .thread-item-ys .digest-tag .ico,
[data-theme="dark"] .thread-item-ys .top-tag .ico,

/* 暗黑模式：精彩瞬间图片卡片网格 */
[data-theme="dark"] .g-card { background: var(--d-surface3); box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
[data-theme="dark"] .g-cover,
[data-theme="dark"] .g-cover.no-img { background: #2a2a2e; }
[data-theme="dark"] .g-ph { fill: #5a5a5e; }
[data-theme="dark"] .g-title { color: var(--d-text); }
[data-theme="dark"] .g-title:hover { color: var(--d-red); }
[data-theme="dark"] .g-meta { color: var(--d-text3); }
[data-theme="dark"] .g-meta .stat-item .ico { fill: var(--d-text3); }
[data-theme="dark"] .g-meta .g-author { color: var(--d-text2); }
[data-theme="dark"] .post-item-ys .floor-ys,
[data-theme="dark"] .post-item-ys.douyin-style .douyin-floor,
[data-theme="dark"] .thread-detail-header .meta .meta-louzhu,
[data-theme="dark"] .post-item .post-meta .post-louzhu,
[data-theme="dark"] .price,
[data-theme="dark"] .detail-title .title-price,
[data-theme="dark"] .info-value.price,
[data-theme="dark"] .skill-level,
[data-theme="dark"] .online-bar strong,
[data-theme="dark"] .thread-item .thread-stats .replies,
[data-theme="dark"] .forum-info h4 .today-count,
[data-theme="dark"] .pp-join,
[data-theme="dark"] .pp-stat-num,
[data-theme="dark"] .pp-item .pp-cat,
[data-theme="dark"] .pp-item .digest-tag,
[data-theme="dark"] .pp-item .top-tag,
[data-theme="dark"] .article-body a,
[data-theme="dark"] .post-body a,
[data-theme="dark"] .article-body .qq-group .group-num,
[data-theme="dark"] .article-body h3,
[data-theme="dark"] .auth-box h2,
[data-theme="dark"] .flow-contact .c-val{ color:var(--d-red); }
/* 浅红底 hover/active 转暗红 */
[data-theme="dark"] .top-sel-menu a.cur,
[data-theme="dark"] .rv-upbtn:hover{ background:var(--d-redbg); }
[data-theme="dark"] .rv-upbtn{ background:var(--d-surface); color:var(--d-red); }
[data-theme="dark"] .flow-node{ background:var(--d-surface); color:var(--d-red); border-color:var(--d-red); }

/* —— 表单输入控件 —— */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select{ background:var(--d-surface2); color:var(--d-text); }
[data-theme="dark"] .search-box input,
[data-theme="dark"] .search-box{ background:var(--d-surface2); }
[data-theme="dark"] .search-box button{ color:var(--d-text3); }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder{ color:#777; }
[data-theme="dark"] .pp-top-btn .btn,
[data-theme="dark"] .btn-cancel{ background:var(--d-surface2); color:var(--d-text2); border-color:var(--d-border); }
[data-theme="dark"] .filter-option,
[data-theme="dark"] .version-btn,
[data-theme="dark"] .server-btn,
[data-theme="dark"] .sort-option{ background:var(--d-surface2); color:var(--d-text2); border-color:var(--d-border); }
/* 选中态红底白字保持 */
[data-theme="dark"] .filter-option.active,
[data-theme="dark"] .version-btn.active,
[data-theme="dark"] .server-btn.active,
[data-theme="dark"] .sort-option.active,
[data-theme="dark"] .pagination .current,
[data-theme="dark"] .pagination .current:hover{ background:#c62828; color:#fff; border-color:#c62828; }

/* —— wangEditor 富文本编辑器深色 —— */
[data-theme="dark"] .w-e-toolbar,
[data-theme="dark"] .w-e-bar,
[data-theme="dark"] .quick-reply-toolbar,
[data-theme="dark"] #reply-toolbar,
[data-theme="dark"] #editor-toolbar,
[data-theme="dark"] #emToolbar,
[data-theme="dark"] #npToolbar,
[data-theme="dark"] #tedToolbar,
[data-theme="dark"] #viToolbar{ background:var(--d-surface2) !important; border-color:var(--d-border) !important; }
[data-theme="dark"] .w-e-bar-item button,
[data-theme="dark"] .w-e-toolbar button{ color:var(--d-text2); }
[data-theme="dark"] .w-e-bar-item button:hover,
[data-theme="dark"] .w-e-bar-item.active button{ background:var(--d-surface3); color:var(--d-red); }
[data-theme="dark"] .w-e-text-container,
[data-theme="dark"] #reply-editor,
[data-theme="dark"] #editor-container,
[data-theme="dark"] #emEditor,
[data-theme="dark"] #npEditor,
[data-theme="dark"] #tedEditor,
[data-theme="dark"] #viEditor,
[data-theme="dark"] .quick-reply-edit{ background:var(--d-surface) !important; border-color:var(--d-border) !important; }
[data-theme="dark"] [data-slate-editor]{ color:var(--d-text); }
[data-theme="dark"] [data-slate-editor] [data-slate-void]{ color:var(--d-text); }
[data-theme="dark"] .w-e-text-placeholder{ color:#777; }
[data-theme="dark"] .w-e-modal,
[data-theme="dark"] .w-e-panel,
[data-theme="dark"] .w-e-drop-panel,
[data-theme="dark"] .w-e-select-list,
[data-theme="dark"] .w-e-tooltip,
[data-theme="dark"] .w-e-modal .w-e-modal-mask + div{ background:var(--d-surface3); color:var(--d-text); border-color:var(--d-border); }
[data-theme="dark"] .w-e-select-list li:hover{ background:var(--d-surface3); }
/* 编辑器内视频/B站占位 */
[data-theme="dark"] .bili-slot{ color:var(--d-text3); }

/* —— 提示条/标签等小块 —— */
[data-theme="dark"] .alert-error{ background:#3a2222; color:var(--d-red); border-color:#5b2e2e; }
[data-theme="dark"] .alert-success{ background:#1f3322; color:#7fd08a; border-color:#2e5238; }
[data-theme="dark"] .post-item-ys.douyin-style .forum-level{ background:#22303f; color:#7db4e6; border-color:#33506b; }
[data-theme="dark"] .hover-level{ background:#22303f; color:#7db4e6; }
[data-theme="dark"] .article-body .highlight{ background:#3a3320; }
[data-theme="dark"] .article-body .contact-box,
[data-theme="dark"] .download-box{ background:var(--d-surface2); }
[data-theme="dark"] .safety-tip{ background:var(--d-redbg); }
[data-theme="dark"] .expire-tag,
[data-theme="dark"] .expire-tag.warning,
[data-theme="dark"] .expire-tag.danger{ background:var(--d-redbg); color:var(--d-red); }
/* 管理后台侧栏本身深色，内容区已转；滚动条 */
[data-theme="dark"] ::-webkit-scrollbar{ width:10px;height:10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb{ background:#3a3a3a;border-radius:6px; }
[data-theme="dark"] ::-webkit-scrollbar-track{ background:var(--d-bg); }
/* 交易详情蓝色交互态在暗底下提亮/去浅蓝底 */
[data-theme="dark"] .tab-item.active{ color:#66b1ff; border-bottom-color:#66b1ff; background:transparent; }
[data-theme="dark"] .tab-item:hover,
[data-theme="dark"] .breadcrumb a:hover{ color:#66b1ff; }
[data-theme="dark"] .btn-back:hover{ background:var(--d-surface3); color:#66b1ff; border-color:var(--d-border2); }
/* 管理后台内容卡片/侧栏 */
[data-theme="dark"] .admin-sidebar{ background:#000; border-color:rgba(255,255,255,.08); }
[data-theme="dark"] .admin-main,
[data-theme="dark"] .admin-content{ background:var(--d-bg); }
[data-theme="dark"] .admin-content h2{ color:var(--d-text); }
[data-theme="dark"] .admin-table{ background:var(--d-surface); box-shadow:0 1px 3px rgba(0,0,0,.4); }
[data-theme="dark"] .admin-table th{ background:var(--d-surface2); color:var(--d-text2); border-bottom-color:var(--d-border); }
[data-theme="dark"] .admin-table td{ color:var(--d-text2); border-bottom-color:var(--d-border); }
[data-theme="dark"] .admin-table tr:hover{ background:var(--d-surface2); }
[data-theme="dark"] .admin-stat-card{ background:var(--d-surface); box-shadow:0 1px 3px rgba(0,0,0,.4); }
[data-theme="dark"] .admin-stat-card .label{ color:var(--d-text3); }
[data-theme="dark"] .admin-stat-card .value{ color:var(--d-red); }
/* admin.js 内联写死 background:#fff 的卡片/浅灰按钮与输入框，暗色下用 !important 兜底 */
[data-theme="dark"] .admin-content div[style*="background:#fff"],
[data-theme="dark"] .admin-content div[style*="background: #fff"]{ background:var(--d-surface) !important; box-shadow:0 1px 3px rgba(0,0,0,.4) !important; color:var(--d-text); }
[data-theme="dark"] .admin-content .btn{ background:var(--d-surface2) !important; color:var(--d-text2) !important; border:1px solid var(--d-border); }
[data-theme="dark"] .admin-content .btn:hover{ background:var(--d-surface3) !important; }
[data-theme="dark"] .admin-content .btn-primary,
[data-theme="dark"] .admin-content .btn-danger{ background:linear-gradient(to bottom,#c62828,#b71c1c) !important; color:#fff !important; border-color:transparent !important; }
[data-theme="dark"] .admin-content input,
[data-theme="dark"] .admin-content textarea,
[data-theme="dark"] .admin-content select{ background:var(--d-surface2) !important; color:var(--d-text) !important; border-color:var(--d-border) !important; }
[data-theme="dark"] .admin-content input::placeholder,
[data-theme="dark"] .admin-content textarea::placeholder{ color:#777; }
/* admin.js 内联写死的深色语义文字/浅黄提示条，暗底下提亮 */
[data-theme="dark"] .admin-content label,
[data-theme="dark"] .admin-content [style*="color:#666"],
[data-theme="dark"] .admin-content [style*="color: #666"]{ color:var(--d-text2) !important; }
[data-theme="dark"] .admin-content [style*="color:#2e7d32"]{ color:#66bb6a !important; }
[data-theme="dark"] .admin-content [style*="color:#1565c0"]{ color:#66b1ff !important; }
[data-theme="dark"] .admin-content [style*="color:#e65100"]{ color:#ffa94d !important; }
[data-theme="dark"] .admin-content [style*="color:#c62828"]{ color:var(--d-red) !important; }
[data-theme="dark"] .admin-content [style*="color:#795548"]{ color:#e0c08a !important; }
[data-theme="dark"] .admin-content [style*="background:#fff8e1"],
[data-theme="dark"] .admin-content [style*="background: #fff8e1"]{ background:#332a18 !important; color:#e0c08a !important; }
[data-theme="dark"] .admin-content [style*="background:#fff8e1"] *,
[data-theme="dark"] .admin-content [style*="background: #fff8e1"] *{ color:#e0c08a !important; }
[data-theme="dark"] .admin-content [style*="background:#fff3e0"],
[data-theme="dark"] .admin-content [style*="background: #fff3e0"]{ background:#3a2415 !important; color:#e0b08a !important; }
[data-theme="dark"] .admin-content [style*="background:#fff3e0"] *,
[data-theme="dark"] .admin-content [style*="background: #fff3e0"] *{ color:#e0b08a !important; }

/* 后台仪表盘 7天发帖趋势图（修复柱高溢出 + 暗黑适配） */
.admin-chart-card{ background:#fff; padding:20px; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.admin-chart-title{ margin:0 0 12px; font-size:16px; color:#333; }
.admin-chart-wrap{ display:flex; align-items:flex-end; gap:12px; height:150px; }
.admin-chart-col{ flex:1; text-align:center; display:flex; flex-direction:column; justify-content:flex-end; height:100%; min-width:0; }
.admin-chart-bar{ background:#c62828; border-radius:4px 4px 0 0; min-height:4px; }
.admin-chart-date{ font-size:12px; color:#888; margin-top:4px; }
.admin-chart-num{ font-size:12px; color:#666; }
[data-theme="dark"] .admin-chart-card{ background:var(--d-surface); box-shadow:0 1px 3px rgba(0,0,0,.4); }
[data-theme="dark"] .admin-chart-title{ color:var(--d-text); }
[data-theme="dark"] .admin-chart-date{ color:var(--d-text3); }
[data-theme="dark"] .admin-chart-num{ color:var(--d-text2); }
/* 统一居中确认/提示弹窗（替代原生 confirm/alert） */
.ui-modal-mask{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:10001; display:flex; align-items:center; justify-content:center; }
.ui-modal-box{ width:380px; max-width:86vw; background:#fff; border-radius:8px; box-shadow:0 8px 30px rgba(0,0,0,.22); overflow:hidden; font-size:15px; }
.ui-modal-title{ padding:16px 20px 6px; font-size:16px; font-weight:bold; color:#333; }
.ui-modal-msg{ padding:6px 20px 18px; color:#555; line-height:1.7; max-height:50vh; overflow:auto; word-break:break-word; }
.ui-modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:12px 20px 16px; }
.ui-modal-btn{ padding:7px 22px; border-radius:4px; font-size:14px; cursor:pointer; border:1px solid #ddd; background:#fff; color:#555; }
.ui-modal-btn.ui-modal-ok{ background:#c62828; border-color:#c62828; color:#fff; }
.ui-modal-btn.ui-modal-ok:hover{ background:#b32222; }
.ui-modal-btn.ui-modal-cancel:hover{ border-color:#c62828; color:#c62828; }
[data-theme="dark"] .ui-modal-box{ background:#1f1f1f; box-shadow:0 8px 30px rgba(0,0,0,.5); }
[data-theme="dark"] .ui-modal-title{ color:#e6e6e6; }
[data-theme="dark"] .ui-modal-msg{ color:#b3b3b3; }
[data-theme="dark"] .ui-modal-btn{ background:#282828; border-color:#3a3a3a; color:#b3b3b3; }
[data-theme="dark"] .ui-modal-btn.ui-modal-ok{ background:#c62828; border-color:#c62828; color:#fff; }
[data-theme="dark"] .ui-modal-btn.ui-modal-cancel:hover{ border-color:#ff7a7a; color:#ff7a7a; }.ui-modal-input{ display:block; width:calc(100% - 40px); margin:0 20px 4px; padding:8px 10px; border:1px solid #ddd; border-radius:4px; font-size:14px; box-sizing:border-box; outline:none; }
.ui-modal-input:focus{ border-color:#c62828; }
[data-theme="dark"] .ui-modal-input{ background:#282828; border-color:#3a3a3a; color:#e6e6e6; }

/* 后台详情弹窗（交易担保寄售详情等） */
.admin-modal-mask{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:10002; display:flex; align-items:center; justify-content:center; padding:24px; }
.admin-modal-box{ width:680px; max-width:94vw; max-height:86vh; display:flex; flex-direction:column; background:#fff; border-radius:8px; box-shadow:0 8px 30px rgba(0,0,0,.18); overflow:hidden; }
.admin-modal-head{ display:flex; justify-content:space-between; align-items:center; padding:14px 20px; border-bottom:1px solid #f0f0f0; font-size:16px; font-weight:bold; color:#333; }
.admin-modal-x{ cursor:pointer; font-size:22px; line-height:1; color:#999; }
.admin-modal-x:hover{ color:#c62828; }
.admin-modal-body{ padding:10px 20px; overflow-y:auto; }
.admin-modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:12px 20px; border-top:1px solid #f0f0f0; }
.adm-dl-group{ margin:14px 0 6px; font-size:13px; font-weight:bold; color:#c62828; border-left:3px solid #c62828; padding-left:8px; }
.adm-dl-group:first-child{ margin-top:2px; }
.adm-dl-row{ display:flex; font-size:14px; padding:6px 0; border-bottom:1px dashed #f2f2f2; }
.adm-dl-k{ width:120px; flex:none; color:#888; }
.adm-dl-v{ flex:1; color:#333; word-break:break-all; }
.adm-dl-v em{ color:#bbb; font-style:normal; }
.adm-dl-sensitive{ color:#c62828; font-weight:600; }
/* 角色转移预检：目标账号密保双列紧凑排布（仅作用于预检块，不影响密保弹窗） */
.tf-secret{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:32px; row-gap:0; margin-top:2px; }
.tf-secret .adm-dl-group{ grid-column:1 / -1; margin-top:10px; }
.tf-secret .adm-dl-row{ padding:5px 0; }
.tf-secret .adm-dl-k{ width:96px; }
@media (max-width:960px){ .tf-secret{ grid-template-columns:1fr; } }
[data-theme="dark"] .tf-secret .adm-dl-row{ border-bottom-color:#2c2c2c; }
/* 角色转移预检：源账号密保(左) / 目标账号密保(右) 并排两卡片，字段单列 */
.tf-secret-pair{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:12px; }
.tf-secret-card{ background:#fff; border:1px solid #e0e0e0; border-radius:4px; padding:10px 12px; min-width:0; }
.tf-secret-card .tf-secret-title{ font-weight:bold; font-size:13px; margin-bottom:6px; color:#333; }
.tf-secret-card .adm-dl-k{ width:84px; }
@media (max-width:960px){ .tf-secret-pair{ grid-template-columns:1fr; } }
[data-theme="dark"] .tf-secret-card{ background:#262626; border-color:#3a3a3a; }
[data-theme="dark"] .tf-secret-card .tf-secret-title{ color:#ddd; }
[data-theme="dark"] .admin-modal-box{ background:#1f1f1f; box-shadow:0 8px 30px rgba(0,0,0,.5); }
[data-theme="dark"] .admin-modal-head{ color:#e6e6e6; border-bottom-color:#333; }
[data-theme="dark"] .admin-modal-foot{ border-top-color:#333; }
[data-theme="dark"] .adm-dl-row{ border-bottom-color:#2c2c2c; }
[data-theme="dark"] .adm-dl-k{ color:#888; }
[data-theme="dark"] .adm-dl-v{ color:#d6d6d6; }
[data-theme="dark"] .adm-dl-v em{ color:#666; }

/* 后台设置页版主/超级版主操作下拉（参考截图深色下拉风格） */
.mod-select-wrap{ position:relative; }
.mod-select-wrap::after{
  content:"▼"; position:absolute; right:12px; top:50%; transform:translateY(-50%);
  font-size:12px; color:#fff; pointer-events:none;
}
.mod-action-select{
  width:100%; appearance:none; -webkit-appearance:none; -moz-appearance:none;
  padding:11px 34px 11px 12px; border:none; border-radius:4px;
  background:#2c2c2c; color:#fff; font-size:15px; cursor:pointer; outline:none;
}
.mod-action-select option{ background:#2c2c2c; color:#fff; }
.mod-action-select:hover{ background:#3a3a3a; }
.mod-action-select:focus{ box-shadow:0 0 0 2px rgba(198,40,40,.35); }
[data-theme="dark"] .mod-action-select{ background:#1f1f1f; }
[data-theme="dark"] .mod-action-select:hover{ background:#2a2a2a; }
[data-theme="dark"] .mod-action-select option{ background:#1f1f1f; }
/* 用户管理操作列里的角色下拉：紧凑显示，避免撑满单元格 */
.admin-table .mod-action-select{ width:auto; min-width:92px; font-size:13px; padding:6px 28px 6px 10px; }
.admin-table .mod-action-select.role-cat{ min-width:104px; }
.admin-table td .role-set{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }