/* =================== Bootstrap 5.2 变量覆盖 =================== */
:root {
  --bs-primary: #111111;
  --bs-primary-rgb: 17, 17, 17;
  --bs-body-font-family: var(--font-family);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius);
  --bs-link-color: var(--text);
  --bs-link-decoration: none;
}
/* Bootstrap btn-primary 使用我们的品牌色 */
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #2d2d2d;
  --bs-btn-hover-border-color: #2d2d2d;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-focus-shadow-rgb: 17,17,17;
}
/* =================== 主题变量 =================== */
:root {
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --primary: #111111; /* 主色 */
  --mark: #3c68aa;
  --mark-bg:#e2ecff;
  --primary-50: rgba(0,110,255,0.06);
  --text: #111827;
  --muted: #6b7280;
  --danger: #ff4d4f;
  --border: #e6eaf0;
  --radius: 5px;
  --shadow: 0 8px 24px rgba(16,24,40,0.06);
  --max-width: 420px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --transition-fast: 150ms;
  --white: #fff;
  --text-strong: #0f172a;
  --text-subtle: #1f2937;
  --border-soft: #d7deea;
  --overlay-hover: rgba(0,0,0,.04);
  --overlay-text: rgba(0,0,0,.75);
  --navbar-offset: 76px;
}

/* 基本重置 */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

/* Content images fill their container; override for UI-specific small images */
img { width: 100%; }
.avatar-xs, .avatar-sm, .avatar-lg,
.search-user-avatar, .setting-avatar,
.author-card-avatar, .author-card-cover,
.post-meta-avatar,
.navbar img { width: auto; }

/* 页面布局 */
.page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* 登录/注册页专用 card 样式（不影响 Bootstrap .card）*/
.login-page .card,
.register-page .card {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card-title { margin: 0 0 14px 0; font-size: 20px; font-weight: 600; text-align: center; color: var(--text); }

/* 表单 */
.form { display: flex; flex-direction: column; }
.form-row { display:flex; flex-direction:column; margin-bottom: 12px; }
.label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* 输入框 */
.input {
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: #fff;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}

/* 错误提示 */
.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 8px 0; }

/* 按钮 — 与 Bootstrap .btn 兼容：只添加 flex 对齐，不覆盖颜色 */
.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
/* 自定义无变体按钮：仅 .btn-ghost 或无 Bootstrap 变体时显示灰色 */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 主要按钮 — 使用品牌色覆盖 Bootstrap 的 btn-primary */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #2d2d2d !important;
  border-color: #2d2d2d !important;
}
.link-muted { color: var(--muted); font-size: 14px; }
.form-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; }

/* 响应式 */
@media (max-width: 480px) {
  .card { padding: 18px; }
  .card-title { font-size: 18px; }
}

/* 无 JS 提示 */
.noscript-note {
  width: 100%;
  max-width: var(--max-width);
  margin: 12px auto;
  padding: 12px;
  background: #fff9f8;
  border: 1px solid #ffe6e0;
  color: var(--danger);
  border-radius: 6px;
}

/* 占位文字 */
.placeholder { color: var(--muted); font-size: 13px; }

/* Toastify 扁平样式覆盖（简短说明） */
.toast-flat {
  padding: 6px 10px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}
.toast-flat .toastify-content,
.toast-flat .toastify {
  padding: 6px 10px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-size: 13px !important;
}
.toast-flat button { font-size: 12px !important; padding: 2px 6px !important; }

/* 吐司内对齐辅助（SVG 或文本） */
.toast-node { display: inline-flex; align-items: center; }
.toast-node svg { display: inline-block; vertical-align: middle; width: 16px; height: 16px; }
.fallback-toast .toast-node { color: #fff; }

/* =================== 导航栏（Bootstrap navbar 兼容） =================== */

/* Bootstrap navbar overrides - keep our fixed topbar styling */
.topbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 64px;
}

/* Bootstrap 的 navbar-collapse 在移动端展开时需要背景 */
.topbar .navbar-collapse {
  background: #fff;
}

@media (max-width: 991.98px) {
  .topbar .navbar-collapse.show,
  .topbar .navbar-collapse.collapsing {
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
}

.topbar-inner {
  height: 64px;
}

/* 搜索框最大宽度 */
.topbar-search {
  max-width: 520px;
}

@media (max-width: 991.98px) {
  .topbar-search {
    max-width: 100%;
  }
}

/* 搜索输入框圆角 */
.topbar-search-input {
  border-right: 0;
}

.topbar-search-btn {
  border-radius: 0 999px 999px 0 !important;
}

/* 左侧 */

.logo {
  display: flex;
  align-items: center;
  height: 40px;
}

.logo-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-svg svg {
  height: 32px;
  width: auto;
  display: block;
}

.nav-home {
  font-size: 15px;
  color: var(--muted);
}


.nav-item {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 4px;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-item:hover {
  color: var(--text);
}


/* Legacy topbar search styles - now handled by Bootstrap input-group + overrides above */
/* These are kept for compatibility but Bootstrap styles take precedence via .topbar-search-input and .topbar-search-btn */

.topbar-search-input:focus {
  border-color: #3b82f6;
}

.topbar-search-btn {
  height: 38px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.topbar-search-btn i { font-size: 16px; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#auth-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 发帖 */

.nav-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 36px;
  padding: 0 14px;

  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;

  transition: opacity 0.15s;
}

.nav-action i {
  font-size: 16px;
}

.nav-action:hover {
  opacity: 0.9;
}

/* 消息 */

.nav-icon {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 50%;
  transition: background 0.15s;
  color: var(--text);
}

.nav-icon i {
  font-size: 18px;
}

.nav-icon:hover {
  background: var(--primary-50);
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;

  background: var(--danger);
  color: #fff;

  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* 登录注册 */

.auth-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 小号按钮 */

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
}

/* 用户信息 */

.user-entry {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-entry span {
  font-size: 14px;
  font-weight: 500;
}

.user-dropdown {
  position: relative;
}

#user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  padding: 6px 0;
  display: none;
  z-index: 2000;
}

.dropdown-menu.show {
  display: block;
}

/* 菜单项 */
.dropdown-item {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
  text-align: center;   /* ✅ 居中 */
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--primary-50);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ======================
   消息下拉框
   ====================== */

/* 防止 header 裁剪下拉框 */
.topbar,
.topbar-inner,
.topbar-right {
  overflow: visible;
}

/* 让下拉框相对铃铛定位 */
.msg-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* 下拉框：与铃铛垂直对齐（以铃铛中心为基准） */
.msg-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);

  width: 360px;
  max-height: 520px;

  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);

  display: none;
  overflow: hidden;
  z-index: 99999;
}

.msg-dropdown.show { display: block; }

/* Tabs：居中 + 短条指示 */
.msg-tabs {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.msg-tab {
  position: relative;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.msg-tab.has-unread::before {
  content: "";
  position: absolute;
  top: 2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
}

.msg-tab.active {
  color: var(--text);
  font-weight: 600;
}

.msg-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 3px;
  border-radius: 10px;
  background: var(--primary);
  transform: translateX(-50%);
}

/* 列表 */
.msg-list {
  max-height: 420px;
  overflow-y: auto;
}

/* 单条消息：两行结构（上：内容+删除；下：时间） */
.msg-item {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.msg-item:last-child {
  border-bottom: none;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

/* 内容：允许换行，删除按钮永远在右侧 */
.msg-text {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
  font-size: 14px;
  word-break: break-word;
}

/* 未读：加粗 */
.msg-item.unread .msg-text {
  color: var(--text);
}

/* 已读：浅色 */
.msg-item.read .msg-text {
  font-weight: 400;
  color: var(--muted);
}

/* 可点击链接的强调（点赞者/内容） */
.msg-link {
  color: inherit;
  text-decoration: none;
}

.msg-link:hover {
  text-decoration: underline;
}

/* 删除：图标按钮 */
.msg-del {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.msg-del i {
  font-size: 16px;
}

.msg-del:hover {
  background: var(--primary-50);
  color: var(--text);
}

/* 时间：始终在下一行左侧 */
.msg-time {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* 空状态 */
.msg-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Footer：查看更多纯文字*/
.msg-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.msg-more {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  padding: 6px 0;
}

.msg-more:hover {
  color: var(--text);
}

.msg-more.disabled {
  cursor: default;
  color: var(--border);
}


/****————————————————————————————————**/
.avatar-xs {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}


.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

/* .layout is now handled by Bootstrap container/row/col */
/* Keep for backward compat but override grid with Bootstrap */
.layout {
  padding-top: calc(var(--navbar-offset) + 8px);
  padding-bottom: 24px;
}

.sidebar-left,
.sidebar-right {
  height: fit-content;
}

.side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.feed .card {
  margin-bottom: 16px;
}

/* ======================
   左侧栏 Tab：居中 + 更精致
   ====================== */
.sidebar-left .side-card {
  padding: 14px;
}

.tab-btn {
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 10px;

  width: 100%;
  text-align: center;
  font-weight: 650;
  letter-spacing: .2px;
  background: #fff;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

/* 行内展示 tab 按钮（移动端水平排布，无底部间距） */
.tab-btn-inline { margin-bottom: 0; }

.tab-btn:hover {
  border-color: rgba(0,0,0,.18);
}

.tab-btn:active {
  transform: translateY(1px);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* ======================
   发微博卡片：深度美化（仅UI）
   ====================== */

/* 首页筛选 Tab：复用用户页 Tab 视觉风格 */
.home-filter-tabs{
  display: flex;
  gap: 22px;
  align-items: center;
  background: #fff;
  border-radius: 3px;
  padding: 0 20px;
  margin-bottom: 10px;
  border: 1px solid #ececf4;
}

.home-filter-btn{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 2px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  position: relative;
}

.home-filter-btn:hover{
  color: #111827;
}

.home-filter-btn.active{
  color: #111827;
  font-weight: 600;
}

.home-filter-btn.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #111827;
  border-radius: 2px;
}

.memo-publish {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 3px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
  overflow: hidden;
}

.memo-publish textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
  padding: 12px 12px;
  resize: vertical;
  min-height: 96px;
  line-height: 1.65;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.memo-publish textarea:focus {
  background: #fff;
  border-color: rgba(0,0,0,.22);
  box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

.memo-toolbar .btn {
  border-radius: 10px;
}

/* ======================
   微博图片：按数量自适应
   - 1张：原比例缩放
   - 4张：2列
   - 其它：3列（九宫格）
   ====================== */

.memo-images {
  margin-top: 8px;
  gap: 1px;
}


/* 预览项（上传后的可拖拽） */

/* ======================
   发布微博：工具栏内预览（50%）+ icon上传按钮
   ====================== */

/* 工具栏：左侧区域（上传按钮/预览）+ 右侧发布按钮 */
.memo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}

.memo-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

/* 上传按钮：icon + 图片，无外边框 */
.memo-toolbar .mp-upload-btn {
  background: transparent !important;
  border: 0 !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--muted);
  gap: 6px;
}

.memo-toolbar .mp-upload-btn i {
  font-size: 18px;
  line-height: 1;
}

.memo-toolbar .mp-upload-btn span {
  font-size: 14px;
  font-weight: 600;
}

.memo-toolbar .mp-upload-btn:hover {
  background: rgba(0,0,0,.04) !important;
  color: rgba(0,0,0,.75);
}

/* 预览区：放在工具栏上方，保持原有配色 */
.memo-publish #memo-preview.memo-preview-grid {
  width: min(100%, 280px);
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
}

/* tile 通用 */
.memo-publish #memo-preview .mp-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.memo-publish #memo-preview .mp-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 删除 / 取消 */
.memo-publish #memo-preview .mp-del,
.memo-publish #memo-preview .mp-cancel {
  font-size: 20px;
    position: absolute;
    top: 1px;
    right: 1px;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    border: none;
    background: #0000007d;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 拖拽反馈 */
.memo-publish #memo-preview .mp-image.dragging {
  opacity: .8;
  transform: scale(.98);
}

/* “+” tile（仅有图后才会出现） */
.memo-publish #memo-preview .mp-add {
  cursor: pointer;
  background: #fff;
  transition: background 150ms, border-color 150ms, transform 80ms;
}

.memo-publish #memo-preview .mp-add:hover {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.30);
}

.memo-publish #memo-preview .mp-add:active {
  transform: translateY(1px);
}

.memo-publish #memo-preview .mp-add i {
  font-size: 22px;
  color: rgba(0,0,0,.55);
  line-height: 1;
}

/* 上传中骨架（无文字提示） */
.memo-publish #memo-preview .mp-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.04),
    rgba(0,0,0,.08),
    rgba(0,0,0,.04)
  );
  background-size: 200% 100%;
  animation: mpShimmer 1.2s infinite;
}

@keyframes mpShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ======================
   发动态：字数统计（右下角）
   ====================== */
.mp-textarea-wrap {
  position: relative;
}

/* 让右下角计数不挡住输入 */
.mp-textarea-wrap textarea {
  padding-bottom: 32px; /* 给 counter 留空间 */
}

.mp-char-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
  pointer-events: none;
}

.mp-char-counter.is-max {
  color: #e64646; /* 达到上限变红 */
}

/* ======================
   Tab/滚动区域
   ====================== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.load-tip {
  text-align: center;
  color: var(--muted);
  padding: 12px 0;
}

/* 全局空态 */
.empty-state{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:8px;
  padding:34px 16px;
  text-align:center;
}
.empty-state-img{ width:140px; max-width:60%; height:auto; opacity:.9; }
.empty-state-text{ margin-top:10px; font-size:14px; color:var(--muted); }

/* 全局列表骨架（微博/帖子通用） */
.list-skeleton{ display:grid; gap:12px; }
.list-skeleton .skeleton-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:8px;
  padding:16px;
  box-shadow:0 4px 14px rgba(0,0,0,.04);
}
.list-skeleton .sk-line{
  display:block;
  height:10px;
  border-radius:6px;
  background:linear-gradient(90deg,#f1f3f7 25%,#e8ebf2 37%,#f1f3f7 63%);
  background-size:400% 100%;
  animation: sk-shimmer 1.25s ease infinite;
}
.list-skeleton .sk-line + .sk-line{ margin-top:10px; }
.memo-list-skeleton .skeleton-card{ min-height:126px; }
.memo-list-skeleton .sk-line.t1{ width:40%; height:12px; }
.memo-list-skeleton .sk-line.t2{ width:92%; }
.memo-list-skeleton .sk-line.t3{ width:76%; }
.post-list-skeleton .skeleton-card{ min-height:88px; }
.post-list-skeleton .sk-line.t1{ width:68%; height:12px; }
.post-list-skeleton .sk-line.t2{ width:52%; }
@keyframes sk-shimmer {0%{background-position:100% 50%}100%{background-position:0 50%}}

/* 响应式 */
/* Bootstrap handles responsiveness for .layout now */
/* The d-none d-lg-block on sidebar columns handles hiding them on mobile */
@media (max-width: 1000px) {
  /* Keep for any elements that are still using these classes */
  .sidebar-left .side-card,
  .sidebar-right .side-card {
    /* visible via Bootstrap's d-none d-lg-block */
  }
}


.feed {
  position: relative;
  min-height: 600px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: block;
}

.feed-scroll {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================
   微博列表
   - 圆角 3px
   ====================== */
.memo-item {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 3px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
  /* 中文注释：允许三点菜单浮层越出卡片边界，避免被信息流卡片裁切。 */
  overflow: visible;
}

.memo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.memo-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.memo-user .avatar-sm {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.memo-user-info {
  min-width: 0;
  width: 100%;
}

/* 昵称与时间同一行 */
.memo-user-name {
  font-weight: 600;
  line-height: 1.5;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memo-created-at {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.memo-more {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 10px;
}

.memo-more:hover {
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.75);
}

.memo-body {
    margin: 10px 48px;
}

.memo-content {
  margin-top: 2px;
  line-height: 1.7;
  font-size: 14px;
  word-break: break-word;
}

/* 图片九宫格 */
.memo-images.memo-images-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 50%;
}

/* 4张：2x2 */
.memo-images.memo-images-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 36%;
}

/* 1张：原比例缩放，不强制正方形 */
.memo-images.memo-images-1 {
  display: block;
}

/* Fancybox 点击区域 */
.memo-img-link {
  display: block;
}

/* 多图缩略图：保持 1:1（更像 X / 微博） */
.memo-images.memo-images-2 img,
.memo-images.memo-images-3 img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* 单图：保持原始比例 */
.memo-images.memo-images-1 img {
  height: auto;
  max-height: 200px;
  max-width: 200px;
  object-fit: contain; /* 原比例展示 */
  display: block;
  border-radius: 2px;
}



.memo-actions {
 margin: 0 48px;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* 三等分：居中对齐 */
.memo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  width: 50%;
}

.memo-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.memo-comment {
  text-decoration: none;
  color: var(--muted);
}
.memo-comment:hover {
  color: rgba(0,0,0,.75);
}

/* 点赞：只点 icon+数字按钮；已赞变红 */
.memo-like-btn-inline {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  line-height: 1;
}

.memo-like-btn-inline:hover {
  color: rgba(0,0,0,.75);
}

.memo-like-btn-inline.is-liked {
  color: #e64646;
}

.memo-like-btn-inline[disabled] {
  cursor: not-allowed;
  opacity: .7;
}


/* ======================
   微博：三点菜单（仅 UI 预留）
   ====================== */
.memo-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 30;
}

.memo-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  padding: 6px 0;
  display: none;
  z-index: 9999;
}

.memo-more-menu.show {
  display: block;
}

.memo-more-item {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.memo-more-item:hover {
  background: var(--primary-50);
}

.memo-more-item.danger {
  color: var(--danger);
}

.memo-more-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ======================
   帖子列表：meta 行布局（发帖时间 + 回帖信息同排）
   ====================== */
.posts-wrap{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:3px;
  /* 中文注释：帖子列表中的菜单需要跨行显示，容器不能裁切浮层。 */
  overflow:visible;
}

.post-row{
  position: relative;
  padding:20px 30px;
  border-bottom:1px solid rgba(0,0,0,.06);
  /* 中文注释：允许当前行菜单覆盖下一行，避免被行容器遮挡。 */
  overflow:visible;
}
.post-row:last-child{ border-bottom:none; }

.posts-wrap .post-title{
  display:block;
  font-size:16px;
  line-height:1.35;
  margin-bottom:8px;
}

.post-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.post-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1;
  flex-wrap:nowrap;
  font-size: 12px;
}

.post-author{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.post-nickname{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:180px;
}

.post-time{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.post-dot{
  color:var(--muted);
  font-size:12px;
  line-height:1;
  flex:0 0 auto;
}

.posts-wrap .post-reply-inline{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.posts-wrap .post-reply-inline i{
  font-size:12px;
  line-height:1;
  flex:0 0 auto;
}

.posts-wrap .post-reply-inline .reply-user{
  color:inherit;
  text-decoration:none;
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.posts-wrap .post-reply-inline .reply-user:hover{
  color:rgba(0,0,0,.75);
  text-decoration:underline;
}

.posts-wrap .post-reply-inline .reply-time{
  white-space:nowrap;
  flex:0 0 auto;
}

.post-right{
  display:inline-flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.post-stat{ white-space:nowrap; }



/** 用户主页 _______________________________________________ **/

/* =========================
   User Page (append to main.css)
   ========================= */

/* ✅ navbar 占位：参考首页的“内容不顶到顶部”效果 */
.user-page .user-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--navbar-offset) 16px 16px;
}

/* Hero / Cover */
.user-page .user-hero{
  margin-top: 12px;
}

.user-page .user-cover{
  position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
    display: flex;
  background: linear-gradient(135deg, #111827, #1f2937);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.user-page .user-cover-mask{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 38%),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.12), transparent 42%),
    linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.18));
}

.user-page .user-hero-inner{
position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    padding: 18px;
    width: 100%;
}

.user-page .user-hero-left{
  display: flex;
  gap: 14px;
  align-items: center;
}

.user-page .user-avatar-wrap{
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 18px;
  padding: 4px;
  background: rgba(255,255,255,0.10);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  flex: 0 0 auto;
}

.user-page .user-avatar{
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255,255,255,0.15);
  display: block;
}

.user-page .user-meta{
  color: #fff;
  min-width: 0;
}

.user-page .user-name-row{
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.user-page .user-nickname{
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  max-width: 680px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-page .user-username{
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  flex: 0 0 auto;
}

.user-page .user-signature{
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.86);
  max-width: 680px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.user-page .user-subinfo{
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}

.user-page .user-subitem-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.user-page .user-subitem-btn:hover{
  color: rgba(255,255,255,0.96);
}

.user-page .relation-row{
  background: #fff;
  border-bottom: 1px solid #eef1f6;
}

.user-page .relation-row:last-child{
  border-bottom: none;
}

.user-page .relation-meta-row{
  min-height: 56px;
}

.user-page .relation-left{
  gap: 10px;
  align-items: center;
}

.user-page .relation-avatar-link{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.user-page .relation-avatar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-page .relation-main{
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.user-page .relation-name-link{
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-page .relation-name-link:hover{
  text-decoration: underline;
}

.user-page .relation-signature{
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Layout */
/* user-layout now uses Bootstrap row/col */
.user-page .user-layout{
  /* Bootstrap container/row handles layout */
}

/* 中文注释：用户主页 tabs 采用黑白扁平风格，降低样式复杂度并保持清晰选中态。 */
.user-page .user-tabs{
  display: flex;
  gap: 20px;
  align-items: center;
  background: #fff;
  border-radius: 3px;
  padding: 0 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #d1d5db;
}

.user-page .user-tab-btn{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 2px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  position: relative;
}

.user-page .user-tab-btn:hover{
  color: #111111;
}

.user-page .user-tab-btn.active{
  color: #111111;
  font-weight: 600;
}

.user-page .user-tab-btn.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #111111;
  border-radius: 2px;
}

.user-page .tab-panel{ display: none; }
.user-page .tab-panel.active{ display: block; }

/* ✅ 列表区域：居左 + 不占满整行（fit-content） */
.user-page .user-main{
  text-align: left; /* 确保 inline-block 靠左 */
  min-width: 0;
}

.user-page .load-tip{
  color: #8a8fa3;
  padding: 10px 0;
  text-align: center;
}

/* Right cards（✅去重：只保留这一份，并限定 user-page 作用域） */
.user-page .user-aside{
  position: sticky;
  top: calc(var(--navbar-offset) + 12px);
  align-self: start;
}

.user-page .user-aside .side-card{
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(17,24,39,0.05);
  margin-bottom: 14px;
}

.user-page .side-card-title{
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #111827;
}

.user-page .side-kv{
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #f0f1f6;
}

.user-page .side-kv:last-child{ border-bottom: none; }

.user-page .side-k{
  color: #6b7280;
  font-size: 12px;
}

.user-page .side-v{
  color: #111827;
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.user-page .user-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.user-page .stat{
  border: 1px solid #f0f1f6;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  background: #fafbff;
}

.user-page .stat-num{
  font-weight: 700;
  font-size: 16px;
  color: #111827;
}

.user-page .stat-label{
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.user-page .side-tip{
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #8a8fa3;
}


.user-page .user-profile-tab-card{
  margin-bottom: 0;
}

.user-page .status-ok{ color:#16a34a; font-weight:600; }
.user-page .status-bad{ color:#dc2626; font-weight:600; }


.user-page .side-card-title-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.user-page .social-card-list{
  display:grid;
  gap:10px;
}

.user-page .social-card-item{
  display:grid;
  grid-template-columns: 26px 1fr;
  gap:10px;
  align-items:flex-start;
  padding:8px 10px;
  border:1px solid #eef0f6;
  border-radius:10px;
  background:#fafbff;
}

.user-page .social-card-icon{
  width:26px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.user-page .social-card-label{
  font-size:12px;
  color:#6b7280;
  margin-bottom:2px;
}

.user-page .social-card-value{
  font-size:13px;
  color:#111827;
  word-break:break-all;
}

.user-page .social-card-link{
  color:#2563eb;
  text-decoration:none;
}

.user-page .social-card-link:hover{
  text-decoration:underline;
}

/* 中文注释：推荐关注卡片采用黑白主风格，按钮延续站内主按钮样式。 */
.user-page .recommend-follow-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.user-page .recommend-follow-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border:1px solid #e6e8ef;
  border-radius:10px;
  background:#fafbff;
}

.user-page .recommend-follow-user{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:inherit;
}

.user-page .recommend-follow-avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 auto;
  background:#eef2ff;
}

.user-page .recommend-follow-meta{
  min-width:0;
}

.user-page .user-avatar-wrap .verified-avatar-v{
  right:0;
  bottom:0;
  transform:translate(16%,16%);
  width:18px;
  height:18px;
  font-size:11px;
}

.user-page .side-v-verify{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
}

.user-page .side-v-verify .verified-avatar-v{
  position:static;
  transform:none;
  flex:0 0 auto;
  width:14px;
  height:14px;
  font-size:10px;
}

.user-page .recommend-follow-user .verified-avatar-wrap{
  flex:0 0 auto;
}

.user-page .recommend-follow-name{
  margin:0;
  font-size:16px;
  color:#111827;
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.user-page .recommend-follow-role{
  margin:2px 0 0;
  font-size:12px;
  color:#6b7280;
}

.user-page .recommend-follow-btn{
  flex:0 0 auto;
  white-space:nowrap;
}

.user-page .recommend-follow-btn.is-followed{
  background:#e5e7eb;
  border-color:#d1d5db;
  color:#374151;
}

.user-page .asset-tabs{
  display:flex;
  gap:16px;
  border-bottom:1px solid #d1d5db;
  margin-bottom:10px;
  padding-bottom:6px;
}

.user-page .asset-tab-btn{
  appearance:none;
  border:0;
  background:transparent;
  color:#6b7280;
  padding:6px 0;
  cursor:pointer;
  position:relative;
}

.user-page .asset-tab-btn.active{
  color:#111111;
  font-weight:600;
}

.user-page .asset-tab-btn.active::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-7px;
  height:2px;
  border-radius:2px;
  background:#111111;
}

.user-page .asset-panel{ display:none; }
.user-page .asset-panel.active{ display:block; }
.user-page #point-exchange-input,
.user-page #gold-recharge-input{ width:100%; }
.user-page .asset-balance{ margin:0 0 10px 0; color:#111827; }
.user-page .asset-action-btn{ width:100%; margin-top:10px; }

.user-page #gold-list{ max-height:280px; overflow:auto; }
.user-page #gold-list-more{ width:100%; }

.user-page .side-links{
  display: grid;
  gap: 8px;
}

.user-page .side-link{
  display: block;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #f0f1f6;
  background: #fafbff;
  color: #111827;
}

.user-page .side-link:hover{
  background: #f3f5ff;
}

/* Responsive - user-layout now uses Bootstrap, only keep non-layout responsive rules */
@media (max-width: 980px){
  /* 窄屏：hero 自动换行，避免挤压 */
  .user-page .user-hero-inner{
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .user-page .user-nickname{
    max-width: 100%;
  }

  .user-page .user-signature{
    max-width: 100%;
  }

  .user-page .user-feed-card{
    max-width: 100%;
  }
}

/* 关注按钮 */
.user-page .user-follow-btn{
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.10);
  cursor: pointer;
}

.user-page .user-follow-btn:hover{
  background: rgba(255,255,255,0.16);
}

.user-page .user-follow-btn.is-following{
  border-color: rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.18);
}


.user-page .user-follow-btn.is-disabled,
.user-page .user-follow-btn:disabled{
  opacity: 0.72;
  cursor: not-allowed;
}

.user-page .user-follow-btn.is-disabled:hover,
.user-page .user-follow-btn:disabled:hover{
  background: rgba(255,255,255,0.10);
}

/* Skeleton */
.user-page .sk{
  background: linear-gradient(90deg, #f2f3f8 25%, #e9ebf5 37%, #f2f3f8 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
  border-radius: 6px;
}
@keyframes sk{
  0%{ background-position: 100% 0; }
  100%{ background-position: 0 0; }
}
.user-page .sk-text{ height: 12px; border-radius: 6px; }
.user-page .sk-text.lg{ height: 16px; }
.user-page .sk-text.sm{ height: 10px; }
.user-page .user-hero.is-skeleton .user-avatar{ opacity: 0; }
.user-page .user-hero.is-skeleton .user-nickname,
.user-page .user-hero.is-skeleton .user-username,
.user-page .user-hero.is-skeleton .user-signature{ color: transparent; }


/* ===== User hero dark skeleton (only for cover area) ===== */
.user-page .sk-hero{
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.08) 25%,
    rgba(255,255,255,0.16) 37%,
    rgba(255,255,255,0.08) 63%
  );
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite; /* 复用你已有 @keyframes sk */
  border-radius: 6px;
}

.user-page .sk-hero-text{ height: 12px; border-radius: 6px; }
.user-page .sk-hero-text.lg{ height: 16px; }
.user-page .sk-hero-text.sm{ height: 10px; }

/* 我的主页附加交互样式 */
.my-page .my-edit-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.my-page .my-invite-list{
  list-style:none;
  margin:10px 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.my-page .my-invite-list li{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:13px;
}
.my-page .my-invite-list small{ color:var(--muted); }
.my-page .my-invite-list .invite-actions{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.my-page .my-invite-list .invite-code{
  word-break:break-all;
}

.my-page .my-avatar-wrap{ position:relative; }
.my-page .avatar-edit-btn{
  position:absolute;left:50%;transform:translateX(-50%);bottom:8px;
  font-size:12px;color:#fff;background:rgba(0,0,0,.45);padding:2px 8px;border-radius:10px;cursor:pointer;display:none;
}
.my-page .my-avatar-wrap:hover .avatar-edit-btn{ display:inline-block; }
.my-page .cover-edit-btn{
  position:absolute;right:12px;top:10px;z-index:3;color:#fff;background:rgba(0,0,0,.35);
  width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;
}
.my-page .cover-edit-btn .iconfont{font-size:16px;}
.my-page .btn-link-edit{
  border:none;background:transparent;color:#4f46e5;cursor:pointer;font-size:12px;margin-left:8px;padding:0;
}
.my-page .side-v{display:flex;align-items:center;justify-content:space-between;gap:8px;}

.my-page .avatar-edit-btn{
  width:28px;height:28px;display:none;align-items:center;justify-content:center;
  border-radius:50%;background:rgba(0,0,0,.45);color:#fff;cursor:pointer;
}
.my-page .avatar-edit-btn .iconfont{font-size:14px;}
.my-page .sig-edit-btn,
.my-page .btn-link-edit{
  border:none;background:transparent;color:#dbeafe;cursor:pointer;padding:0;line-height:1;
}
.my-page .sig-edit-btn .iconfont,
.my-page .btn-link-edit .iconfont{font-size:13px;}
.my-page .sig-edit-btn{margin-left:8px;color:rgba(255,255,255,.9);}
.my-page #up-side-account-status.is-ok{color:#16a34a;font-weight:600;}
.my-page .side-v{display:flex;align-items:center;justify-content:space-between;gap:8px;}



/* 中文注释：Layer 统一改造为 coolnav 风格皮肤，兼顾登录/编辑/确认弹框的一致体验。 */
.bbs-layer.layui-layer{
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 18px 42px rgba(17,17,17,.24);
  top:150px !important;
}
.bbs-layer .layui-layer-title{
  font-weight:600;
  background:#fff;
  border-bottom:none;
  font-size:16px;
  height:auto;
  line-height:1.2;
  padding:18px 24px 8px;
  color:#3f3f3f;
}
.bbs-layer .layui-layer-setwin{ top:10px; right:10px; }
.bbs-layer .layui-layer-content{ padding:0 !important; background:#fff; overflow:hidden !important; }
.bbs-layer .layui-layer-prompt{ padding:14px 24px 6px; }
.bbs-layer .layui-layer-prompt .layui-layer-input,
.bbs-layer .layui-layer-prompt textarea.layui-layer-input{
  border:1px solid #ececec;
  border-radius:6px;
  background:#f9f9f9;
  color:#161616;
  padding:11px 12px;
  min-height:44px;
}
.bbs-layer .layui-layer-prompt .layui-layer-input:focus,
.bbs-layer .layui-layer-prompt textarea.layui-layer-input:focus{
  border-color:#5b5b5b;
  box-shadow:0 0 0 3px #efefef;
}
.bbs-layer .layui-layer-btn{
  margin:0;
  padding:10px 24px 18px;
  border-top:none;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.bbs-layer .layui-layer-btn a{
  margin:0 !important;
  border-radius:5px;
  height:38px;
  line-height:38px;
  padding:0 20px;
  border:1px solid #e0e0e0;
  background:#fff;
  color:#606266;
  font-size:14px;
}
.bbs-layer .layui-layer-btn .layui-layer-btn0{ background:#3f3f3f; border-color:#3f3f3f; color:#fff; }
.bbs-layer .layui-layer-btn .layui-layer-btn1{ background:#fff; color:#606266; }

.bbs-layer-body{ padding:20px 20px 10px; }
.bbs-layer-title{ margin:0 0 14px; font-size:18px; font-weight:600; color:var(--text); }
.bbs-memo-editor-textarea{ width:100%; border:1px solid var(--border-soft); border-radius:12px; outline:none; padding:11px 12px; font-size:14px; color:var(--text); background:var(--white); resize:none; min-height:130px; }
.bbs-memo-editor-textarea:focus{ border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.12); }

/* 中文注释：确认框按钮视觉调整为“左取消，右确认” */
.bbs-layer--confirm .layui-layer-btn{ justify-content:space-between; }
.bbs-layer--confirm .layui-layer-btn .layui-layer-btn0{ order:2; }
.bbs-layer--confirm .layui-layer-btn .layui-layer-btn1{ order:1; }

.bbs-layer--memo-editor .layui-layer-content{ background:var(--bg); }

/* 中文注释：购买确认弹框使用独立皮肤，增强标题与正文层级，保证全站一致视觉。 */
.bbs-layer--purchase .layui-layer-title{height:auto;line-height:1.4;padding:14px 18px;border-bottom:1px solid #eef2f7;font-size:16px;font-weight:600;color:var(--text-strong);background:linear-gradient(180deg,#f8fbff,var(--white));}
.bbs-layer--purchase .layui-layer-content{padding:20px 18px !important;font-size:15px;color:var(--text-subtle);line-height:1.75;background:var(--white);}
.bbs-layer--purchase .layui-layer-btn{padding:10px 18px 16px;}
.bbs-memo-editor .mp-textarea-wrap{ position:relative; }
.bbs-memo-editor .bbs-memo-editor-textarea{ min-height:130px; background:var(--white); padding-bottom:30px; }
.bbs-memo-editor .bbs-memo-editor-preview{ margin-top:12px; }
.bbs-memo-editor .bbs-memo-editor-toolbar{ display:flex; align-items:center; gap:10px; margin:12px 0 2px; }
.bbs-memo-editor .mp-upload-btn{ border-radius:10px; }
.my-layer-skin .layui-layer-content{padding:0!important;}
.my-edit-popup{padding:20px 22px 14px;}
.my-edit-title{font-size:18px;font-weight:600;color:#111827;}
.my-edit-tip{margin-top:8px;color:#6b7280;font-size:13px;}
.my-edit-input-wrap{margin-top:16px;border:1px solid #e5e7eb;border-radius:12px;padding:0 12px;display:flex;align-items:center;gap:8px;}
.my-edit-input-wrap .iconfont{color:#9ca3af;}
.my-edit-input{border:none;outline:none;height:44px;flex:1;font-size:14px;background:transparent;}
.my-edit-textarea{margin-top:14px;width:100%;height:120px;border:1px solid #e5e7eb;border-radius:12px;padding:12px;outline:none;resize:none;font-size:14px;}

/* 话题展示 */
.topic-link {
  color: var(--mark);
  text-decoration: none;
}
.topic-link:hover {
  text-decoration: underline;
}
.memo-topic,
.post-topic {
  margin-top: 8px;
  font-size: 13px;
}

/* 话题详情布局 - now uses Bootstrap container/row */
.topic-page .topic-wrap{
  /* Bootstrap container handles layout */
}

.topic-page .topic-hero{
    background: #ffffff;
    border: 1px solid #ececf4;
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
    padding: 20px;
}

.topic-page .topic-hero-inner{
  display: flex;
  align-items: center;
  gap: 16px;
}

.topic-page .topic-icon{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--mark-bg);
  color:var(--mark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  flex: 0 0 auto;
}

.topic-page .topic-meta{
  min-width: 0;
}

.topic-page .topic-hero-inner h1{
  margin: 0;
  font-size: 20px;
  color: var(--mark);
  font-weight: 500;
}

.topic-page .topic-stats {
     color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

/* topic-layout now uses Bootstrap row/col */
.topic-page .topic-layout{
  /* Bootstrap handles the grid */
}


.topic-page .topic-main{
  min-width: 0;
}

.topic-page .topic-main .topic-hero{
  margin-bottom: 10px;
}

.topic-page .topic-tabs{
  display: flex;
  gap: 22px;
  align-items: center;
  border-radius: 3px;
  margin-top: 14px;
}

.topic-page .topic-tab-btn{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 2px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  position: relative;
}

.topic-page .topic-tab-btn.active{
  color: #111827;
  font-weight: 600;
}

.topic-page .topic-tab-btn.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #111827;
  border-radius: 2px;
}

.topic-page .tab-panel{ display: none; }
.topic-page .tab-panel.active{ display: block; }

.topic-page .topic-aside{
  position: sticky;
  top: calc(var(--navbar-offset) + 12px);
  align-self: start;
}

.topic-page .topic-aside .side-card{
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(17,24,39,0.05);
  margin-bottom: 14px;
}

.topic-page .side-card-title{
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
}

.topic-page .side-tip{
  margin: 0;
  font-size: 12px;
  color: #8a8fa3;
  line-height: 1.7;
}


@media (max-width: 1180px){
  .topic-page .topic-layout{
    grid-template-columns: 1fr;
  }

  .topic-page .topic-aside{
    grid-column: auto;
    position: static;
  }
}

@media (max-width: 980px){
  /* topic-layout now uses Bootstrap col-lg-4/col-lg-8, no need to override grid */
  .topic-page .topic-aside{
    position: static;
  }
}

@media (max-width: 680px){
  .memo-toolbar {
    flex-wrap: wrap;
  }
  .memo-toolbar-left {
    width: 100%;
    flex-wrap: wrap;
  }
  .memo-publish #memo-preview.memo-preview-grid {
    width: 100%;
    order: 3;
  }
  .topic-page .topic-hero-inner h1 {
    font-size: 28px;
  }
  .topic-page .topic-stats {
    font-size: 16px;
  }
}

.memo-toolbar .mp-topic-btn {
  display: inline-flex;
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.memo-toolbar .mp-topic-btn:hover {
  background: rgba(0,0,0,.04) !important;
  color: rgba(0,0,0,.75);
}


.post-more-wrap{position:relative;display:inline-flex;align-items:center;}
.post-more{border:0;background:transparent;cursor:pointer;color:var(--muted);padding:4px 8px;border-radius:8px;}
.post-more:hover{background:var(--overlay-hover);color:var(--overlay-text);}
.post-more-menu{position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);width:150px;background:var(--white);border:1px solid var(--border);border-radius:10px;box-shadow:0 16px 40px rgba(0,0,0,0.12);padding:6px 0;display:none;z-index:9999;}
.post-more-menu.show{display:block;}
.post-more-item{width:100%;display:block;border:0;background:transparent;padding:10px 12px;text-align:center;font-size:14px;color:var(--text);cursor:pointer;}
.post-more-item:hover{background:var(--primary-50);}
.post-more-item.danger{color:var(--danger);}

/* =================== 详情页（帖子/微博） =================== */
/* post/memo detail page now uses Bootstrap grid */
.post-detail-page {
  /* Bootstrap container handles layout, just add padding */
}
.post-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.post-card,
.post-comment-card,
.post-side-card,
.memo-card,
.memo-comments-card,
.author-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e9edf5;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}
.post-card { padding: 28px 32px 24px; }
.post-card .post-title { margin: 0; font-size: 26px; line-height: 1.45; color: #1a1f36; word-break: break-word; }
.post-meta { margin-top: 16px; padding: 14px 0 12px; border-top: 1px solid #f1f4fa; border-bottom: 1px solid #f1f4fa; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.post-meta-left { display:flex; align-items:center; gap:10px; min-width:0; }
.post-meta-avatar { width: 32px; height: 32px; border-radius: 50%; }
.post-meta-main { min-width: 0; }
.post-meta-author-line { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.post-meta-author { color: #22314f; font-weight: 600; }
.post-meta-signature { margin-top: 4px; color:#6b7280; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.post-meta-right { display:flex; align-items:center; gap:12px; margin-left:auto; }
.post-meta-stats { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; color:#6b7280; font-size:13px; }
.post-meta-time { color: #98a1b7; }
.post-content { margin-top: 20px; color: #2f3446; line-height: 1.85; font-size: 15px; word-break: break-word; }
.post-actions { margin-top:20px; display:flex; align-items:center; justify-content:center; gap:12px; }
.post-action-btn { border:1px solid #d9dfec; border-radius:20px; background:#fff; color:#5b637d; padding:7px 16px; font-size:13px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.post-action-btn:disabled { opacity: .55; }
.post-action-btn-xs { padding: 4px 10px; }
.post-like-btn { color: #5b637d; }
.post-like-btn i { font-size: 16px; }
.post-like-btn.is-liked { color: #e34a69; border-color: rgba(227,74,105,.35); background:#fff6fa; }
.post-share-btn { min-width: 86px; justify-content:center; }
.post-comment-card,
.memo-comments-card { padding: 24px 28px; }

/* post-sidebar is now handled by Bootstrap col-lg-3 */
.post-sidebar { height: fit-content; }
.post-side-card { padding: 0; overflow: hidden; }

.post-detail-skeleton { flex: 1; display:flex; flex-direction:column; gap:14px; }
.post-detail-skeleton .sk-card { border-radius: 14px; border:1px solid #e9edf5; background:#fff; box-shadow: 0 10px 24px rgba(16,24,40,0.06); padding: 20px; }
.post-detail-skeleton .sk-line,
.post-detail-skeleton .sk-avatar,
.post-detail-skeleton .sk-image { background: linear-gradient(90deg,#f2f4f8 25%,#e7ebf3 37%,#f2f4f8 63%); background-size: 400% 100%; animation: sk-loading 1.4s ease infinite; }
.post-detail-skeleton .sk-line { display:block; border-radius:6px; height: 12px; }
.post-detail-skeleton .sk-title { height: 20px; width: 76%; }
.post-detail-skeleton .sk-title-short { margin-top: 10px; width: 52%; }
.post-detail-skeleton .sk-meta-row { margin-top: 18px; display:flex; align-items:center; gap:10px; }
.post-detail-skeleton .sk-avatar { width: 32px; height: 32px; border-radius: 50%; flex:0 0 auto; }
.post-detail-skeleton .sk-meta-main { flex:1; }
.post-detail-skeleton .sk-author { width: 38%; }
.post-detail-skeleton .sk-signature { margin-top: 8px; width: 62%; }
.post-detail-skeleton .sk-content-lines { margin-top: 18px; }
.post-detail-skeleton .sk-text { margin-top: 10px; width: 100%; }
.post-detail-skeleton .sk-text-short { width: 68%; }
.post-detail-skeleton .sk-image { margin-top: 12px; width: 100%; height: 160px; border-radius: 10px; }
.post-detail-skeleton .post-skeleton-comment-card { padding-top: 18px; }
.post-detail-skeleton .sk-comment-title { width: 28%; height: 18px; }
.post-detail-skeleton .sk-comment-item { margin-top: 16px; display:flex; align-items:flex-start; gap:10px; }
.post-detail-skeleton .sk-comment-main { flex:1; }
.post-detail-skeleton .sk-comment-author { width: 24%; }
.post-detail-skeleton .sk-comment-text { margin-top: 10px; width: 94%; }
.post-detail-skeleton .sk-comment-text-short { width: 70%; }


/* 中文注释：微博详情首屏骨架屏，按头像、文本、图片和操作区最小高度占位，减少加载跳动。 */
.memo-detail-skeleton { flex: 1; display:flex; flex-direction:column; gap:20px; }
.memo-skeleton-card,
.memo-skeleton-comment-card { overflow:hidden; }
.memo-sk-line,
.memo-sk-avatar,
.memo-sk-image,
.memo-sk-pill,
.memo-sk-dot { display:block; background: linear-gradient(90deg,#f2f4f8 25%,#e7ebf3 37%,#f2f4f8 63%); background-size: 400% 100%; animation: sk-loading 1.4s ease infinite; }
.memo-sk-head { align-items:center; }
.memo-sk-avatar { width:44px; height:44px; border-radius:50%; flex:0 0 auto; }
.memo-sk-author-content { width:100%; }
.memo-sk-line { border-radius:6px; height:12px; }
.memo-sk-name { width:36%; min-width:120px; height:14px; }
.memo-sk-time { width:24%; min-width:88px; margin-top:10px; }
.memo-sk-dot { width:24px; height:24px; border-radius:8px; }
.memo-sk-content { margin: 14px 0 0 62px; }
.memo-sk-text-full { width:100%; min-height:14px; margin-top:10px; }
.memo-sk-text-short { width:72%; min-height:14px; margin-top:10px; }
.memo-sk-images { margin: 14px 0 0 62px; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; max-width:420px; }
.memo-sk-image { border-radius:10px; min-height:120px; }
.memo-sk-actions { margin: 14px 0 0 62px; display:flex; gap:10px; flex-wrap:wrap; }
.memo-sk-pill { width:72px; min-height:30px; border-radius:999px; }
.memo-skeleton-comment-card { padding-top: 22px; }
.memo-sk-comment-title { width:26%; min-width:120px; min-height:18px; }
.memo-sk-comment-item { margin-top:16px; display:flex; gap:10px; align-items:flex-start; }
.memo-sk-avatar-sm { width:34px; height:34px; }
.memo-sk-comment-main { flex:1; }
.memo-sk-comment-author { width:28%; min-height:12px; }
.memo-sk-comment-text { width:94%; margin-top:10px; }
.memo-sk-comment-text-short { width:68%; margin-top:10px; }

.comments-panel .comment-title { margin: 0 0 14px; font-size: 18px; color: #1a1f36; display: flex; align-items: center; gap: 8px; }
.comment-badge { background:#3c68aa; color:#fff; border-radius:10px; font-size:11px; padding:1px 8px; }
.reply-tip { margin-bottom: 6px; color: #6b7280; font-size: 13px; }
#comment-content { width:100%; min-height:86px; border:1px solid #dbe2f0; border-radius:10px; padding:10px 12px; resize:vertical; font-size:14px; font-family:inherit; }
.comment-actions { margin-top:8px; display:flex; justify-content:flex-end; gap:8px; }
.comment-btn { border:0; border-radius:18px; padding:7px 16px; font-size:13px; cursor:pointer; }
#comment-submit { background:#111; color:#fff; }
#reply-cancel { background:#eef1f6; color:#59617c; }
.comment-sort-tabs { display:flex; gap:12px; margin:2px 0 14px; }
.comment-sort-btn { border:0; background:transparent; color:#7a8398; font-size:14px; padding:0 2px 8px; cursor:pointer; border-bottom:2px solid transparent; }
.comment-sort-btn.is-active { color:#1f4ca3; border-bottom-color:#1f4ca3; font-weight:600; }
.comment-list { margin-top: 6px; }
.comment-item { padding: 16px 0; border-bottom: 1px solid #f1f4fa; }
.comment-item-child { background: #f7f9fe; border-radius: 10px; padding: 12px;  border-bottom: 0; }
.comment-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.comment-header-left { display:flex; align-items:flex-start; gap:10px; min-width:0; }
.comment-header-right { display:flex; align-items:center; gap:8px; margin-left:auto; white-space:nowrap; }
.comment-avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; border:1px solid #eef1f7; }
.comment-author-line { display:flex; align-items:center; gap:8px; }
.comment-user { color:#22314f; font-weight:600; }
.comment-identity { font-size:12px; line-height:1; padding:3px 7px; border-radius:999px; }
.comment-identity-author { background:#e7f1ff; color:#2d63c8; }
.comment-identity-vip { background:#fff1dc; color:#c9791a; }
.comment-time { color:#98a1b7; font-size:12px; }
.comment-body { margin:0 0 0 46px; color:#2f3446; line-height:1.7; }
.comment-reply-user { color:#3566b8; font-weight:600; text-decoration:none; }
.comment-reply-user:hover { text-decoration:underline; }
.comment-selected-badge { display:inline-flex; align-items:center; justify-content:center; background:#ffe7c2; color:#b45309; border-radius:999px; padding:1px 7px; font-size:12px; margin-right:8px; }
.comment-tools { margin:10px 0 0 46px; display:flex; gap:12px; align-items:center; }
.comment-like-btn,.reply-btn,.comment-select-btn { border:0; background:transparent; color:#98a1b7; cursor:pointer; display:inline-flex; align-items:center; gap:4px; padding:0; }
.comment-like-btn.is-liked { color:#e34a69; }
.comment-children { margin: 10px 0 0 16px; }
.comment-empty { padding: 18px 0; color: #98a1b7; text-align: center; }

.post-share-modal { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 1200; display:none; align-items:center; justify-content:center; padding:20px; }
.post-share-modal.show { display:flex; }
.post-share-dialog { width: min(92vw, 320px); background:#fff; border-radius:14px; padding:20px 18px 16px; position:relative; text-align:center; box-shadow:0 20px 48px rgba(0,0,0,.18); }
.post-share-dialog h3 { margin:0; font-size:16px; color:#111827; }
.post-share-close { position:absolute; top:10px; right:10px; width:28px; height:28px; border:0; border-radius:50%; background:#f3f4f6; color:#6b7280; font-size:18px; line-height:1; cursor:pointer; }
.post-share-qr { width: 240px; height: 240px; max-width:100%; margin: 14px auto 8px; display:block; border-radius:10px; border:1px solid #eef1f6; }
.post-share-tip { margin:0; color:#6b7280; font-size:13px; }

.memo-detail-page { max-width: 1200px; margin: calc(var(--navbar-offset) + 24px) auto 28px; padding: 0 20px; }
.memo-detail-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:20px; }
.memo-card { padding:20px 20px 14px; border-radius:3px; box-shadow: 0 6px 20px rgba(0,0,0,.04); }

.memo-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.memo-detail-author { display:flex; align-items:flex-start; gap:10px; min-width:0; flex:1; }
.memo-author-avatar-link { flex:0 0 auto; }
.memo-author-avatar { width:52px; height:52px; border-radius:50%; object-fit:cover; display:block; }
.memo-author-content { min-width:0; }
.memo-author-name-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.memo-author-name { font-size:14px; font-weight:600; line-height:1.5; color:#1f2937; text-decoration:none; }
.memo-author-name:hover { text-decoration:underline; }
.memo-verified-badge { width:16px; height:16px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:#2f8bff; font-size:12px; font-weight:700; }
.memo-verified-badge--blue{background:#2f8bff;}
.memo-verified-badge--yellow{background:#f0b90b;}
.memo-role-badge { display:inline-flex; align-items:center; justify-content:center; height:20px; border-radius:999px; padding:0 8px; font-size:12px; line-height:1; }
.memo-role-badge-level { color:#4385e8; background:#eef4ff; }
.memo-role-badge-vip { color:#d6881f; background:#fff1df; }
.memo-meta-follow-btn { border:0; border-radius:999px; background:#3f8ee9; color:#fff; padding:3px 12px; font-size:13px; line-height:1.5; cursor:pointer; }
.memo-meta-follow-btn.is-following { background:#e8edf5; color:#5d6576; }
.memo-meta-follow-btn:disabled { opacity:.7; cursor:not-allowed; }

/* 中文注释：微博详情复用帖子详情布局，正文与图片区域统一左对齐。 */
.memo-card .memo-content,
.memo-card .post-content.memo-detail-content { margin: 20px 0 0; font-size:14px; line-height:1.7; color:#1f2937; }
.memo-card .memo-images { margin: 12px 0 0; }
.memo-card .memo-images.memo-images-3 { width:50%; }
.memo-card .memo-images.memo-images-2 { width:36%; }
.memo-card .memo-images.memo-images-1 img { max-height:200px; max-width:200px; }

.memo-detail-actions { margin-top: 20px; }

.memo-detail-sidebar { width:300px; flex-shrink:0; position:sticky; top:84px; }

/* 中文注释：微博详情更多菜单需要覆盖右侧区域，避免被卡片容器裁切导致无法点击。 */
.memo-card { overflow: visible; }
.memo-detail-head .memo-more-wrap { position: relative; overflow: visible; }
.memo-detail-head .memo-more-menu { left: auto; right: 0; transform: none; z-index: 10000; }

/* 中文注释：微博详情点赞用户展示条，视觉与列表风格保持一致并兼顾性能。 */
.memo-like-users-wrap { margin: 12px 0 0; background:#f1f3f5; border-radius:10px; padding:8px 10px; display:flex; align-items:center; gap:10px; width:fit-content; max-width:100%; }
.memo-like-users { display:flex; align-items:center; }
.memo-like-user { width:24px; height:24px; border-radius:50%; overflow:hidden; border:1px solid #fff; display:inline-flex; margin-left:-6px; background:#fff; }
.memo-like-user:first-child { margin-left:0; }
.memo-like-user img { width:100%; height:100%; object-fit:cover; display:block; }
.memo-like-user-more { justify-content:center; align-items:center; color:#9aa3b2; font-size:14px; font-weight:700; }
.memo-like-users-text { color:#8a94a6; font-size:14px; white-space:nowrap; }

.author-card-v2 { background:#fff; border-radius:14px; overflow:hidden; }
.author-card-cover-link { display:block; height:120px; background:#eef2ff; }
.author-card-cover { width:100%; height:100%; object-fit:cover; display:block; }
.author-card-body { padding:0 16px 16px; text-align:center; }
.author-card-avatar { width:72px; height:72px; border-radius:50%; border:3px solid #fff; margin-top:-36px; box-shadow:0 6px 18px rgba(15,23,42,.15); object-fit:cover; }
.author-card-name-row { margin-top:10px; display:flex; align-items:center; justify-content:center; gap:8px; }
.author-card-name { font-size:17px; font-weight:700; color:#1f2a44; text-decoration:none; }
.author-card-name:hover { text-decoration:underline; }
.author-card-badge { font-size:11px; color:#1f4ca3; background:#e8f0ff; border-radius:999px; padding:2px 8px; }
.author-card-signature { margin:10px 0 0; font-size:13px; color:#7a8398; line-height:1.6; }
.author-card-stats { margin-top:12px; display:flex; justify-content:center; gap:16px; color:#5a637a; font-size:13px; }
.author-card-actions { margin-top:14px; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.author-card-follow-btn, .author-card-home-btn {width:100%; }

@media (max-width: 980px) {
  /* post-detail uses Bootstrap cols now, no need for flex-direction: column */
  .post-meta { align-items:flex-start; }
  .post-meta-right { width:100%; justify-content:space-between; }
  .post-meta-stats { justify-content:flex-start; }
  .post-card { padding:22px 18px; }
  .post-comment-card,.memo-comments-card { padding:20px 16px; }
  .memo-card .memo-content,
  .memo-card .memo-images,
  .memo-detail-actions,
  .memo-like-users-wrap,
  .memo-sk-content,
  .memo-sk-images,
  .memo-sk-actions { margin-left:0; }
  .memo-author-name { font-size:14px; }
  .memo-card .memo-content { font-size:14px; }
}

@keyframes sk-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 积分与后台样式 */
.post-paid-box{margin-top:16px;padding:12px;border:1px dashed #d9d9d9;border-radius:8px;background:#fafafa}
/* 中文注释：后台布局复用设置页的 tab 与扁平化黑白风格，减少视觉跳变并提升一致性。 */
/* admin-page is now inside a Bootstrap container-xl, just basic display */
.admin-page { width: 100%; }
.admin-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:14px;box-shadow:none}
.admin-card h3{margin:0 0 12px;font-size:18px;color:#111}
.admin-card p{margin:0 0 12px;color:#4b5563}
.admin-form-item{display:flex;flex-direction:column;gap:8px}
.admin-input-label{font-size:13px;color:#111;line-height:1.4;font-weight:600}
.admin-card input,.admin-card select,.admin-card textarea{width:100%;font-size:14px;line-height:1.4}
.admin-card input::placeholder{color:#6b7280}
.admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.admin-tabs{display:flex;gap:18px;border-bottom:1px solid #d1d5db;padding-bottom:8px;flex-wrap:wrap;margin-bottom:12px}
.admin-tab{appearance:none;border:0;background:transparent;color:#6b7280;padding:6px 0;cursor:pointer;position:relative}
.admin-tab.is-active{color:#111111;font-weight:600}
.admin-tab.is-active::after{content:'';position:absolute;left:0;right:0;bottom:-9px;height:2px;background:#111111;border-radius:2px}
.admin-panel{display:none;padding-top:14px}
.admin-panel.is-active{display:block}
.admin-subtabs{display:flex;gap:18px;border-bottom:1px solid #d1d5db;padding-bottom:8px;margin-bottom:12px;flex-wrap:wrap}
.admin-subtab{appearance:none;border:0;background:transparent;color:#6b7280;padding:6px 0;cursor:pointer;position:relative}
.admin-subtab.is-active{color:#111111;font-weight:600}
.admin-subtab.is-active::after{content:'';position:absolute;left:0;right:0;bottom:-9px;height:2px;background:#111111;border-radius:2px}
.admin-subpanel{display:none}
.admin-subpanel.is-active{display:block}

/* 中文注释：后台财务明细使用表格承载并支持分页，避免一次性渲染过多数据导致卡顿。 */
.admin-finance-table-wrap{width:100%;overflow-x:auto;border:1px solid #d1d5db}
.admin-finance-table{width:100%;border-collapse:collapse;min-width:820px;background:#fff}
.admin-finance-table th,.admin-finance-table td{padding:10px 12px;border-bottom:1px solid #e5e7eb;text-align:left;white-space:nowrap;font-size:13px;color:#111}
.admin-finance-table th{background:#f9fafb;font-weight:600}
.admin-finance-empty{text-align:center;color:#6b7280}
.admin-finance-pagination{display:flex;align-items:center;gap:10px;margin-top:12px}
.admin-finance-pagination span{color:#374151;font-size:13px}
.admin-finance-pagination button[disabled]{opacity:.45;cursor:not-allowed}

/* 付费内容视觉优化 */
.post-paid-box{margin-top:16px;padding:0;border-radius:10px;overflow:hidden;border:1px solid #d7dde8;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.post-paid-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.2)}
.post-paid-box h4{margin:0;font-size:22px;display:flex;align-items:center;gap:8px;font-weight:600}
.post-paid-box p{margin:0;padding:16px;color:#5b6b82}
.post-paid-box > :not(.post-paid-head):not(p){padding:14px 16px}
.post-paid-box .paid-chip{display:inline-flex;align-items:center;margin-left:4px;padding:2px 8px;border-radius:6px;background:#facc15;color:#111827;font-size:12px;line-height:1.3}
.post-paid-box .paid-chip--price{background:#facc15;color:#111827}
.post-paid-box .paid-chip--owned{background:#d1fae5;color:#065f46}
.post-paid-box--lock{background:#e9e1be;border-color:#e3d5a3}
.post-paid-box--lock .post-paid-head{background:linear-gradient(90deg,#ebdfb1 0%,#e7ddbc 100%)}
.post-paid-box--ok{background:#e7f5e9;border-color:#b8dcbf}
.post-paid-box--ok .post-paid-head{background:#c3ddca}
.post-paid-box--free{background:#f8fafc;border-color:#d8e2ef}
.post-paid-box--free .post-paid-head{background:#f1f5f9}
.post-paid-unlock-btn{background:#f6c514;border-color:#f6c514;color:#111827;display:inline-flex;align-items:center;gap:6px;font-weight:600}
.post-paid-unlock-btn:hover{filter:brightness(.96)}
.post-paid-box--attach .post-paid-head{background:linear-gradient(90deg,#7a5a02 0%,#1f1400 100%);color:#fff;border-bottom:0}
.post-paid-box--attach .post-paid-head .paid-chip{background:#f8d15c}
.post-paid-box--attach-free .post-paid-head{background:#f1f5f9;color:#334155;border-bottom:1px solid #d8e2ef}

/* admin-card buttons now use Bootstrap's btn classes, don't override globally */
.admin-card button:not([class*="btn"]){padding:10px 14px;border-radius:6px;border:1px solid #111;background:#111;color:#fff;cursor:pointer;font-size:14px;line-height:1.2}
.admin-card button:not([class*="btn"]):hover{background:#000}

/* 中文注释：设置页布局样式，采用扁平结构减少重绘并提升低端设备渲染性能。 */
/* setting-wrap is now inside a Bootstrap container */
.setting-wrap { /* Bootstrap container handles layout */ }
.setting-panel{background:#fff;border-radius:14px;box-shadow:0 6px 22px rgba(0,0,0,.05);padding:16px}
.setting-tabs{display:flex;gap:18px;border-bottom:1px solid #d1d5db;padding-bottom:8px;flex-wrap:wrap}
.setting-tab-btn{appearance:none;border:0;background:transparent;color:#6b7280;padding:6px 0;cursor:pointer;position:relative}
.setting-tab-btn.active{color:#111111;font-weight:600}
.setting-tab-btn.active::after{content:'';position:absolute;left:0;right:0;bottom:-9px;height:2px;background:#111111;border-radius:2px}
.setting-tab-panel{display:none;padding-top:14px}
.setting-tab-panel.active{display:block}
.setting-row{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px 0;border-bottom:1px solid #f1f4f8}
.setting-label{display:block;color:#374151;font-weight:600}
.setting-value{width: 100%;display: flex;justify-content: flex-start;flex-direction: column;}
.setting-value .input{width:100%}
.setting-avatar-row{align-items:flex-start}
.setting-avatar-value{display:flex;justify-content:flex-start}
.setting-avatar{width:72px;height:72px;border-radius:14px;object-fit:cover;cursor:pointer;border:1px solid #e8edf5;background:#f8fafc}
.setting-actions{padding-top:14px;display:flex;justify-content:flex-end}
.setting-password-group{display:flex;flex-direction:column;gap:10px;align-items:stretch;width:100%}
.btn-danger{background:#ef4444;color:#fff;border:1px solid #ef4444}


/* 帖子附件列表 */
.bbs-file-icon{width:34px;height:34px;display:block;fill:currentColor}
.post-attachment-list{margin:0;padding:12px 14px;list-style:none;background:#fff}
.post-attachment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 10px;border-radius:8px}
.post-attachment-row + .post-attachment-row{margin-top:6px}
.post-attachment-main{display:flex;align-items:center;gap:12px;min-width:0}
.post-attachment-icon{width:38px;height:38px;display:flex;align-items:center;justify-content:center;flex:none}
.post-attachment-meta{min-width:0}
.post-attachment-meta strong{display:block;font-size:16px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-attachment-sub{display:flex;align-items:center;gap:6px;color:#64748b;font-size:13px;margin-top:2px;flex-wrap:wrap}
.post-attachment-status{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;font-size:12px}
.post-attachment-status--ok{background:#e8f5e9;color:#0f766e}
.post-attachment-status--lock{background:#fff7d6;color:#9a6700}
.post-attachment-status--free{background:#e8f2ff;color:#0b5cff}
.post-attachment-price{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:#fff7d6;color:#9a6700;font-size:12px}
.post-attachment-download-free{background:#fff !important;border-color:#0b5cff !important;color:#0b5cff !important}
.post-attachment-action .post-action-btn{display:inline-flex;align-items:center;gap:6px}
.post-attachment-action .post-attachment-unlock{background:#f8c531;border-color:#f8c531;color:#111827}
.post-attachment-action .post-attachment-download{background:linear-gradient(135deg,#0b0b0b 0%,#2f2f2f 100%);border-color:#0b0b0b;color:#f8d46b}
.post-attachment-row.is-ready{background:#f8fafc}
.post-attachment-row.is-lock{background:#fffdf4}
.post-attachment-row.is-free{background:#f8fafc}


/* 中文注释：个人主页社交图标彩色化，提升识别度。 */
.social-card-icon .iconfont{font-size:20px;line-height:1;display:inline-block}
.social-card-item--social_blog .social-card-icon .iconfont{color:#f59e0b}
.social-card-item--social_github .social-card-icon .iconfont{color:#111827}

/* 中文注释：下载按钮使用黑金渐变，悬停时提升亮度。 */
.post-attachment-action .post-attachment-download:hover{filter:brightness(1.08)}

/* 认证设置 */
.setting-verify-tip{margin-bottom:12px;padding:10px 12px;border-radius:8px;background: #f6f6f6;color: #7c7c7c;font-size:14px;}
.setting-verify-tip.is-success{background:#eaf8ed;color:#1d7a35;}
.setting-verify-tip.is-warn{background:#fff5e8;color:#9b5e11;}
.setting-verify-file-input{position:absolute;left:-9999px;opacity:0;pointer-events:none;}
.setting-verify-upload-zone{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px 14px;border:1px dashed #c8d7ee;border-radius:14px;background:linear-gradient(180deg,#f7fbff 0%,#f2f8ff 100%);cursor:pointer;transition:all .2s ease;}
.setting-verify-upload-zone:hover{border-color:#97b3db;background:linear-gradient(180deg,#f2f8ff 0%,#eef5ff 100%);}
.setting-verify-upload-zone.is-disabled{opacity:.55;cursor:not-allowed;}
.setting-verify-upload-icon{width:34px;height:34px;border-radius:10px;background:#e6f0ff;color:#1d4ed8;display:flex;align-items:center;justify-content:center;font-size:22px;line-height:1;}
.setting-verify-upload-title{font-size:14px;color:#1f2937;font-weight:700;}
.setting-verify-upload-desc{font-size:12px;color:#64748b;}
.setting-verify-upload-progress{margin-top:8px;font-size:12px;color:#2563eb;}
.setting-verify-file-list{margin-top:12px;display:flex;flex-direction:column;gap:8px;}
.setting-verify-file-empty{padding:10px 12px;border:1px solid #deebff;border-radius:10px;background:#f6faff;color:#64748b;font-size:13px;}
.setting-verify-file-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid #deebff;border-radius:10px;background:#f9fcff;font-size:13px;}
.setting-verify-file-meta{min-width:0;display:flex;align-items:center;gap:8px;flex:1;}
.setting-verify-file-icon{width:14px;height:14px;min-width:14px;opacity:.9;}
.setting-verify-file-meta a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;text-decoration:none;line-height:1.4;}
.setting-verify-file-meta a:hover{color:#1d4ed8;text-decoration:underline;}
.setting-verify-file-remove{border:0;background:transparent;color:#94a3b8;font-size:18px;line-height:1;cursor:pointer;padding:0 2px;}
.setting-verify-file-remove:hover{color:#ef4444;}

/* 认证头像角标 */
.verified-avatar-wrap{position:relative;display:inline-flex;line-height:0;overflow:visible;}
.verified-avatar-wrap .verified-avatar-v{position:absolute;right:0;bottom:0;transform:translate(20%,20%);width:14px;height:14px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:700;line-height:1;box-shadow:0 0 0 1px #fff;background:#2f8bff;z-index:2;pointer-events:auto;}
.verified-avatar-wrap .verified-avatar-v--yellow{background:#f0b90b;}

/* 签到模块：黑白扁平化风格 */
.sign-home-card{margin-top:12px;border:1px solid #d8deea;background:#fff;color:#111;overflow:hidden;padding:0}
.sign-home-hero{display:flex;align-items:center;gap:10px;padding:12px;background:linear-gradient(135deg,#2f57d8 0%,#3e6fff 100%);color:#fff}
.sign-home-date{width:62px;height:62px;border-radius:50%;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.1);display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}
.sign-home-date strong{font-size:24px;line-height:1;font-weight:700}
.sign-home-date span{font-size:12px;opacity:.9;margin-top:2px}
.sign-home-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.sign-home-tip{font-size:16px;color:rgba(255,255,255,.96);line-height:1.25;margin:0;white-space:nowrap}
.sign-home-meta{display:flex;justify-content:space-between;align-items:center;border-top:1px dashed #ddd;padding-top:8px;margin-top:8px}

.sign-page{max-width:1200px;margin:24px auto;padding:0 16px}
.sign-hero{border:1px solid #111;background:#fff}
.sign-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}
.sign-stat-card{border:1px solid #111;background:#fff}
.sign-stat-label{font-size:13px;color:#666}
.sign-stat-value{font-size:28px;font-weight:700;margin-top:8px}
.sign-rank-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.sign-rank-list{list-style:none;padding:0;margin:0}
.sign-rank-list li{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid #eee}
.sign-rank-no{font-weight:700;min-width:44px}
.sign-rank-user{flex:1;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sign-rank-val{color:#222;font-weight:600}
.sign-rank-empty{color:#777;padding:8px 0}
@media (max-width: 960px){
  .sign-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sign-rank-grid{grid-template-columns:1fr}
}

/* 首页话题卡片 */
.home-topic-card{padding:14px}
.home-topic-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.home-topic-head h3{margin:0;font-size:16px}
.home-topic-head span{font-size:12px;color:#6b7280}
.home-topic-list{display:flex;flex-direction:column;gap:8px}
.home-topic-item{display:flex;align-items:center;gap:10px;border:1px solid #eceff5;border-radius:10px;padding:10px 12px;background:#fff;transition:.15s}
.home-topic-item:hover{border-color:#d5deeb;background:#f8fbff}
.home-topic-rank{width:34px;font-weight:700;color:#6b7280}
.home-topic-name{font-weight:700;color:#1f2937;min-width:120px}
.home-topic-meta{font-size:13px;color:#6b7280}

/* 首页签到排名卡片 */
.sign-home-rank-card{margin-top:12px}
.sign-home-rank-head h3{margin:0 0 10px}
.sign-home-rank-grid{display:grid;grid-template-columns:1fr;gap:10px}
.sign-home-rank-grid h4{margin:0 0 8px;font-size:13px;color:#6b7280}
.sign-home-rank-list{list-style:none;padding:0;margin:0}
.sign-home-rank-list li{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #f0f2f6}
.sign-home-rank-no{width:20px;font-weight:700;color:#6b7280}
.sign-home-rank-user{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.sign-home-rank-user span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sign-home-rank-val{font-size:12px;color:#374151}

/* 签到详情页用户链接样式 */
.sign-rank-user-link{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.sign-rank-user-link .sign-rank-user{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 签到页 - now uses Bootstrap container */
.sign-page { /* Bootstrap container handles layout */ }

/* 首页签到卡片（二次优化） */
.sign-home-card .sign-home-meta{display:none}
.sign-home-action-row{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0}
#sign-home-btn{min-width:92px;height:38px;flex-shrink:0;background:#fff;border:1px solid #fff;color:#2e58d9;border-radius:19px;font-weight:700;font-size:14px;padding:0 12px}
#sign-home-btn:hover{background:#f5f8ff;border-color:#f5f8ff}
#sign-home-btn.is-signed{background:#e5e7eb;border-color:#e5e7eb;box-shadow:none;color:#6b7280;cursor:not-allowed}

/* 首页签到排名卡片 Tab 样式 */
.sign-home-rank-panel{padding:10px 12px 12px}
.sign-home-rank-tabs{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px}
.sign-home-rank-tab-group{display:flex;align-items:center;gap:12px}
.sign-home-rank-tab{border:0;background:transparent;border-radius:0;padding:4px 2px;font-size:20px;cursor:pointer;color:#111;position:relative}
.sign-home-rank-tab.active::after{content:'';position:absolute;left:0;right:0;bottom:-6px;height:2px;background:#111}
.sign-home-rank-more{font-size:13px;color:#6b7280;text-decoration:none}
.sign-home-rank-list{display:none}
.sign-home-rank-list.active{display:block}
.sign-home-rank-list li{padding:6px 0}

@media (max-width: 960px){
  .sign-home-hero{flex-wrap:wrap}
  .sign-home-content{width:calc(100% - 72px)}
  .sign-home-action-row{width:100%;justify-content:flex-end}
}

.memo-item.is-top,.post-row.is-top{border-color:rgba(0,0,0,.08);background:#fff;}
.item-top-ribbon{
    position: absolute;
    top: 0px;
    left: 0px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 24px;
    padding: 0 15px 0 8px;
    background: linear-gradient(90deg, #dc2626, #f97316);
    color: #fff;
    font-size: 12px;
    letter-spacing: .5px;
    line-height: 1;
    border-radius: 0 5px 50px 0;
    z-index: 8;
    pointer-events: none;
    max-width: calc(100% - 24px);
    white-space: nowrap;
}

@media (max-width: 640px){
  .item-top-ribbon{
    top:10px;
    left:10px;
    min-width:48px;
    height:22px;
    font-size:11px;
    padding:0 10px 0 8px;
    max-width:calc(100% - 20px);
  }
}
.comment-identity-author-top{ background:#ffe4e6; color:#be123c; }
.sign-home-rank-top-1{background:#fff7e6;border-radius:8px;}
.sign-home-rank-top-2{background:#f5f8ff;border-radius:8px;}
.sign-home-rank-top-3{background:#fff5f5;border-radius:8px;}
.sign-home-rank-no{display:inline-flex;align-items:center;justify-content:center;min-width:24px;}
.sign-home-rank-note{margin-top:0;color:rgba(255,255,255,.94);font-size:13px;line-height:1.25;white-space:nowrap;}


/* 中文注释：打赏弹层表单样式，统一输入间距并提升移动端可读性。 */
.bbs-tip-form { padding: 14px 16px 4px; }
.bbs-tip-form .bbs-tip-row label { display:block; font-size:13px; color:#556074; margin-bottom:6px; }
.bbs-tip-form .layui-input { width:100%; border:1px solid #d7deeb; border-radius:8px; min-height:36px; padding:6px 10px; box-sizing:border-box; }

@media (max-width: 768px) {
  .nav-home { display: none; }

  .topbar-search {
    margin: 0 8px;
    max-width: none;
  }

  .topbar-search-input {
    height: 34px;
    font-size: 13px;
  }

  .topbar-search-btn {
    height: 34px;
    width: 36px;
  }
}

/* =============================================
   消息中心完整页面样式
   ============================================= */
.messages-page-wrap .card { overflow: hidden; }

.messages-page-header h1 { font-size: 16px; }

.messages-page-tabs {
  gap: 0;
}

.messages-page-tab {
  position: relative;
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
  transition: color .15s;
  white-space: nowrap;
}

.messages-page-tab.active {
  color: #111827;
}

.messages-page-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #111827;
  border-radius: 2px 2px 0 0;
}

.messages-page-tab:hover {
  color: #374151;
}

.messages-page-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
  line-height: 1;
  vertical-align: middle;
}

.messages-page-list {
  padding: 0;
}

.messages-page-item {
  border-bottom: 1px solid #f3f4f6;
  transition: background .12s;
}

.messages-page-item:last-child {
  border-bottom: none;
}

.messages-page-item:hover {
  background: #f9fafb;
}

.messages-page-item.is-unread {
  background: #fffbf0;
}

.messages-page-item.is-unread:hover {
  background: #fff8e6;
}

.messages-page-item-inner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
}

.messages-page-item-left {
  flex: 0 0 12px;
  padding-top: 6px;
}

.messages-page-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

.messages-page-item-body {
  flex: 1;
  min-width: 0;
}

.messages-page-from {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 4px;
}

.messages-page-from:hover {
  text-decoration: none;
}

.messages-page-from-name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-page-content-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.messages-page-content-link:hover .messages-page-title {
  text-decoration: underline;
}

.messages-page-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  word-break: break-word;
}

.messages-page-text {
  font-size: 13px;
  color: #6b7280;
  word-break: break-word;
  line-height: 1.5;
}

.messages-page-meta {
  margin-top: 6px;
}

.messages-page-time {
  font-size: 12px;
  color: #9ca3af;
}

.messages-page-item-actions {
  flex: 0 0 auto;
  padding-top: 2px;
}

.messages-page-del-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: color .15s, background .15s;
}

.messages-page-del-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.messages-page-empty {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.messages-page-load-tip {
  padding: 12px 20px;
  font-size: 13px;
  color: #9ca3af;
}

@media (max-width: 576px) {
  .messages-page-tab {
    padding: 10px 14px;
    font-size: 13px;
  }
  .messages-page-item-inner {
    padding: 12px;
  }
}

/* =============================================
   全站搜索页样式
   ============================================= */
.search-input { border-radius: 8px 0 0 8px !important; }

.search-tabs { gap: 6px; }

.search-tab {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
}

.search-tab:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.search-tab.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.search-meta {
  font-size: 13px;
  color: #6b7280;
  min-height: 20px;
}

.search-result-list {
  margin-top: 8px;
}

.search-result-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-title a {
  color: #111827;
  text-decoration: none;
}

.search-result-title a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.search-result-content {
  font-size: 14px;
  color: #374151;
  margin-top: 4px;
  word-break: break-word;
  line-height: 1.5;
}

.search-result-sub {
  font-size: 13px;
  color: #6b7280;
}

.search-result-sub a {
  color: #6b7280;
  text-decoration: none;
}

.search-result-sub a:hover {
  text-decoration: underline;
  color: #374151;
}

.search-empty {
  padding: 32px 0;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.search-user-row {
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}

.search-user-row:last-child {
  border-bottom: none;
}

.search-user-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-user-avatar-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.search-user-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
}

.search-user-main {
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.search-user-name-link {
  color: var(--text, #111827);
  text-decoration: none;
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-user-name-link:hover {
  text-decoration: underline;
}

.search-user-signature {
  margin-top: 3px;
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

mark {
  background: #fff2b3;
  color: #111827;
  border-radius: 3px;
  padding: 0 2px;
}

.search-pager { gap: 6px; }
