/* ============================================================
   泰山异种校园墙 · 样式表 v2（清新校园风）
   ============================================================ */
:root {
  --primary: #5b93f0;
  --primary-dark: #4278d6;
  --primary-light: #eaf1ff;
  --bg: #f3f6fc;
  --bg-soft: #e9f0fb;
  --card: #ffffff;
  --text: #2f3646;
  --text-soft: #4a5568;
  --muted: #9099ab;
  --border: #e8eef8;
  --accent: #ff8fa3;
  --green: #4fc38a;
  --amber: #f7b955;
  --danger: #ef6b6b;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 2px 10px rgba(80, 120, 190, .06);
  --shadow-md: 0 6px 24px rgba(80, 120, 190, .1);
  --shadow-lg: 0 14px 40px rgba(70, 110, 180, .16);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, #e8f1ff 0%, transparent 55%),
    radial-gradient(1000px 500px at 100% 0%, #fdeef3 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--primary); text-decoration: none; }

/* ==================== 顶栏 ==================== */
.topbar {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px;
  padding: 13px 22px;
}
.brand {
  font-size: 20px; font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(120deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--text-soft); font-size: 14.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 9px; transition: all .18s var(--ease);
}
.nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.userbox { display: flex; align-items: center; gap: 10px; flex: none; }

/* 个人主页入口（头像 + 名字） */
.nav-me {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  color: var(--text-soft); font-weight: 600; font-size: 14px;
  transition: background .18s var(--ease);
}
.nav-me:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-me-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; object-fit: cover;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(80,120,190,.28);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.nav-me:hover .nav-me-avatar {
  transform: scale(1.06);
  box-shadow: 0 3px 12px rgba(80,120,190,.38);
}
img.nav-me-avatar { background: #eef3fb; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.nav-icon {
  font-size: 17px; position: relative; padding: 5px 6px;
  border-radius: 9px; transition: background .18s var(--ease);
}
.nav-icon:hover { background: var(--primary-light); }

/* 顶栏「消息」入口（通知+私信合并） */
.nav-inbox {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--text-soft);
  padding: 6px 12px; border-radius: 999px;
  background: var(--primary-light);
  transition: all .18s var(--ease);
}
.nav-inbox:hover { background: #dce8ff; color: var(--primary-dark); }
.nav-inbox-icon { font-size: 15px; }
@media (max-width: 640px) {
  .nav-inbox-text { display: none; }
  .nav-inbox { padding: 6px 9px; }
  .nav-me-name { display: none; }
  .nav-me { padding: 4px; }
}
/* 极窄屏（小手机竖屏）：进一步压缩 */
@media (max-width: 400px) {
  .topbar-inner { padding: 8px 9px; gap: 5px; }
  .brand { font-size: 15px; }
  .nav a { font-size: 12.5px; padding: 5px 6px; }
  .btn-ghost.btn-sm { padding: 5px 9px; font-size: 12px; }
}
.badge-dot {
  position: absolute; top: 2px; right: 2px;
  width: 9px; height: 9px; background: var(--danger); border-radius: 50%;
  border: 2px solid #fff; animation: pulse 1.8s infinite;
}
.badge-dot-inline {
  display: inline-block; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 10px;
  padding: 1px 7px; margin-left: 6px;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .7; }
}

/* ==================== 布局 ==================== */
.container { max-width: 1120px; margin: 26px auto; padding: 0 22px; min-height: 62vh; }
.grid { display: grid; grid-template-columns: 1fr 290px; gap: 22px; align-items: start; }

/* 首页：单列居中 */
.feed-page { max-width: 720px; margin: 0 auto; }
.feed-rules { margin-top: 4px; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .container { padding: 0 14px; margin: 16px auto; }
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: box-shadow .25s var(--ease);
}
.card h3 { margin: 0 0 14px; font-size: 16.5px; font-weight: 700; }

/* ==================== 输入 ==================== */
.ipt {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 10px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.ipt::placeholder { color: #b3bbc9; }
.ipt:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 147, 240, .13);
}
textarea.ipt { resize: vertical; line-height: 1.6; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: transform .12s var(--ease), background .18s, box-shadow .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 147, 240, .3);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(91, 147, 240, .42); }
.btn-ghost { background: #fff; color: var(--primary-dark); border-color: #d5e2f7; }
.btn-ghost:hover { background: var(--primary-light); border-color: var(--primary); }
.btn-danger { background: #fff1f1; color: var(--danger); border-color: #ffdede; }
.btn-danger:hover { background: #ffe4e4; }
.btn-block { width: 100%; }

/* ==================== 分类选择 ==================== */
.cat-tabs { display: flex; gap: 9px; margin-bottom: 13px; flex-wrap: wrap; }
.cat-tabs label {
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); color: var(--text-soft);
  transition: all .2s var(--ease);
  display: inline-flex; align-items: center;
}
.cat-tabs label:hover { border-color: var(--primary); color: var(--primary-dark); }
.cat-tabs input { display: none; }
.cat-tabs label:has(input:checked) {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(91, 147, 240, .3);
}

/* ==================== 帖子 ==================== */
.post-list .card { padding: 18px 22px; }
.post-list .card:hover { box-shadow: var(--shadow-md); }
.post-item { }
.post-cat {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 3px 11px; border-radius: 999px;
  color: #fff; margin-right: 7px; vertical-align: middle;
  letter-spacing: .2px;
}
.cat-normal { background: linear-gradient(135deg, #7aa8f5, #5b93f0); }
.cat-lost { background: linear-gradient(135deg, #6ed3a0, #4fc38a); }
.cat-confession { background: linear-gradient(135deg, #ffa7b8, #ff8fa3); }
.cat-top { background: linear-gradient(135deg, #ffcf6b, #f7b955); }
.post-title {
  font-size: 16.5px; font-weight: 700; margin: 6px 0 3px;
  line-height: 1.45;
}
.post-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.post-meta a { color: var(--text-soft); font-weight: 500; }
.post-meta a:hover { color: var(--primary-dark); }
.post-content {
  font-size: 14.5px; color: var(--text-soft);
  white-space: pre-wrap; word-break: break-word; line-height: 1.7;
}
.post-image {
  max-width: 100%; max-height: 380px; border-radius: 12px;
  border: 1px solid var(--border); margin-top: 10px;
  cursor: zoom-in; display: block;
  transition: transform .2s var(--ease);
}
.post-image:hover { transform: scale(1.008); }
.post-actions {
  margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap;
  align-items: center;
}
.post-actions a, .like-btn {
  font-size: 13px; color: var(--muted); font-weight: 500;
  padding: 5px 11px; border-radius: 8px;
  transition: all .18s var(--ease);
}
.post-actions a:hover { background: var(--primary-light); color: var(--primary-dark); }
.like-link { color: var(--accent) !important; }
.like-link:hover { background: #fff0f3 !important; }
.like-btn { background: none; border: none; cursor: pointer; font-family: inherit; }
.like-btn:hover { background: #fff0f3; color: var(--accent); }
.like-btn.active { color: var(--accent); font-weight: 700; }
.del-link { color: #d88 !important; }
.del-link:hover { background: #fff1f1 !important; color: var(--danger) !important; }

/* ==================== 侧栏 ==================== */
.side-card h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.side-card p { margin: 7px 0; font-size: 14px; }
.side-card p a { display: inline-block; }
.rules { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.rules li { margin-bottom: 7px; line-height: 1.55; }

/* ==================== 认证页 ==================== */
/* ==================== 独立登录/注册页 ==================== */
body.auth-body { margin: 0; min-height: 100vh; }

.auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* 左侧品牌区 */
.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  background: linear-gradient(150deg, #6ea4f7 0%, #5b93f0 45%, #8b7ae8 100%);
  color: #fff;
}
.auth-hero-inner { position: relative; z-index: 2; max-width: 360px; }
.auth-logo { font-size: 46px; margin-bottom: 14px; }
.auth-hero h1 {
  margin: 0 0 8px; font-size: 32px; font-weight: 800;
  letter-spacing: .5px;
}
.auth-hero-sub { margin: 0 0 30px; font-size: 15px; opacity: .9; }
.auth-hero-feats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 13px;
}
.auth-hero-feats li {
  font-size: 15px; opacity: .95;
  background: rgba(255, 255, 255, .14);
  padding: 11px 16px; border-radius: 12px;
  backdrop-filter: blur(6px);
}
.auth-hero-blob {
  position: absolute; z-index: 1;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%);
  right: -140px; bottom: -160px;
}
.auth-hero-blob::after {
  content: ""; position: absolute;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
  left: -220px; top: -180px;
}

/* 右侧表单区 */
.auth-main {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px;
  background: var(--card);
}
.auth-form-card { width: 100%; max-width: 380px; }
.auth-form-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.auth-sub { margin: 0 0 22px !important; }
.auth-fields { }
.auth-submit { margin-top: 4px; padding: 12px; font-size: 15px; }
.auth-switch { margin-top: 18px !important; }
.auth-foot {
  margin-top: 26px; font-size: 11.5px; color: var(--muted); opacity: .7;
}

/* 手机端：单列，隐藏品牌区 */
@media (max-width: 820px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-main {
    justify-content: flex-start;
    min-height: 100vh;
    padding: 44px 22px 40px;
  }
  .auth-form-card { max-width: 400px; }
}

.msg { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.msg.ok { color: var(--green); }

/* ==================== 通用工具类 ==================== */
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.row-end { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hint { color: var(--muted); font-size: 12.5px; cursor: pointer; }

/* ==================== 详情页 ==================== */
.post-detail { max-width: 780px; margin: 0 auto; }
.back {
  display: inline-flex; align-items: center;
  margin-bottom: 14px; font-size: 14px; font-weight: 500;
  color: var(--muted);
}
.back:hover { color: var(--primary-dark); }
.post-detail .post-title { font-size: 22px; margin: 8px 0 6px; }
.comment-item {
  border-bottom: 1px solid var(--border); padding: 13px 0;
}
.comment-item:last-child { border-bottom: none; }
.comment-child {
  margin-left: 24px; padding-left: 14px;
  border-left: 3px solid var(--primary-light);
}
.comment-user { font-weight: 700; font-size: 13.5px; color: var(--text); }
.comment-time { color: var(--muted); font-size: 11.5px; margin-left: 8px; }
.comment-content {
  font-size: 14.5px; margin-top: 3px;
  color: var(--text-soft); white-space: pre-wrap; line-height: 1.65;
}
.comment-tools { margin-top: 6px; }
.comment-tools a {
  font-size: 12.5px; color: var(--muted); margin-right: 14px;
  padding: 2px 7px; border-radius: 6px; transition: all .18s var(--ease);
}
.comment-tools a:hover { background: var(--primary-light); color: var(--primary-dark); }
.comment-form {
  display: flex; flex-direction: column; gap: 9px;
  align-items: flex-end; margin-top: 16px;
  padding-top: 16px; border-top: 1px dashed var(--border);
}
.comment-form .ipt { margin-bottom: 0; }

/* 评论工具栏（图片 / 表情 / 发送） */
.comment-toolbar {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
}
.comment-toolbar .hint { flex: 1; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 18px; cursor: pointer; flex: none;
  transition: all .18s var(--ease);
}
.tool-btn:hover { border-color: var(--primary); background: var(--primary-light); }

/* 表情面板 */
.emoji-panel {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 4px; width: 100%;
  padding: 10px; border-radius: 12px;
  background: #f8faff; border: 1px solid var(--border);
  max-height: 180px; overflow-y: auto;
}
.emoji-item {
  font-size: 20px; text-align: center; cursor: pointer;
  padding: 4px 0; border-radius: 8px; transition: background .15s;
}
.emoji-item:hover { background: var(--primary-light); }
@media (max-width: 640px) {
  .emoji-panel { grid-template-columns: repeat(6, 1fr); }
}

/* 评论里的图片 */
.comment-image {
  max-width: 220px; max-height: 220px; border-radius: 10px;
  border: 1px solid var(--border); margin-top: 6px;
  cursor: zoom-in; display: block;
}

/* @提及高亮 */
.mention {
  color: var(--primary-dark); font-weight: 600;
  background: var(--primary-light);
  padding: 0 4px; border-radius: 5px;
}

/* 个人主页：数据统计 & 互关标签 */
.profile-stats {
  display: flex; gap: 20px; margin: 8px 0 !important;
  font-size: 14px; color: var(--text-soft);
}
.profile-stats b { color: var(--text); font-size: 16px; }
.mutual-tag {
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #6ed3a0, #4fc38a);
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle; margin-left: 4px;
}

/* ==================== 管理后台 ==================== */
.admin-wrap { max-width: 840px; margin: 0 auto; }
.admin-item { display: flex; align-items: center; gap: 14px; }
.admin-item .ai-body { flex: 1; min-width: 0; }
.admin-item .ai-actions { display: flex; gap: 7px; flex-direction: column; flex: none; }
.ai-title { font-weight: 700; font-size: 15px; margin: 3px 0; }
.ai-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.badge-pending { background: #fff4dc; color: #c98a00; }
.badge-approved { background: #e2f7ec; color: #2f9e63; }
.badge-rejected { background: #ffe6e6; color: #d05252; }
.admin-filter { margin-bottom: 14px; font-size: 14px; }

/* ==================== 服务器状态 ==================== */
.sys-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 14px;
}
@media (max-width: 720px) { .sys-grid { grid-template-columns: 1fr; } }

/* 在线用户小列表 */
.online-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; justify-content: center;
}
.online-user {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--text-soft);
  background: #f2f7ff; padding: 3px 9px 3px 4px;
  border-radius: 999px; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.online-user .mini-avatar { width: 18px; height: 18px; font-size: 10px; margin-right: 0; }
.sys-card { margin-bottom: 0; text-align: center; padding: 18px 16px; }
.sys-card-title { font-size: 14px; font-weight: 700; color: var(--text-soft); margin-bottom: 8px; }
.sys-big {
  font-size: 38px; font-weight: 800; line-height: 1.1;
  margin: 4px 0 10px;
}
.sys-unit { font-size: 17px; font-weight: 600; margin-left: 2px; opacity: .75; }
.sys-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.metric-bar {
  height: 8px; border-radius: 6px; overflow: hidden;
  background: #eef2f9; margin: 0 4px;
}
.metric-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width .5s var(--ease);
}
.sys-info { padding: 8px 20px; }
.sys-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.sys-info-row:last-child { border-bottom: none; }
.sys-info-row span { color: var(--muted); }
.sys-info-row b { font-weight: 700; }
.admin-filter a { padding: 2px 6px; border-radius: 6px; }
.admin-filter a:hover { background: var(--primary-light); }

/* ==================== 筛选 / 搜索 ==================== */
.filter-bar { margin-bottom: 12px; }
.filter-title { font-weight: 800; font-size: 16.5px; }
.search-row { display: flex; gap: 9px; margin-bottom: 11px; }
.search-row .ipt { margin-bottom: 0; }
.sort-tabs { display: flex; justify-content: space-between; align-items: center; }
.sort-links a {
  font-size: 13.5px; margin-left: 6px; color: var(--muted);
  padding: 4px 11px; border-radius: 999px; font-weight: 500;
  transition: all .18s var(--ease);
}
.sort-links a:hover { background: var(--primary-light); }
.sort-links a.active {
  background: var(--primary-light); color: var(--primary-dark); font-weight: 700;
}
.load-more-wrap { text-align: center; margin: 20px 0; }

/* 搜索展开按钮 */
.search-toggle {
  font-size: 15px !important;
  background: var(--primary-light) !important;
  color: var(--primary-dark) !important;
}
.search-toggle.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  color: #fff !important;
}

/* 搜索面板（默认收起） */
.search-panel {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  animation: fadeIn .2s var(--ease);
}
.search-cats { display: flex; gap: 8px; margin-bottom: 10px; }
.search-cat {
  border: 1.5px solid var(--border); background: #fff;
  color: var(--text-soft); cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 5px 14px; border-radius: 999px;
  transition: all .18s var(--ease);
}
.search-cat:hover { border-color: var(--primary); color: var(--primary-dark); }
.search-cat.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-color: transparent;
}

/* 用户搜索结果 */
.user-result {
  display: flex; align-items: center; gap: 13px;
  cursor: pointer;
  transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.user-result:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.user-result .mini-avatar {
  width: 44px; height: 44px; font-size: 18px; margin-right: 0;
}
.user-result-body { flex: 1; min-width: 0; }
.user-result-name { font-weight: 700; font-size: 15px; }
.user-result-arrow { font-size: 22px; color: var(--muted); }

/* ==================== 图片上传 ==================== */
.upload-row { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; flex-wrap: wrap; }
.upload-label { cursor: pointer; }
.image-preview { margin-bottom: 11px; }
.image-preview img {
  max-width: 100%; max-height: 260px; border-radius: 12px;
  border: 1px solid var(--border); display: block;
}

/* ==================== 个人主页 ==================== */
.profile-wrap { max-width: 780px; margin: 0 auto; }
.profile-card { display: flex; gap: 22px; align-items: center; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; flex: none;
  box-shadow: 0 6px 18px rgba(91, 147, 240, .3);
  object-fit: cover;
}
img.profile-avatar-img {
  background: #eef3fb;
  border: 2px solid #fff;
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h2 { margin: 0 0 5px; font-size: 22px; font-weight: 800; }
.profile-info p { margin: 3px 0; }
.profile-bio {
  background: var(--primary-light);
  padding: 8px 14px; border-radius: 10px;
  font-size: 14px; margin: 8px 0 !important;
  display: inline-block;
}
.profile-actions { margin-top: 12px; display: flex; gap: 9px; flex-wrap: wrap; }

/* 头像上传 */
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  overflow: hidden; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(80,120,190,.16);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ph { font-size: 28px; font-weight: 800; color: var(--primary-dark); }

/* ==================== 私信 ==================== */
.msg-grid { grid-template-columns: 240px 1fr; align-items: stretch; }
@media (max-width: 700px) { .msg-grid { grid-template-columns: 1fr; } }
.conv-list { max-height: 62vh; overflow-y: auto; padding: 8px; }
.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 11px; cursor: pointer;
  transition: background .18s var(--ease);
}
.conv-item:hover { background: #f4f8ff; }
.conv-item.active { background: var(--primary-light); }
.conv-item .mini-avatar {
  width: 40px; height: 40px; font-size: 17px; margin-right: 0;
}
.conv-body { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 14px; }
.conv-last {
  font-size: 12.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.chat-box { display: flex; flex-direction: column; height: 62vh; padding: 16px 20px; }
.chat-header { padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 14px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 72%; padding: 9px 13px; border-radius: 15px;
  font-size: 14px; word-break: break-word; line-height: 1.5;
  box-shadow: 0 1px 4px rgba(80, 120, 190, .08);
}
.bubble-other {
  background: #f2f5fa; color: var(--text);
  border-bottom-left-radius: 5px;
}
.bubble-mine {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-bottom-right-radius: 5px;
}
.bubble-time { display: block; font-size: 10px; opacity: .6; margin-top: 3px; }
.chat-input { display: flex; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-input .ipt { margin-bottom: 0; }

/* ==================== 通知 ==================== */
.notif-wrap { max-width: 720px; margin: 0 auto; }
.notif-wrap h2 { display: flex; justify-content: space-between; align-items: center; font-size: 20px; }

/* ==================== 通知页（上下两段式） ==================== */
.inbox-wrap { max-width: 700px; margin: 0 auto; }

/* 通知折叠小卡片 */
.notif-collapsed {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; margin-bottom: 14px;
  cursor: pointer;
  transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.notif-collapsed:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.notif-collapsed-left { display: flex; align-items: center; gap: 13px; }
.notif-collapsed-icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--primary-light);
}
.notif-collapsed-title { font-weight: 700; font-size: 15px; }
.notif-collapsed-sub { font-size: 12.5px; color: var(--muted); }
.notif-collapsed-sub b { color: var(--danger); }
.notif-collapsed-arrow {
  font-size: 13px; color: var(--muted); flex: none;
}

/* 通知页两段式 */
.inbox-sec { margin-bottom: 8px; }
.inbox-sec-title { font-size: 16px; font-weight: 800; color: var(--text); }
.inbox-sec-sub {
  font-size: 13px; color: var(--muted);
  margin-left: 10px; flex: 1;
}
.inbox-divider {
  display: flex; align-items: center; justify-content: center;
  margin: 22px 0 20px;
  color: var(--muted);
}
.inbox-divider::before,
.inbox-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.inbox-divider span {
  padding: 0 16px; font-size: 14px; letter-spacing: 3px;
  color: var(--border);
}

.notif-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 8px;
}

.inbox-conv { max-width: 640px; }

/* ==================== 独立聊天页 ==================== */
.chat-page {
  max-width: 680px; margin: 0 auto;
  display: flex; flex-direction: column;
  height: calc(100vh - 170px);
  min-height: 420px;
}
.chat-page-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.chat-page-head .back { margin-bottom: 0; }
.chat-peer {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--text);
}
.chat-peer:hover { color: var(--primary-dark); }
.chat-peer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex: none;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 8px rgba(80,120,190,.2);
}
.chat-peer-avatar-txt {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#7aa8f5,#5b93f0);
  color: #fff; font-size: 15px; font-weight: 700;
}
.chat-page-body {
  flex: 1; overflow-y: auto; padding: 18px 4px;
  display: flex; flex-direction: column; gap: 9px;
  min-height: 0;
}
/* 消息贴底：顶部弹性占位，消息多了自动撑开 */
.chat-page-body > .chat-spacer { flex: 1 0 auto; }
.chat-empty {
  margin: auto; text-align: center; color: var(--muted);
}
.chat-page-input {
  display: flex; gap: 9px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.chat-page-input .ipt { margin-bottom: 0; }
@media (max-width: 640px) {
  .chat-page { height: calc(100vh - 150px); }
}

.notif-item {
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow .22s var(--ease);
}
.notif-item.unread {
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, #f7faff, #fff 60%);
}
.notif-icon {
  font-size: 21px; width: 44px; height: 44px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); border-radius: 50%;
}
.notif-body { flex: 1; font-size: 14px; }

/* ==================== 弹窗 ==================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(40, 50, 70, .42);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 16px;
  animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius); padding: 26px 26px;
  width: 440px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .24s var(--ease);
}
@keyframes slideUp {
  from { transform: translateY(16px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal h3 { margin: 0 0 16px; font-size: 18px; }
.modal label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.modal hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ==================== 空状态 / 加载 ==================== */
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.empty-icon { font-size: 44px; margin-bottom: 10px; opacity: .55; }

/* ==================== 吸顶筛选栏 ==================== */
.sticky-filter {
  position: sticky;
  top: 62px;                     /* 顶栏高度 */
  z-index: 80;
  padding: 10px 12px;
  margin-left: -12px; margin-right: -12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .sticky-filter {
    top: 56px;
    margin-left: -6px; margin-right: -6px;
    padding: 9px 10px;
  }
}

/* ==================== 发帖入口条（毛玻璃） ==================== */
.compose-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--shadow);
  color: var(--muted);
  transition: box-shadow .22s var(--ease), transform .18s var(--ease);
}
.compose-bar:hover {
  color: var(--text-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.compose-bar-icon { font-size: 17px; }
.compose-bar-text { flex: 1; font-size: 14.5px; }
.compose-bar-btn {
  padding: 7px 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(91, 147, 240, .3);
}
@media (max-width: 640px) {
  .compose-bar { padding: 12px 14px; gap: 10px; }
  .compose-bar-text { font-size: 13.5px; }
  .compose-bar-btn { padding: 6px 16px; font-size: 13px; }
}

/* ==================== 发帖页 ==================== */
.compose-page { max-width: 720px; margin: 0 auto; }
.compose-page textarea.ipt { min-height: 140px; }
.compose-tips { margin-top: 4px; }

/* ==================== 小头像 ==================== */
.mini-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 700;
  vertical-align: middle; margin-right: 6px;
  flex: none;
}
img.mini-avatar-img {
  object-fit: cover; background: #eef3fb;
  border: 1px solid rgba(255,255,255,.8);
}

/* ==================== 页脚 ==================== */
.footer {
  text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 30px 0 40px;
}
.footer p { margin: 0; }
.footer-ver { font-size: 11.5px; opacity: .65; margin-top: 4px !important; }

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3ddec; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #bfcde3; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== 移动端 ==================== */
@media (max-width: 640px) {
  .topbar-inner { gap: 8px; padding: 9px 12px; flex-wrap: nowrap; }
  .brand { font-size: 16px; }
  .nav { gap: 1px; overflow-x: auto; flex: 1; min-width: 0; }
  .nav a { font-size: 13px; padding: 5px 8px; white-space: nowrap; }
  .userbox { gap: 6px; flex: none; }
  .card { padding: 16px; border-radius: 14px; }
  .post-title { font-size: 15.5px; }
  .profile-card { flex-direction: column; text-align: center; gap: 14px; }
  .admin-item { flex-direction: column; align-items: stretch; }
  .admin-item .ai-actions { flex-direction: row; }
  .notif-item { align-items: flex-start; }
}
