/* ============================================
   东涌中学校园墙 — 样式系统
   深色/浅色自动切换 (prefers-color-scheme)
   极简黑白配色 + 少量灰色调
   ============================================ */

/* ----- CSS变量：浅色主题（默认） ----- */
:root {
  --bg: #ffffff;
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f3f5;
  --bg-hover: #f0f1f3;
  --bg-input: #f4f5f7;
  --bg-overlay: rgba(0,0,0,0.4);
  --text: #1a1a1a;
  --text-secondary: #5f6672;
  --text-muted: #9aa1ad;
  --border: #e4e7ec;
  --border-focus: #3d434c;
  --accent: #1f2329;
  --accent-hover: #3a414c;
  --accent-text: #ffffff;
  /* 校徽蓝（点缀色） */
  --brand: #0080c0;
  --brand-hover: #006aa3;
  --brand-soft: rgba(0,128,192,0.10);
  --brand-text: #0070b0;
  --danger: #c0392b;
  --danger-hover: #e74c3c;
  --shadow: 0 1px 4px rgba(16,24,40,0.05), 0 4px 16px rgba(16,24,40,0.06);
  --shadow-lg: 0 8px 40px rgba(16,24,40,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- CSS变量：深色主题 ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e10;
    --bg-page: #07080a;
    --bg-card: #141518;
    --bg-card-hover: #1d1f24;
    --bg-hover: #1d1f24;
    --bg-input: #1c1e23;
    --bg-overlay: rgba(0,0,0,0.7);
    --text: #e8e8e8;
    --text-secondary: #9aa1ad;
    --text-muted: #6b7280;
    --border: #26292f;
    --border-focus: #888888;
    --accent: #e8e8e8;
    --accent-hover: #ffffff;
    --accent-text: #0a0a0a;
    /* 校徽蓝（点缀色，深色下提亮） */
    --brand: #2aa8e8;
    --brand-hover: #4db8f0;
    --brand-soft: rgba(42,168,232,0.14);
    --brand-text: #4db8f0;
    --danger: #e74c3c;
    --danger-hover: #ff6b6b;
    --shadow: 0 1px 4px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.55);
  }
}

/* ----- 基础重置 ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg-page);
  background-image:
    radial-gradient(1200px 500px at 100% -100px, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(800px 400px at -100px 110%, var(--brand-soft) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

/* ----- 工具类 ----- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ----- 按钮系统 ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px; border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent); color: var(--accent-text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(0,0,0,0.16); }

.btn-brand {
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 12px rgba(0,128,192,0.25);
}
.btn-brand:hover { background: var(--brand-hover); box-shadow: 0 4px 20px rgba(0,128,192,0.35); }

.btn-outline {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); background: var(--bg-card-hover); }

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* ----- 输入框系统 ----- */
.input-wrap {
  margin-bottom: 16px;
}
.input-wrap label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.input-wrap input,
.input-wrap select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg-input); color: var(--text);
  font-size: 15px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.input-wrap input::placeholder { color: var(--text-muted); }

/* ----- 卡片 ----- */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: background var(--transition), border var(--transition),
              box-shadow var(--transition), transform 0.2s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.card-hover:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg);
}

/* ----- 页面容器 ----- */
.page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  transition: background var(--transition);
}

/* ----- 动画 ----- */
@keyframes fadeInUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in-up { animation: fadeInUp 0.4s var(--transition) both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* vue-router 过渡（可打断：进入/离开独立，滑动+淡入） */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.fade-enter-from { opacity: 0; transform: translateX(14px); }
.fade-leave-to { opacity: 0; transform: translateX(-8px); }

/* ----- 加载动画 ----- */
.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Toast 提示 ----- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: var(--radius);
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); z-index: 9999;
  font-size: 14px; animation: fadeInUp 0.3s ease both;
  max-width: 90vw;
}
.toast-error { border-left: 3px solid var(--danger); }
.toast-success { border-left: 3px solid #27ae60; }

/* ============================================
   通用：页面标题 / 空状态 / 年级选择器
   ============================================ */
.page-title {
  font-size: 20px; font-weight: 700; margin-bottom: 14px;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.page-title .title-count {
  font-size: 12px; font-weight: 600; color: var(--brand-text);
  background: var(--brand-soft); padding: 2px 10px; border-radius: 10px;
}
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text-muted);
}
.empty-state svg {
  width: 48px; height: 48px; stroke-width: 1.5;
  margin-bottom: 12px; opacity: 0.45;
}
.empty-state p { font-size: 14px; }

/* 年级选择器（横向滚动胶囊） */
.grade-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 10px; margin-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.grade-bar::-webkit-scrollbar { display: none; }
.grade-chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.grade-chip:hover { border-color: var(--brand); color: var(--brand-text); }
.grade-chip.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-weight: 600; box-shadow: 0 2px 10px rgba(0,128,192,0.3);
}

/* ============================================
   发帖页
   ============================================ */
.create-card { padding: 20px; }
.create-textarea {
  width: 100%; min-height: 180px; padding: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg-input); color: var(--text); font-size: 14px;
  resize: vertical; outline: none; line-height: 1.7;
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.create-textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none; width: 100%;
  padding: 12px 38px 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--bg-input);
  color: var(--text); font-size: 15px; outline: none; cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.select-wrap select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.select-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 8px; height: 8px; border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* ============================================
   注册页：步骤指示器
   ============================================ */
.step-indicator {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 20px; margin: 8px 0 24px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 0 0 auto; width: 64px;
}
.step-item .step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-input); border: 2px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.step-item .step-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.step-item.active .step-dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 2px 10px rgba(0,128,192,0.3);
}
.step-item.active .step-label { color: var(--brand-text); font-weight: 600; }
.step-item.done .step-dot { border-color: var(--brand); color: var(--brand-text); }
.step-line {
  width: 40px; height: 2px; background: var(--border);
  margin-top: 14px; border-radius: 1px; flex-shrink: 0;
}
.step-line.done { background: var(--brand); }

/* ============================================
   个人资料页
   ============================================ */
.profile-hero {
  padding: 28px 24px; text-align: center; margin-bottom: 16px;
  background:
    radial-gradient(120% 160% at 50% 0%, var(--brand-soft) 0%, transparent 60%),
    var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
}
.profile-name { font-weight: 700; font-size: 19px; color: var(--text); }
.profile-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.profile-sub .pos { color: var(--brand-text); margin-left: 6px; }

/* ============================================
   首页 (/) — 登录页
   ============================================ */
.home-page {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 16px; gap: 24px;
}

/* 校徽 */
.school-badge {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--brand);
  box-shadow: 0 4px 20px var(--brand-soft);
  transition: transform var(--transition), box-shadow var(--transition);
  display: block; margin: 20px auto 12px;
}
.school-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px var(--brand-soft);
}

/* 标题 */
.school-title {
  font-size: 24px; font-weight: 700;
  color: var(--text); letter-spacing: 2px;
  text-align: center; margin: 0 0 4px;
}
.school-subtitle {
  font-size: 14px; color: var(--text-secondary);
  text-align: center; margin-bottom: 24px;
}

/* 登录卡片 */
.login-card {
  width: 100%; max-width: 400px; padding: 28px 24px;
}
.login-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.login-tab {
  flex: 1; padding: 10px 0; text-align: center;
  font-size: 15px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.login-tab.active {
  color: var(--brand-text); border-bottom-color: var(--brand);
  font-weight: 600;
}

.login-card h2 {
  font-size: 18px; margin-bottom: 20px; color: var(--text);
}

/* 注册链接 */
.register-link {
  text-align: center; margin-top: 16px; font-size: 13px;
  color: var(--text-secondary);
}
.register-link a { color: var(--brand-text); text-decoration: none; }

/* 横屏登录布局 */
@media (orientation: landscape) and (min-width: 640px) {
  .login-landscape { display: flex; align-items: center; justify-content: center; min-height: 100vh; max-width: 900px; margin: 0 auto; gap: 48px; padding: 24px; }
  .login-left { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
  .login-left-badge { width: 80px; height: 80px; object-fit: contain; }
  .login-left-text { display: flex; flex-direction: column; justify-content: center; }
  .login-left-title { font-size: 28px; font-weight: 700; color: var(--text); margin: 0; line-height: 1.2; }
  .login-left-sub { font-size: 16px; color: var(--text-secondary); margin: 4px 0 0; }
  .login-right { flex: 1; min-width: 320px; max-width: 400px; }
  .mob-only { display: none !important; }
  .desk-card { box-shadow: var(--shadow-lg); }
}
@media (orientation: portrait), (max-width: 639px) {
  .login-landscape { display: block; }
  .login-left { display: none; }
  .login-right { max-width: 400px; margin: 0 auto; }
}
.register-link a { font-weight: 500; cursor: pointer; }

/* ============================================
   主页 (/home) — 需登录
   ============================================ */
.main-page {
  flex: 1; display: flex; flex-direction: column;
}

/* 顶栏 */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 300;
  transition: background var(--transition);
}

.top-bar-center {
  display: flex; align-items: center; gap: 10px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.top-bar-badge {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.menu-btn, .avatar-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--bg-card-hover);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: var(--text);
}
.menu-btn:hover, .avatar-btn:hover {
  background: var(--border);
}

.avatar-img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover;
}

/* 侧边菜单 */
.side-menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.side-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* 桌面端侧边栏为推挤式布局（内容区右移），无需遮罩层，避免与顶栏合成层互相干扰 */
@media (min-width: 768px) {
  .side-menu-overlay { display: none; }
}

.side-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
  max-width: 80vw; background: var(--bg-card);
  z-index: 201; transform: translateX(-100%);
  transition: transform var(--transition);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.side-menu.open { transform: translateX(0); }

.side-menu-header {
  padding: 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.side-menu-header .menu-badge {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
}

.side-menu-items { flex: 1; padding: 12px 0; overflow-y: auto; }
.side-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; cursor: pointer;
  color: var(--text); font-size: 15px;
  transition: background var(--transition);
}
.side-menu-item:hover { background: var(--bg-card-hover); }
.side-menu-item svg { flex-shrink: 0; }

.side-menu-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
}

/* 主内容区 */
.main-content {
  flex: 1; padding: 20px 16px;
  max-width: 1200px; width: 100%; margin: 0 auto;
  align-self: center;
  transition: margin-left var(--transition);
}

.welcome-card {
  padding: 32px 24px; text-align: center;
}
.welcome-card h2 {
  font-size: 22px; margin-bottom: 8px; color: var(--text);
}
.welcome-card p {
  color: var(--text-secondary); font-size: 14px;
}

/* ============================================
   响应式
   ============================================ */

/* 平板及以上 */
@media (min-width: 768px) {
  .school-title { font-size: 28px; }
  .login-card { padding: 36px 32px; }
  .main-content { padding: 32px 24px; }
}

/* 桌面端 */
@media (min-width: 1024px) {
  .home-page { padding: 40px 24px; gap: 28px; }
  .school-badge { width: 100px; height: 100px; }
  .school-title { font-size: 32px; }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
  .home-page {
    flex-direction: row; flex-wrap: wrap;
    justify-content: center; gap: 16px;
    padding: 16px;
  }
  .school-badge { width: 60px; height: 60px; }
  .school-title { font-size: 20px; }
  .login-card { max-width: 360px; padding: 20px; }
}

/* ============================================
   验证码 & 头像 & 注册组件
   ============================================ */

/* 验证码行 */
.captcha-row {
  display: flex; gap: 10px; align-items: stretch;
}
.captcha-row > div:first-child { flex: 1; }
.captcha-row > div:first-child input { width: 100%; }
.captcha-img {
  width: 100px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  object-fit: cover; flex-shrink: 0;
  transition: border var(--transition);
}
.captcha-img:hover { border-color: var(--border-focus); }

/* 消息提示 */
.msg-ok { color: #27ae60; }
.msg-err { color: var(--danger); }

/* 文本辅助 */
.text-muted { color: var(--text-muted); }

/* 头像预览 */
.avatar-preview-wrap {
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.avatar-preview {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.avatar-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity var(--transition);
}
.avatar-preview-wrap:hover .avatar-overlay { opacity: 1; }

/* 裁切容器 */
.crop-container {
  position: relative; max-width: 300px; margin: 0 auto;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.crop-source {
  width: 100%; display: block; cursor: move;
}

/* ============================================
   主页欢迎卡片（头像+信息）
   ============================================ */
.welcome-card-new {
  position: relative; overflow: hidden; padding: 24px;
  background:
    radial-gradient(120% 160% at 0% 0%, var(--brand-soft) 0%, transparent 55%),
    var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
}
.welcome-badge-bg {
  position: absolute; left: 0; top: 0; bottom: 0;
  height: 100%; width: auto; object-fit: contain;
  object-position: left center;
  mask-image: linear-gradient(to right, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 40%, transparent 100%);
  pointer-events: none;
  opacity: 0.85;
}
.welcome-row {
  display: flex; align-items: center; gap: 16px;
  justify-content: flex-end; position: relative; z-index: 1;
}
.welcome-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--brand);
  box-shadow: 0 2px 12px var(--brand-soft);
  flex-shrink: 0;
}
.welcome-info h2 {
  font-size: 20px; margin: 0; color: var(--text);
}
.welcome-info p {
  color: var(--text-secondary); font-size: 13px; margin-top: 4px;
}
.welcome-sub {
  color: var(--text-secondary); font-size: 12px; opacity: 0.8;
}

/* ============================================
   帖子列表 & 详情 & 评论
   ============================================ */

/* 通知中心 */
.notif-card { padding: 14px 18px; cursor: pointer; margin-bottom: 12px; }
.notif-header { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.notif-badge { background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 2px 7px; min-width: 18px; text-align: center; }
.notif-arrow { margin-left: auto; transition: transform 0.2s; }
.notif-arrow.open { transform: rotate(180deg); }
.notif-list { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.notif-item { padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; animation: fadeInUp 0.3s ease both; }
.notif-item:nth-child(1) { animation-delay: 0s; }
.notif-item:nth-child(2) { animation-delay: 0.05s; }
.notif-item:nth-child(3) { animation-delay: 0.1s; }
.notif-item:nth-child(4) { animation-delay: 0.15s; }
.notif-item:nth-child(5) { animation-delay: 0.2s; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { font-weight: 600; border-left: 3px solid var(--accent); padding-left: 7px; }
.notif-title { font-size: 14px; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 帖子卡片 */
.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-card { padding: 18px; cursor: pointer; transition: all var(--transition); }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.post-card:active { transform: scale(0.99); }
.post-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.post-card-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.post-card-author { font-size: 12px; color: var(--text-muted); }
.post-card-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.post-card-meta { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--text-muted); }
.post-stat { display: flex; align-items: center; gap: 4px; }
.post-stat.liked { color: var(--brand-text); }

/* 帖子详情 */
.post-detail { padding: 22px; }
.post-detail-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.post-detail-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--brand); }
.post-detail-author { font-size: 15px; font-weight: 600; color: var(--text); }
.post-status-tag { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: rgba(244,63,94,0.12); color: #f43f5e; font-weight: 600; flex-shrink: 0; }
.post-menu-wrap { margin-left: auto; position: relative; }
.btn-post-menu { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); transition: all var(--transition); }
.btn-post-menu:hover { background: var(--bg-card-hover); color: var(--text); }
.post-menu-drop { position: absolute; right: 0; top: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 120px; z-index: 10; padding: 4px 0; }
.post-menu-item { padding: 8px 16px; font-size: 13px; cursor: pointer; transition: background var(--transition); }
.post-menu-item:hover { background: var(--bg-card-hover); }
.post-menu-item.danger { color: var(--danger); }
.post-detail-title { font-size: 21px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.post-detail-content { font-size: 15px; line-height: 1.7; color: var(--text); word-break: break-word; }

/* Markdown渲染 */
.md-h1 { font-size: 22px; font-weight: 700; margin: 16px 0 8px; color: var(--text); }
.md-h2 { font-size: 19px; font-weight: 700; margin: 14px 0 6px; color: var(--text); }
.md-h3 { font-size: 16px; font-weight: 600; margin: 12px 0 4px; color: var(--text); }
.md-code { background: var(--bg-card-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 10px 0; white-space: pre; font-family: 'Consolas','Monaco',monospace; }
.md-inline { background: var(--bg-card-hover); border-radius: 4px; padding: 1px 6px; font-size: 13px; font-family: 'Consolas','Monaco',monospace; }
.md-quote { border-left: 3px solid var(--accent); padding: 8px 14px; margin: 10px 0; background: var(--bg-card-hover); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.md-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
/* 图片网格 */
.img-block { display: inline-block; width: calc(33.33% - 6px); margin: 3px; vertical-align: top; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.img-block img { width: 100%; height: 120px; object-fit: cover; display: block; transition: transform 0.2s; }
.img-block img.zoomed { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: auto; height: auto; max-width: 95vw; max-height: 95vh; z-index: 9999; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
@media (max-width: 480px) { .img-block { width: calc(50% - 6px); } }
/* 视频方块 */
.vid-block { position: relative; background: #000; height: 120px; }
.vid-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); cursor: pointer; transition: all 0.2s; }
.vid-cover:hover { background: rgba(0,0,0,0.5); }
.vid-cover svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); transition: transform 0.2s; }
.vid-cover:hover svg { transform: scale(1.15); }
.post-detail-time { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* 评论 */
.comment-item { margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.comment-item:last-child { border-bottom: none; }
.comment-main { display: flex; gap: 10px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar.small { width: 26px; height: 26px; }
.comment-avatar.tiny { width: 18px; height: 18px; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-name { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-to { font-size: 12px; color: var(--text-muted); }
.comment-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.comment-content { font-size: 14px; color: var(--text); line-height: 1.5; word-break: break-word; }
.comment-actions { margin-top: 6px; }
.comment-actions span { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.comment-actions span:hover { color: var(--brand-text); }
.comment-like { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; flex-shrink: 0; color: var(--text-muted); font-size: 11px; }
.comment-like:hover { color: var(--brand-text); }
.comment-like.liked { color: var(--brand-text); }

/* 子评论 */
.sub-comments { margin-left: 40px; margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--border); }
.comment-item.sub { margin-bottom: 8px; padding-bottom: 8px; }

/* 评论底栏 */
.comment-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--border);
  padding: 10px 16px; z-index: 100;
}
.reply-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.comment-bar-row { display: flex; align-items: center; }
.like-btn-post { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 11px; padding: 4px; }
.like-btn-post.liked { color: var(--brand-text); }
.like-btn-post:hover { color: var(--brand-text); }

/* FAB 发帖按钮 */
.fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: #fff;
  border: none; box-shadow: 0 6px 24px rgba(0,128,192,0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 99; transition: all var(--transition);
}
.fab:hover { transform: scale(1.08) rotate(4deg); box-shadow: 0 10px 32px rgba(0,128,192,0.45); }
.fab:active { transform: scale(0.95); }

/* 发帖模式切换 */
.create-mode-bar { display: flex; gap: 4px; }
.mode-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-secondary); cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.mode-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.mode-btn:hover:not(.active) { background: var(--bg-card-hover); }

/* 媒体上传 */
.media-uploads { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.media-item { position: relative; width: 100px; height: 100px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.media-thumb { width: 100%; height: 100%; object-fit: cover; }
.media-remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; border: none; cursor: pointer; font-size: 14px; line-height: 1; transition: background var(--transition); }
.media-remove:hover { background: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* 帖子预览文字 */
.post-card-preview { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* router-link active */
.side-menu-item.router-link-active { background: var(--bg-card-hover); font-weight: 600; }

/* ============================================
   新侧边栏（可折叠）
   ============================================ */
.side-menu-new {
  position: fixed; top: 48px; left: 0; bottom: 0; z-index: 55;
  width: 220px; background: var(--bg-card); border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform var(--transition);
  overflow: hidden;
}
.side-menu-new.open { transform: translateX(0); }
.side-new-header { height: 8px; border-bottom: none; }
.side-new-header .menu-badge { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.side-new-items { padding: 8px; }
.side-new-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; font-size: 14px; transition: all var(--transition); margin-bottom: 2px; white-space: nowrap; }
.side-new-item:hover { background: var(--bg-card-hover); color: var(--text); }
.side-new-item.router-link-active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.side-new-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; border-top: 1px solid var(--border); }
.btn-icon-only { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; width: 100%; }
.btn-icon-only:hover { color: var(--danger); background: var(--bg-card-hover); }

@media (max-width: 767px) {
  /* 移动端：抽屉式覆盖，内容区不推挤 */
}
@media (min-width: 768px) {
  .main-content { margin-left: 0; }
  .side-menu-new.open ~ .main-content {
    margin-left: 220px;
    /* 内容区最大宽度必须扣除侧边栏占位，否则窗口<1420px时横向溢出、顶栏右侧露馅 */
    max-width: calc(100% - 220px);
    max-width: min(1200px, calc(100% - 220px));
  }
}

/* 首页双列 */
.home-grid { display: flex; gap: 20px; max-width: 1200px; margin: 0 auto; }
.home-left { flex: 0 0 300px; min-width: 0; }
.home-right { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .home-grid { flex-direction: column; max-width: 100%; }
  .home-left { flex: none; }
}
.notif-content { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 成绩卡片 */
.score-card { padding: 20px 20px 14px !important; }
.score-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.score-header svg { color: var(--brand); flex-shrink: 0; width: 16px; height: 16px; }
.score-grid { display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.score-item { flex: 1; min-width: 0; text-align: center; padding: 10px 4px; border-right: 1px solid var(--border); transition: background var(--transition); }
.score-item:last-child { border-right: none; }
.score-item:hover { background: var(--brand-soft); }
.score-name { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; }
.score-val { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; }
.score-val.red { color: #e74c3c; }
.score-sub { font-size: 10px; font-weight: 600; margin-top: 2px; }
.score-sub[data-lv="A"] { color: #27ae60; }
.score-sub[data-lv="B"] { color: #f39c12; }
.score-sub[data-lv="C"] { color: #e67e22; }
.score-sub[data-lv="D"] { color: #e74c3c; }

/* 媒体查看器 */
.media-viewer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.media-viewer-overlay.open { opacity: 1; pointer-events: auto; }
.media-viewer-close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,0.1); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 10; }
.media-viewer-close:hover { background: rgba(255,255,255,0.25); }
.media-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 10; }
.media-viewer-nav:hover { background: rgba(255,255,255,0.25); }
.media-viewer-nav.prev { left: 16px; }
.media-viewer-nav.next { right: 16px; }
.media-viewer-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 13px; }
.media-viewer-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.media-viewer-vid { max-width: 90vw; max-height: 85vh; border-radius: 8px; }

/* 通知 */
.notif-bell { position: relative; background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 6px; border-radius: 50%; display: flex; align-items: center; transition: background 0.2s; }
.notif-bell:hover { background: var(--bg-hover); color: var(--text); }
.notif-dot { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 8px; background: #f43f5e; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.notif-overlay { position: fixed; inset: 0; z-index: 200; }
.notif-panel {
  position: fixed; top: 52px; right: 0; width: 360px; max-width: 90vw;
  max-height: calc(100vh - 60px); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12); z-index: 201;
  transform: translateX(100%);
  visibility: hidden; pointer-events: none; opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.3s;
  display: flex; flex-direction: column;
}
.notif-panel.open {
  transform: translateX(0);
  visibility: visible; pointer-events: auto; opacity: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.notif-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.notif-read-all { background: none; border: none; color: var(--brand-text); font-size: 12px; cursor: pointer; }
.notif-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.notif-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.notif-item.unread .notif-item-title { font-weight: 700; }
.notif-item:not(.unread) .notif-item-title { font-weight: 400; color: var(--text-muted); }
.notif-item-body { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.notif-item:not(.unread) .notif-item-body { color: var(--text-muted); }
.notif-item-time { font-size: 11px; color: var(--text-muted); }

.top-bar-actions { display: flex; align-items: center; gap: 4px; }

/* 管理面板帖子内容 */
.admin-post-content { font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-height: 80px; overflow: hidden; cursor: pointer; white-space: pre-wrap; word-break: break-all; margin-bottom: 4px; }
.admin-post-content.expanded { max-height: none; }
.admin-post-expand { font-size: 12px; color: var(--brand-text); cursor: pointer; margin-bottom: 6px; user-select: none; }
.admin-post-expand:hover { text-decoration: underline; }

/* 台风卡片 */
.typhoon-card {
  padding: 14px 16px;
  container-type: inline-size;
}
.typhoon-header { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.typhoon-switch { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.typhoon-nav { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: 50%; background: var(--bg-input); color: var(--text-secondary); cursor: pointer; transition: all var(--transition); padding: 0; }
.typhoon-nav:hover { background: var(--accent); color: var(--accent-text); }
.typhoon-nav svg { width: 15px; height: 15px; }
.typhoon-title { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; min-width: 0; }
.typhoon-type-tag { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: rgba(244,63,94,0.12); color: #f43f5e; font-weight: 600; }
.typhoon-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
/* 预警条（紧凑一行） */
.typhoon-alert-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 10px; background: rgba(244,63,94,0.06); border-radius: 6px; overflow: hidden; }
.typhoon-alert-icon-small { width: 24px; height: 24px; background-size: contain; background-repeat: no-repeat; background-position: center; flex-shrink: 0; }
.typhoon-alert-desc { font-size: 12px; font-weight: 600; color: #f43f5e; white-space: nowrap; }
.typhoon-alert-detail { font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
/* 横版双图 */
.typhoon-horiz { display: flex; gap: 16px; }
.typhoon-horiz-left { flex: 1.25; min-width: 0; }
.typhoon-horiz-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.typhoon-chart-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.typhoon-canvas { display: block; width: 100%; height: 200px; border-radius: 6px; }
.typhoon-legend { display: flex; gap: 16px; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.tlegend-item { display: flex; align-items: center; gap: 4px; }
.tlegend-dot { width: 8px; height: 8px; border-radius: 50%; }
/* 台风事件时间线 */
.typhoon-events { max-height: 280px; overflow-y: auto; padding: 0 4px 0 6px; display: flex; flex-direction: column; }
/* 事件少时垂直居中，避免右栏下方空白；内容多时 auto margin 自动失效恢复滚动 */
.ty-ev-item:first-child { margin-top: auto; }
.ty-ev-item:last-child { margin-bottom: auto; }
.ty-ev-item { display: flex; gap: 10px; padding: 6px 0; border-left: 2px solid var(--border); margin-left: 4px; padding-left: 12px; position: relative; }
.ty-ev-item:first-child { padding-top: 2px; }
.ty-ev-item:last-child { border-left-color: transparent; }
.ty-ev-dot { width: 10px; height: 10px; border-radius: 50%; position: absolute; left: -4px; top: 10px; background: var(--text-muted); }
.ty-ev-dot.ty-ev-start { background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,0.2); }
.ty-ev-dot.ty-ev-up { background: #ff9500; box-shadow: 0 0 0 3px rgba(255,149,0,0.2); }
.ty-ev-dot.ty-ev-now { background: #ff3b30; box-shadow: 0 0 0 3px rgba(255,59,48,0.25); }
.ty-ev-time { font-size: 11px; font-weight: 600; color: var(--text); }
.ty-ev-desc { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.ty-ev-meta { font-size: 11px; color: var(--text-muted); }
.ty-ev-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 24px 0; }

/* 容器查询：卡片自身宽度不足时自动竖排（侧边栏展开/窄窗口都能自适应，不重叠） */
@container (max-width: 820px) {
  .typhoon-horiz { flex-direction: column; gap: 10px; }
  .typhoon-canvas { height: 160px; }
  .typhoon-events { max-height: 140px; }
  .typhoon-alert-bar { margin-bottom: 8px; }
  .typhoon-card { padding: 12px 14px; }
}

/* 职位多选 */
.pos-chip { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s; user-select: none; }
.pos-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pos-chip:hover:not(.on) { border-color: var(--brand); color: var(--brand-text); }

/* 管理页状态标签 */
.status-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.tag-pending { background: #fef3c7; color: #b45309; }
.tag-approved { background: #d1fae5; color: #065f46; }
.tag-rejected { background: #fee2e2; color: #991b1b; }
.tag-pending_manual { background: #fef3c7; color: #b45309; }

/* ============================================================
   web-02 玻璃拟态 Glassmorphism 覆盖层 (2026-08-03)
   磨砂玻璃卡片 / backdrop-filter 模糊 / 柔和渐变 / 悬浮层次
   回退：删除本段即可恢复原样式
   ============================================================ */
:root {
  --glass: rgba(255,255,255,.38);
  --glass-border: rgba(255,255,255,.55);
  --glass-shadow: 0 8px 32px rgba(31,38,135,.12), inset 0 1px 0 rgba(255,255,255,.5);
  --glass-radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --glass: rgba(30,42,70,.40);
    --glass-border: rgba(255,255,255,.14);
    --glass-shadow: 0 8px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07);
  }
}

/* ----- 背景：柔和渐变 + 光斑 ----- */
body {
  background:
    radial-gradient(720px 480px at 8% -6%, rgba(143,211,255,.5) 0%, transparent 60%),
    radial-gradient(560px 420px at 96% 12%, rgba(255,179,224,.4) 0%, transparent 55%),
    radial-gradient(480px 380px at 14% 88%, rgba(255,233,168,.35) 0%, transparent 55%),
    radial-gradient(420px 320px at 92% 78%, rgba(192,240,216,.4) 0%, transparent 55%),
    linear-gradient(135deg,#e3f4ff 0%,#eef3ff 30%,#f8eaff 58%,#fff4e6 82%,#ffeef4 100%);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(720px 480px at 8% -6%, rgba(70,120,220,.28) 0%, transparent 60%),
      radial-gradient(560px 420px at 96% 12%, rgba(150,90,190,.22) 0%, transparent 55%),
      radial-gradient(480px 380px at 14% 88%, rgba(180,140,60,.12) 0%, transparent 55%),
      radial-gradient(420px 320px at 92% 78%, rgba(60,150,180,.16) 0%, transparent 55%),
      linear-gradient(135deg,#0a0f1e 0%,#0d1226 35%,#171033 62%,#1c0f26 82%,#0d1220 100%);
  }
}

/* ----- 玻璃基础 ----- */
.glass,
.card, .login-card, .post-card, .welcome-card-new, .score-card,
.typhoon-card, .create-card, .post-detail, .profile-hero,
.notif-panel, .side-menu-new, .toast, .grade-bar, .select-wrap select,
.input-wrap input, .input-wrap textarea, .create-textarea {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--glass-radius);
}
@media (prefers-color-scheme: dark) {
  .glass, .card, .login-card, .post-card, .welcome-card-new, .score-card,
  .typhoon-card, .create-card, .post-detail, .profile-hero,
  .notif-panel, .side-menu-new, .toast, .grade-bar {
    border: 1px solid var(--glass-border);
  }
}

/* 卡片悬浮层次 */
.card:hover, .post-card:hover { transform: translateY(-3px); }
.card, .post-card, .login-card, .welcome-card-new, .score-card,
.typhoon-card, .create-card, .post-detail, .profile-hero {
  transition: transform .3s cubic-bezier(.2,.8,.3,1), box-shadow .3s,
              background var(--transition), border var(--transition);
}
.card:hover, .post-card:hover, .login-card:hover {
  box-shadow: 0 20px 44px rgba(31,38,135,.18), inset 0 1px 0 rgba(255,255,255,.6);
}

/* ----- 顶栏：玻璃胶囊（GPU合成bug回退：不支持blur时实心） ----- */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .top-bar {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(31,38,135,.08);
  }
}
@media (prefers-color-scheme: dark) {
  .top-bar { border-bottom-color: var(--glass-border); }
}

/* ----- 按钮：渐变胶囊 ----- */
.btn-brand {
  background: linear-gradient(120deg,#5b8def,#a06bff);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(91,141,239,.35);
  transition: transform .25s, box-shadow .25s;
}
.btn-brand:hover {
  background: linear-gradient(120deg,#4d7ee6,#945ff0);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(91,141,239,.45);
}
.btn-primary {
  border-radius: 999px;
  background: linear-gradient(120deg,#0080c0,#5b8def);
  box-shadow: 0 6px 18px rgba(0,128,192,.3);
}
.btn-primary:hover {
  background: linear-gradient(120deg,#006aa3,#4d7ee6);
  box-shadow: 0 10px 24px rgba(0,128,192,.4);
}
.btn-outline {
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ----- 文字：渐变强调 ----- */
.school-title, .login-left-title {
  background: linear-gradient(120deg,#3f8efc,#a06bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: dark) {
  .school-title, .login-left-title {
    background: linear-gradient(120deg,#4db8f0,#b98aff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ----- 悬浮按钮 FAB ----- */
.fab {
  background: linear-gradient(120deg,#5b8def,#a06bff);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(91,141,239,.45);
}
.fab:active { transform: scale(.95); }

/* ----- 年级选择 chips ----- */
.grade-chip {
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}
.grade-chip.active {
  background: linear-gradient(120deg,#5b8def,#a06bff);
  border-color: transparent;
  color: #fff;
}

/* ----- 空状态/杂项文字微调 ----- */
.empty-state p, .notif-item-time, .post-card-meta { color: rgba(31,38,80,.55); }
@media (prefers-color-scheme: dark) {
  .empty-state p, .notif-item-time, .post-card-meta { color: rgba(220,228,255,.5); }
}

/* ----- 桌面端间距微调：信息卡片与台风卡片拉开 ----- */
.home-grid { gap: 28px; }
.typhoon-card { margin-top: 28px; }
.home-right .card, .home-left .card { margin-bottom: 20px; }
@media (max-width: 900px) {
  .home-grid { gap: 20px; }
  .typhoon-card { margin-top: 20px; }
}

/* ============================================================
   侧边栏 v2：垂直居中 60% 高悬浮胶囊（2026-08-03）
   ============================================================ */
.side-menu-new {
  top: 20vh;
  bottom: auto;
  height: 60vh;
  width: 200px;
  border-radius: 0 24px 24px 0;
  border-right: none;
  box-shadow: 0 16px 48px rgba(31,38,135,.18), inset 0 1px 0 rgba(255,255,255,.5);
}
.side-new-header { height: 14px; }
.side-new-items { padding: 10px 10px; }
.side-new-footer {
  position: static;
  border-top: none;
  padding: 8px 10px 12px;
}
.side-new-item { padding: 11px 12px; border-radius: 14px; }

/* 桌面端：悬浮式（遮罩显示 + 内容区不推挤） */
.side-menu-overlay { display: block; }
@media (min-width: 768px) {
  .side-menu-overlay { display: block; }
  .side-menu-new.open ~ .main-content {
    margin-left: 0 !important;
    max-width: 1200px !important;
  }
}


/* ============================================================
   侧边栏打开时防暗：遮罩调浅 + 顶栏/侧边栏背景提实
   （半透明玻璃会透出遮罩黑色，需提高自身不透明度）
   ============================================================ */
.side-menu-overlay {
  background: rgba(15, 23, 42, 0.22);
}
@media (prefers-color-scheme: dark) {
  .side-menu-overlay { background: rgba(0, 0, 0, 0.45); }
}

.side-menu-new {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
@media (prefers-color-scheme: dark) {
  .side-menu-new { background: rgba(18, 26, 44, 0.92); }
}

/* 顶栏：玻璃保持通透，但叠加更实底色防遮罩透黑 */
.top-bar {
  background: rgba(255, 255, 255, 0.85) !important;
}
@media (prefers-color-scheme: dark) {
  .top-bar { background: rgba(18, 24, 38, 0.88) !important; }
}


/* ============================================================
   收藏功能 + 个人主页 + 修改弹窗 (2026-08-03)
   ============================================================ */
/* 帖子卡片收藏 */
.fav-stat { cursor: pointer; user-select: none; transition: all 0.2s; }
.fav-stat:hover { color: #f59e0b; }
.fav-stat.faved { color: #f59e0b; }
.post-stat.fav-stat { display: inline-flex; align-items: center; gap: 4px; }

/* 帖子详情收藏按钮 */
.post-fav-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 8px; padding: 5px 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--glass); color: var(--text-secondary);
  font-size: 12px; cursor: pointer; transition: all var(--transition);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.post-fav-btn:hover { border-color: #f59e0b; color: #f59e0b; }
.post-fav-btn.faved { border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,0.12); }

/* 个人主页 */
.profile-hero-new { text-align: center; padding: 28px 24px; }
.profile-info-list { margin-top: 18px; text-align: left; border-top: 1px solid var(--border); padding-top: 12px; }
.profile-info-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.profile-info-item:last-child { border-bottom: none; }
.pii-label { color: var(--text-muted); font-size: 13px; }
.pii-val { color: var(--text); font-weight: 500; }
.fav-section-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.fav-section-head svg { color: #f59e0b; }
.fav-count { font-size: 12px; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); padding: 2px 10px; border-radius: 10px; }

/* 修改弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500; background: rgba(15,23,42,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: modalFade 0.25s ease both;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: 100%; max-width: 440px; max-height: 86vh; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: 24px; box-shadow: 0 24px 64px rgba(15,23,42,0.3);
  animation: modalPop 0.28s cubic-bezier(0.2,0.8,0.3,1) both;
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 8px; display: flex; }
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-body { padding: 18px 20px 22px; }
.avatar-edit-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-edit-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); }


/* ============================================================
   头像裁切弹窗 (2026-08-03)
   ============================================================ */
/* 更换头像按钮边框 */
.avatar-edit-row .btn-outline {
  border: 1.5px solid var(--brand);
  color: var(--brand-text);
  background: transparent;
}
.avatar-edit-row .btn-outline:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* 裁切弹窗 */
.crop-overlay {
  position: fixed; inset: 0; z-index: 600; background: rgba(10,14,24,0.82);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: modalFade 0.25s ease both;
}
.crop-box {
  width: 100%; max-width: 420px; background: var(--bg-card);
  border: 1px solid var(--glass-border); border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4); overflow: hidden;
  animation: modalPop 0.28s cubic-bezier(0.2,0.8,0.3,1) both;
}
.crop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.crop-stage {
  position: relative; margin: 18px auto; width: 300px; height: 300px;
  border-radius: 16px; overflow: hidden; background: #0b0f18;
  touch-action: none; user-select: none;
}
.crop-img {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  cursor: grab; max-width: none;
}
.crop-img.dragging { cursor: grabbing; }
.crop-frame {
  position: absolute; left: 50%; top: 50%;
  width: 216px; height: 216px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(10,14,24,0.55);
  pointer-events: none;
}
.crop-frame::before, .crop-frame::after {
  content: ''; position: absolute; background: rgba(255,255,255,0.35);
}
.crop-frame::before { left: 50%; top: -8px; bottom: -8px; width: 1px; transform: translateX(-50%); }
.crop-frame::after { top: 50%; left: -8px; right: -8px; height: 1px; transform: translateY(-50%); }
.crop-zoom-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 0 20px 16px;
}
.crop-zoom-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.crop-zoom-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.crop-zoom-val { font-size: 12px; color: var(--text-muted); width: 44px; text-align: center; }
.crop-foot {
  display: flex; gap: 10px; padding: 0 20px 20px;
}
.crop-foot .btn { flex: 1; }


/* ============================================================
   通知中心 UI 优化 (2026-08-03)
   提高不透明度防透字 + 去多余分割线 + 卡片式列表
   ============================================================ */
.notif-panel {
  background: rgba(255, 255, 255, 0.96) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: -8px 0 32px rgba(15,23,42,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  border-radius: 20px 0 0 20px;
}
@media (prefers-color-scheme: dark) {
  .notif-panel {
    background: rgba(22, 28, 46, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  }
}
/* 标题区：去掉生硬分割线，用柔和阴影分隔 */
.notif-panel-header {
  border-bottom: none !important;
  padding: 16px 18px 12px;
  font-size: 16px;
}
.notif-list { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
/* 通知项：卡片化，去掉分割线，未读用左侧圆点+浅色底 */
.notif-item {
  padding: 12px 14px;
  border-bottom: none !important;
  border-radius: 14px;
  background: rgba(255,255,255,0.5);
  transition: background 0.15s, transform 0.15s;
}
@media (prefers-color-scheme: dark) {
  .notif-item { background: rgba(255,255,255,0.04); }
}
.notif-item:hover { background: var(--brand-soft); }
.notif-item.unread {
  border-left: none !important;
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
  padding-left: 14px;
}
.notif-item:not(.unread) { opacity: 0.85; }
.notif-item-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.notif-item:not(.unread) .notif-item-title { color: var(--text-secondary); font-weight: 600; }
.notif-item-body { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; line-height: 1.5; }
.notif-item:not(.unread) .notif-item-body { color: var(--text-muted); }
.notif-item-time { font-size: 11px; color: var(--text-muted); }


/* ============================================================
   发帖媒体：压缩标记 + 原图切换 (2026-08-03)
   ============================================================ */
.media-item { position: relative; }
.media-tag-row {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.media-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  background: rgba(15,23,42,0.65); color: #fbbf24;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.media-tag.on { background: rgba(245,158,11,0.9); color: #fff; border-color: transparent; }
.media-tag-hint { font-size: 10px; color: rgba(255,255,255,0.85); background: rgba(15,23,42,0.5); padding: 2px 8px; border-radius: 999px; }


/* ============================================================
   匿名帖子 (2026-08-03)
   ============================================================ */
/* 匿名作者显示 */
.anon-header { display: flex; align-items: center; gap: 8px; }
.anon-author {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 12px;
}
.anon-author svg { color: var(--text-muted); }
.post-detail .anon-author { font-size: 13px; color: var(--text-muted); }

/* 发帖页匿名开关 */
.anon-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding: 10px 14px;
  background: var(--bg-input); border-radius: var(--radius-sm);
}
.anon-label {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; font-size: 14px; font-weight: 500;
  color: var(--text);
}
.anon-label input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer;
}
.anon-switch { display: inline-flex; align-items: center; gap: 5px; }
.anon-switch svg { color: var(--text-secondary); }
.anon-label input:checked ~ .anon-switch { color: var(--brand-text); }
.anon-label input:checked ~ .anon-switch svg { color: var(--brand); }
.anon-tip { font-size: 12px; color: var(--text-muted); }


/* ============================================================
   通知中心 v3：居中窗口 + 铃铛展开/缩回动画 (2026-08-03)
   ============================================================ */
.notif-pop {
  position: fixed; top: 58px; right: 10px;
  width: 380px; max-width: 92vw;
  max-height: min(560px, calc(100vh - 80px));
  margin: 0;
  transform: translateY(6px) scale(0.6);
  opacity: 0; visibility: hidden; pointer-events: none;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.22), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.22s ease,
              visibility 0s linear 0.26s;
  display: flex; flex-direction: column;
}
.notif-pop.open {
  visibility: visible; pointer-events: auto;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.22s ease;
}
/* 头部右侧：全部已读 + 关闭按钮 */
.notif-head-actions { display: flex; align-items: center; gap: 6px; }
.notif-close-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; border-radius: 8px; display: flex;
  transition: all 0.2s;
}
.notif-close-btn:hover { background: var(--bg-hover); color: var(--text); }
/* 铃铛展开时隐藏 */
.notif-bell.hidden { opacity: 0; transform: scale(0); pointer-events: none; }
.notif-bell { transition: opacity 0.22s ease, transform 0.22s ease; }
/* 定位由 .notif-pop 接管（右上角弹出） */


/* ============================================================
   去除点击/聚焦时的蓝色高亮 (2026-08-03)
   ============================================================ */
* {
  -webkit-tap-highlight-color: transparent;
}
button, a, .btn, .grade-chip, .media-tag, .post-stat, .notif-item,
.fav-stat, .typhoon-nav, .side-new-item, .mode-btn, .crop-zoom-btn,
input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus, a:focus, .btn:focus, input:focus, select:focus, textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}
/* 保留输入框的自定义聚焦边框（品牌色），仅去掉浏览器默认 outline */
.input-wrap input:focus, .input-wrap select:focus, .create-textarea:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px var(--brand-soft) !important;
}


/* ============================================================
   Apple 风格问候字「你好」(2026-08-03, 来自 apple-hello.html)
   桌面端：校徽下方；手机端：登录卡片上方
   ============================================================ */
/* 桌面端登录区改为竖排（校徽 → 你好 → 标题） */
@media (orientation: landscape) and (min-width: 640px) {
  .login-left { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .login-left-badge { margin-bottom: 6px; }
}

/* Apple 式问候字：极细字重、宽松字距、柔和浮现（替代副标题，字号缩小） */
.hello-word {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 200;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  color: var(--text);
  line-height: 1.3;
  text-align: center;
  transform: translateY(14px);
  opacity: 0;
  filter: blur(10px);
  animation: helloIn 1.6s cubic-bezier(.16,.84,.3,1) forwards,
             helloGlow 4.5s ease-in-out 1.6s infinite;
  will-change: transform, opacity, filter;
}
/* 手机端字号 */
.hello-sub.mob-only {
  font-size: clamp(18px, 4.6vw, 24px);
  margin: 2px auto 0;
  display: block;
  width: fit-content;
}
/* 切换淡出 */
.hello-word.fadeout { animation: helloOut 0.8s ease forwards; }


@keyframes helloIn {
  0% { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(14px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
/* 浮现后的呼吸光晕（校徽蓝调） */
@keyframes helloGlow {
  0%, 100% { text-shadow: 0 0 26px rgba(0,128,192,.18), 0 0 80px rgba(0,128,192,.10); }
  50% { text-shadow: 0 0 40px rgba(0,128,192,.34), 0 0 110px rgba(0,128,192,.18); }
}
@media (prefers-color-scheme: dark) {
  .hello-word { color: #fdfdfd; }
  @keyframes helloGlowDark {
    0%, 100% { text-shadow: 0 0 26px rgba(120,160,255,.25), 0 0 80px rgba(120,140,255,.12); }
    50% { text-shadow: 0 0 40px rgba(160,190,255,.45), 0 0 110px rgba(120,140,255,.22); }
  }
  .hello-word { animation: helloIn 2.1s cubic-bezier(.16,.84,.3,1) forwards,
                helloGlowDark 4.5s ease-in-out 2.1s infinite; }
}

/* 淡出切换（多语言轮播用） */
@keyframes helloOut {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-10px) scale(.98); filter: blur(8px); }
}


/* ============================================================
   评论发图 (2026-08-03)
   ============================================================ */
/* 评论图片按钮 */
.comment-img-btn {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}
.comment-img-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 评论图片预览行 */
.comment-img-preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px;
  background: var(--bg-input);
  border-radius: 12px;
  position: relative;
}
.comment-img-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
}
.comment-img-remove {
  position: absolute; top: 2px; right: 4px;
  width: 22px; height: 22px;
  border: none; border-radius: 50%;
  background: rgba(15,23,42,0.6);
  color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* 评论里的图片 */
.comment-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
  margin-top: 6px;
  cursor: zoom-in;
  display: block;
}


/* 评论多图预览：横向排列 */
.comment-img-item {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--bg-input);
  border-radius: 10px;
}

.comment-img-count {
  font-size: 11px; color: var(--text-muted);
  margin-left: auto; padding-right: 4px;
}


/* ============================================================
   用户协议：勾选框 + 弹窗 (2026-08-05)
   ============================================================ */
/* 勾选框 */
.agree-check {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-secondary);
}
.agree-check input { display: none; }
.agree-check-box {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong, var(--border));
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all 0.2s;
  background: var(--bg-input);
}
.agree-check input:checked + .agree-check-box {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.agree-check-text { line-height: 1.4; }
.agree-link {
  color: var(--brand-text);
  text-decoration: none;
  font-weight: 500;
  margin-left: 2px;
}
.agree-link:hover { text-decoration: underline; }

/* 协议弹窗 */
.agree-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.agree-modal {
  width: min(560px, 94vw);
  max-height: 82vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.agree-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.agree-title { font-size: 17px; font-weight: 700; color: var(--text); }
.agree-close {
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: var(--bg-hover, rgba(0,0,0,0.06));
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.agree-close:hover { background: var(--brand-soft); color: var(--brand-text); }
.agree-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.7;
}
.agree-h {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  margin: 14px 0 6px;
}
.agree-p {
  font-size: 13px; color: var(--text-secondary);
  margin: 0 0 8px;
}
.agree-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}


/* ============================================================
   关注功能 (2026-08-05)
   ============================================================ */
/* 头像可点击 */
.post-card-avatar.clickable, .comment-avatar.clickable {
  cursor: pointer;
  transition: transform 0.2s;
}
.post-card-avatar.clickable:hover, .comment-avatar.clickable:hover {
  transform: scale(1.08);
}

/* 他人主页 */
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
  box-shadow: 0 4px 16px var(--brand-soft);
}
.profile-name { font-size: 20px; font-weight: 700; color: var(--text); }
.profile-meta { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* 关注按钮 */
.follow-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 18px;
  border-radius: 980px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.follow-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.follow-btn.following {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-strong, var(--border));
}
.follow-btn.following:hover {
  color: var(--danger, #e5484d);
  border-color: var(--danger, #e5484d);
}

/* 统计 */
.profile-stats {
  display: flex; gap: 32px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 17px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }


/* 我关注的人列表 */
.following-list {
  display: flex; flex-direction: column; gap: 4px;
}
.following-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.following-item:hover { background: var(--bg-hover, rgba(0,0,0,0.04)); }
.following-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--brand);
}
.following-info { flex: 1; min-width: 0; }
.following-name { font-size: 14px; font-weight: 600; color: var(--text); }
.following-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.following-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }


/* ============================================================
   投票功能 (2026-08-05)
   ============================================================ */
/* 发帖页投票编辑器 */
.poll-editor {
  border: 1.5px dashed var(--border-strong, var(--border));
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-input);
}
.poll-editor-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.poll-editor-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--brand-text);
}
.poll-editor-remove {
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.poll-editor-remove:hover { background: var(--danger-soft, rgba(229,72,77,0.1)); color: var(--danger, #e5484d); }
.poll-q-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); color: var(--text);
  font-size: 13px; outline: none;
  margin-bottom: 10px;
}
.poll-q-input:focus { border-color: var(--brand); }
.poll-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.poll-opt-row { display: flex; gap: 6px; align-items: center; }
.poll-opt-row input {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); color: var(--text);
  font-size: 13px; outline: none;
}
.poll-opt-row input:focus { border-color: var(--brand); }
.poll-opt-del {
  width: 28px; height: 28px; flex-shrink: 0;
  border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.poll-opt-del:hover:not(:disabled) { background: var(--danger-soft, rgba(229,72,77,0.1)); color: var(--danger, #e5484d); }
.poll-opt-del:disabled { opacity: 0.3; cursor: not-allowed; }

/* 详情页投票卡片 */
.poll-card {
  margin-top: 16px; padding: 16px;
  border: 1.5px solid var(--border-strong, var(--border));
  border-radius: 16px;
  background: var(--bg-input);
}
.poll-card-q { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.poll-total { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
}
.poll-opt:hover { border-color: var(--brand); transform: translateY(-1px); }
.poll-opt.selected { border-color: var(--brand); background: var(--brand-soft); }
.poll-opt-letter {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.poll-opt-text { font-size: 14px; color: var(--text); z-index: 1; }
.poll-opt-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--brand-soft);
  opacity: 0.55;
  transition: width 0.4s ease;
}
.poll-opt-pct { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand-text); z-index: 1; }
.poll-opt-count { font-size: 12px; color: var(--text-muted); z-index: 1; }
.poll-opt-check { color: var(--brand-text); z-index: 1; display: flex; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.poll-hint { font-size: 12px; color: var(--text-muted); }
.poll-cancel {
  border: none; background: none;
  color: var(--text-muted); font-size: 12px;
  cursor: pointer; text-decoration: underline;
}
.poll-cancel:hover { color: var(--danger, #e5484d); }

/* 评论删除按钮 */
.comment-del {
  color: var(--text-muted) !important;
  margin-left: 10px;
  font-size: 12px;
}
.comment-del:hover { color: var(--danger, #e5484d) !important; }
