:root {
  --bg: #F1F8FE;
  --card: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --nav-bg: #7FB3E5;
  --primary: #7FB3E5;
  --primary-deep: #5DADE2;
  --primary-soft: rgba(127,179,229,.18);
  --success: #4CAF50;
  --success-hover: #43A047;
  --border: #eaeaea;
  --font-main: "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-width: 1200px;   /* 全站统一宽度 */
}

body.dark {
  --bg: #18191C;
  --card: #222327;
  --text: #E0E0E0;
  --text-light: #9499A0;
  --nav-bg: #222327;
  --primary: #7FB3E5;
  --primary-deep: #00AEEC;
  --primary-soft: rgba(127,179,229,.15);
  --success: #2E7D32;
  --success-hover: #388E3C;
  --border: #2f3033;
}

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

/* 恒定保留纵向滚动条位置。
   否则长页面出现滚动条后可视宽度少约 15px，居中的导航与内容会整体左移约 8px，
   短页面没有滚动条就不动，于是同一个导航栏在不同页面看起来偏左偏右。
   新浏览器用 scrollbar-gutter（滚动条不常驻，只是留出位置）；
   老浏览器不支持就退回 overflow-y:scroll（滚动条常驻，但位置一定一致）。 */
html { overflow-y: scroll; }
@supports (scrollbar-gutter: stable) {
  html { overflow-y: auto; scrollbar-gutter: stable; }
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .3s, color .3s, opacity .18s;
}

/* 导航 */
nav {
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 100;
  transition: background .3s;
}

.nav-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

/* 导航栏文字链接（如「传视频」） */
.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, .18); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: rgba(255,255,255,.95);
}

#ip {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-family: monospace;
  font-variant-numeric: tabular-nums;
}

/* 导航栏统一圆形图标按钮 */
.theme-btn,
.admin-btn,
.mail-btn,
.gear-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.22);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  text-decoration: none;
  flex-shrink: 0;
}
.theme-btn:hover,
.admin-btn:hover,
.mail-btn:hover,
.gear-btn:hover { background: rgba(255,255,255,.35); }

.theme-btn svg,
.admin-btn svg,
.mail-btn svg,
.gear-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 头部 */
header {
  max-width: var(--page-width);
  margin: 60px auto 40px;
  padding: 0 20px;
  text-align: center;
}
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card);
  box-shadow: 0 4px 14px rgba(127,179,229,.35);
  background: var(--card);
}
.name {
  font-size: 40px;
  margin: 20px 0 10px;
  color: var(--text);
}
.tagline {
  font-size: 17px;
  color: var(--text-light);
}

/* 通用 section / card */
section {
  max-width: var(--page-width);
  margin: 0 auto 50px;
  padding: 0 20px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: background .3s;
}
.section-title {
  font-size: 22px;
  color: var(--text);
  margin-bottom: 16px;
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 22px;
  background: var(--primary-deep);
  border-radius: 2px;
}

/* ===== 主页·文章入口 ===== */
.art-entry-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 22px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  text-decoration: none;
  transition: background .2s;
}
.art-entry-btn:hover { background: var(--primary-deep); color: #fff; }

.art-box {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.art-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.art-box-title { font-size: 15px; font-weight: 600; color: var(--text); }
.art-box-more { font-size: 13px; color: var(--primary-deep); text-decoration: none; }
.art-box-more:hover { text-decoration: underline; }
.art-box-list { display: flex; flex-direction: column; gap: 4px; }
.art-box-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}
.art-box-row:hover { background: var(--primary-soft); }
.art-box-row .t {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.art-box-row .m {
  flex: none;
  font-size: 12px;
  color: var(--text-light);
}
.art-box-empty, .art-box-none {
  padding: 10px 4px;
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 视频卡片（主页小方框 / videos.html 共用）===== */
.v-grid { display: flex; flex-direction: column; gap: 4px; }
.v-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); text-decoration: none; color: var(--text);
  transition: border-color .15s;
}
.v-card:hover { border-color: var(--primary); }
.v-thumb {
  flex: none; width: 48px; height: 48px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
}
.v-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v-info .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.v-info .m { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.v-empty { padding: 10px 4px; font-size: 13px; color: var(--text-light); }

/* 测试页网格 */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 10px;
}
.test-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  transition: background .2s, transform .2s;
  box-shadow: 0 2px 6px rgba(127,179,229,.3);
}
.test-item:hover {
  background: var(--primary-deep);
  transform: translateY(-2px);
}

/* 社交图标 */
.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.socials a:hover {
  background: var(--primary-deep);
  color: #fff;
  transform: translateY(-3px);
}
.socials svg { width: 22px; height: 22px; }

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-light);
  font-size: 14px;
}
footer p { margin: 4px 0; }

/* 导航登录按钮 */
.login-btn {
  padding: 6px 16px;
  border-radius: 6px;
  background: rgba(255,255,255,.22);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.login-btn:hover { background: rgba(255,255,255,.35); }

/* 导航头像 */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.6);
  display: block;
  transition: border-color .2s;
  flex-shrink: 0;
}
.user-avatar:hover { border-color: #fff; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 登录弹窗 */
.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.login-modal.show { display: flex; }
.login-box {
  position: relative;
  width: 320px;
  max-width: 90vw;
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  padding: 28px 24px 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-close {
  position: absolute;
  top: 10px; right: 14px;
  border: none; background: none;
  font-size: 24px; line-height: 1;
  color: var(--text-light);
  cursor: pointer;
}
.login-close:hover { color: var(--text); }
.login-title {
  font-size: 20px;
  margin-bottom: 18px;
  text-align: center;
  color: var(--text);
}
.login-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.login-input:focus { border-color: var(--primary); }
.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.login-submit {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.login-submit:hover { background: var(--primary-deep); }
.login-submit.reg { background: var(--success); }
.login-submit.reg:hover { background: var(--success-hover); }
.login-msg {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}
.login-msg.ok { color: var(--success); }
.login-msg.err { color: #e74c3c; }

/* 更新日志 */
.log-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.log-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.log-list li:last-child { border-bottom: none; }
.log-date {
  color: var(--primary-deep);
  font-family: monospace;
  white-space: nowrap;
  font-size: 14px;
  padding-top: 2px;
}
.log-text { color: var(--text); }

.log-more {
  display: block;
  margin: 18px auto 0;
  padding: 8px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.log-more:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.log-more:disabled {
  opacity: .5;
  cursor: default;
}

/* 更新日志：标题那行 + 添加按钮 */
.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.log-head .section-title { margin-bottom: 0; }

.log-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.log-add:hover { background: var(--primary-deep); transform: translateY(-1px); }

/* 更新日志：书写框 */
.log-editor {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.log-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}
.log-input:focus { border-color: var(--primary); }

.log-editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.log-submit,
.log-cancel {
  padding: 6px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.log-submit {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.log-submit:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.log-submit:disabled { opacity: .6; cursor: default; }
.log-cancel {
  background: var(--card);
  color: var(--text);
}
.log-cancel:hover { background: var(--primary-soft); border-color: var(--primary); }

.log-editor-msg { font-size: 13px; }
.log-editor-msg.ok { color: var(--success); }
.log-editor-msg.err { color: #e74c3c; }

/* 移动端 */
@media (max-width: 600px) {
  .nav-inner { flex-direction: column; gap: 10px; }
  .ip-wrap { display: none; }
  .name { font-size: 30px; }
  .card { padding: 22px; }
  .test-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 齿轮设置 */
.gear-wrap { position: relative; }

.gear-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 130px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  overflow: hidden;
  z-index: 200;
}
.gear-menu.show { display: block; }

.gear-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}
.gear-item:hover {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.gear-empty {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-light);
}

/* ===== Profile ===== */
.profile-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.profile-left {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.profile-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.profile-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 32px;
  width: 100%;
  box-sizing: border-box;
}
.profile-avatar-box {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 4px 14px rgba(127,179,229,.35);
  background: var(--card);
  display: block;
}
.avatar-upload {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.avatar-upload:hover { background: var(--primary-deep); }

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.profile-name {
  font-size: 26px;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
  margin: 0;
}

/* 身份标签 */
.role-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: var(--nav-bg);
  color: #fff;
}
.role-tag.role-user { background: var(--nav-bg); color: #fff; }
.role-tag.role-admin { background: #4CAF50; color: #fff; }
.role-tag.role-owner { background: #f0b400; color: #fff; }
/* 写了个性签名的：铭牌显示签名本身，用主题蓝区分 */
.role-tag.role-bio {
  background: var(--primary-deep);
  color: #fff;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* 我的留言 */
.profile-feed {
  padding: 28px 32px;
  width: 100%;
  box-sizing: border-box;
}
.my-msg-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.my-msg-item:last-child { border-bottom: none; }
.my-msg-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  word-break: break-word;
}
.my-msg-time {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 个人主页·我的文章 */
.my-art-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.my-art-item:last-child { border-bottom: none; }
.my-art-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
  word-break: break-word;
}
.my-art-title:hover { color: var(--primary-deep); text-decoration: underline; }
.my-art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}
.my-art-ops {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}
.empty-hint {
  color: var(--text-light);
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.profile-side { padding: 24px; }
.side-section + .side-section {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 20px;
}

.profile-bio {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  min-height: 40px;
  white-space: pre-wrap;
  word-break: break-word;
}
.profile-bio-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}
.profile-bio-input:focus { border-color: var(--primary); }

.profile-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
}
.profile-stat:hover { background: var(--primary-soft); }
.stat-label { font-size: 14px; color: var(--text-light); }
.stat-num {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-deep);
}

.profile-meta {
  font-size: 14px;
  color: var(--text-light);
  padding: 4px 0;
}
.profile-meta span { color: var(--text); }

.edit-fab {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(127,179,229,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
  z-index: 500;
}
.edit-fab:hover {
  background: var(--primary-deep);
  transform: scale(1.05);
}
.edit-fab svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edit-actions {
  position: fixed;
  right: 30px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
}
.edit-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transition: background .2s;
}
.edit-save { background: var(--success); color: #fff; }
.edit-save:hover { background: var(--success-hover); }
.edit-cancel {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border) !important;
}
.edit-cancel:hover { background: var(--primary-soft); }
.edit-pwd { background: var(--primary); color: #fff; }
.edit-pwd:hover { background: var(--primary-deep); }

.generic-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.generic-modal.show { display: flex; }
.generic-box {
  position: relative;
  width: 400px;
  max-width: 90vw;
  max-height: 70vh;
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  padding: 28px 24px 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}
.generic-close {
  position: absolute;
  top: 10px; right: 14px;
  border: none; background: none;
  font-size: 24px; line-height: 1;
  color: var(--text-light);
  cursor: pointer;
}
.generic-close:hover { color: var(--text); }
.generic-title {
  font-size: 20px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text);
}
.generic-body { overflow-y: auto; flex: 1; }

@media (max-width: 700px) {
  .profile-wrap { flex-direction: column; }
  .profile-left { padding-top: 24px; }
  .profile-avatar { width: 120px; height: 120px; }
}

/* ===== 留言板 / 主页的互动按钮：关注、拉黑、举报 ===== */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
}
.act-btn {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  transition: background .15s, color .15s, border-color .15s;
}
.act-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-btn.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.act-btn.danger:hover { border-color: #e5534b; color: #e5534b; }
.act-btn:disabled { opacity: .5; cursor: default; }
.act-btn:disabled:hover { border-color: var(--border); color: var(--text-light); }
.act-btn.dots {
  padding: 3px 10px;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 1px;
}
.act-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 124px;
  z-index: 40;
  padding: 4px;
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.act-menu.show { display: block; }
.act-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.act-menu button:hover { background: var(--primary-soft); }
.act-menu button.danger { color: #e5534b; }
.act-menu button.danger:hover { background: rgba(229,83,75,.12); }
.act-menu button:disabled { color: var(--text-light); cursor: default; }
.act-menu button:disabled:hover { background: none; }

/* 被拉黑的留言：折叠成一条灰提示，留个「取消拉黑」的出口 */
.blocked-item { opacity: .62; }
.blocked-item .msg-text { font-size: 13px; color: var(--text-light); font-style: italic; }

/* 操作结果提示条 */
.social-tip {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--primary-soft);
  border: 1px solid var(--primary);
}
.social-tip.show { display: block; }

/* 后端没重启的警告条 */
.warn-bar {
  display: none;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: rgba(240,180,0,.14);
  border: 1px solid #f0b400;
}
.warn-bar.show { display: block; }

/* ===== 主页：关注 / 拉黑 按钮 ===== */
.profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.profile-actions .act-btn { font-size: 14px; padding: 6px 18px; border-radius: 8px; }

/* ===== 主页：点开「关注 / 粉丝 / 拉黑」看到的人 ===== */
.generic-box { max-height: 72vh; }
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.user-row:last-child { border-bottom: none; }
.user-row:hover { background: var(--primary-soft); }
.user-row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--card);
  border: 1px solid var(--border);
}
.user-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-row-name { font-weight: bold; font-size: 15px; }
.user-row-you { font-weight: normal; font-size: 13px; color: var(--text-light); }
.user-row-uid { font-size: 13px; color: var(--text-light); }

/* ===== 导航栏右上角的信箱 ===== */
/* 按钮外观（36px 圆形、半透明白底）跟主题/后台/齿轮三个图标共用上面那条统一规则，
   这里只负责给未读数红点和下拉面板做定位 */
.mail-wrap { position: relative; display: flex; align-items: center; }
.mail-btn { position: relative; padding: 0; }
.mail-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e5534b;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 17px;
  text-align: center;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--nav-bg);
}
.mail-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  max-width: 86vw;
  z-index: 60;
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  overflow: hidden;
}
.mail-panel.show { display: block; }
.mail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: bold;
  font-size: 15px;
  color: var(--text);
}
.mail-readall {
  border: none;
  background: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.mail-readall:hover { background: var(--primary-soft); }
.mail-list { max-height: 380px; overflow-y: auto; }
.mail-empty {
  margin: 0;
  padding: 24px 14px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}
.mail-item {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.mail-item:last-child { border-bottom: none; }
.mail-item:hover { background: var(--primary-soft); }
.mail-item.new { background: var(--primary-soft); }
.mail-ico {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background: var(--primary);
}
.mail-ico.like { background: #e5534b; }
.mail-ico.report { background: #f0b400; }
.mail-ico.mention { background: #7c5cd6; }
.mail-ico.system { background: #5b8def; }
.mail-body { flex: 1; min-width: 0; }
.mail-line { font-size: 14px; line-height: 1.4; }
.mail-ex {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-time { margin-top: 3px; font-size: 12px; color: var(--text-light); }

/* ---- 信箱下拉里那五栏 ---- */
.mail-cats { padding: 6px; }
.mail-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.mail-cat:hover { background: var(--primary-soft); }
.mail-cat-label { flex: 1; }
.mail-cat-n {
  flex: none;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e5534b;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}
/* 这一栏全读过了，数字就灰着显示总条数 */
.mail-cat-n.zero { background: var(--border); color: var(--text-light); font-weight: normal; }
.mail-cat-go { flex: none; color: var(--text-light); font-size: 16px; }

/* ---- 点某一栏弹出来的小窗 ---- */
.mail-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.42);
}
.mail-modal.show { display: flex; }
.mail-modal-box {
  width: 520px;
  max-width: 100%;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
  overflow: hidden;
}
.mail-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: bold;
  font-size: 16px;
  color: var(--text);
}
.mail-modal-close {
  border: none;
  background: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 6px;
  cursor: pointer;
}
.mail-modal-close:hover { color: var(--text); background: var(--primary-soft); }
.mail-modal-body { flex: 1; overflow-y: auto; }
.mail-modal-body .mail-item { padding: 12px 16px; }

@media (max-width: 700px) {
  .msg-head { flex-wrap: wrap; }
  .mail-panel { right: -70px; width: 290px; }
}
