/* ============================================================
   潮次元 · 用户端网页版 全局样式
   主色：#F59E0B（琥珀黄）  白卡片 + 细边框 + 轻阴影
   ============================================================ */

:root {
  --primary: #F59E0B;
  --primary-dark: #D97706;
  --primary-light: #FEF3C7;
  --primary-bg: #FFFBEB;
  --text: #1F2937;
  --text-2: #4B5563;
  --muted: #9CA3AF;
  --border: #E5E7EB;
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --danger: #EF4444;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.07);
  --topbar-h: 58px;
  --tabbar-h: 56px;
  /* 毛玻璃半透明白 */
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(640px 420px at 12% 0%, rgba(245, 158, 11, 0.14), transparent 62%),
    radial-gradient(720px 520px at 92% 8%, rgba(124, 77, 255, 0.11), transparent 62%),
    radial-gradient(620px 420px at 45% 100%, rgba(16, 185, 129, 0.10), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); }
h1, h2, h3 { font-weight: 600; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ==================== 顶部导航（桌面） ==================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  height: var(--topbar-h);
}
.topbar-in {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
}
.logo-mark-img {
  width: 32px; height: 32px; border-radius: 9px;
  object-fit: cover; display: block; flex-shrink: 0;
}
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.logo-text b { color: var(--primary-dark); }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 14px; border-radius: 8px;
  color: var(--text-2); font-size: 15px; position: relative;
}
.nav a:hover { background: #F3F4F6; color: var(--text); }
.nav a.active { color: var(--primary-dark); font-weight: 600; background: var(--primary-light); }
.nav a .dot {
  position: absolute; top: 4px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
}
.top-right { display: flex; align-items: center; gap: 12px; }

/* 用户框 */
.user-box { display: flex; align-items: center; gap: 10px; }
.user-box .u-name { font-size: 14px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box .login-btn { font-size: 14px; color: var(--primary-dark); font-weight: 600; }

/* ==================== 通用按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  padding: 8px 16px; border-radius: 8px; font-size: 14px;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); border-color: #FECACA; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[hidden] { display: none; }

/* ==================== 头像 ==================== */
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #F3F4F6; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; }
.avatar.lg { width: 64px; height: 64px; }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0;
  background: #F59E0B; user-select: none;
}

/* ==================== 标签 / 话题 chip ==================== */
.tag {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  font-size: 12px; color: var(--primary-dark); background: var(--primary-bg);
  border: 1px solid #FDE68A; white-space: nowrap;
}
.chip {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); background: #fff;
  border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ==================== 卡片 ==================== */
.card {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.card-pad { padding: 18px; }

/* ==================== 页面骨架 ==================== */
.page { padding-top: 20px; padding-bottom: 40px; min-height: 70vh; }
.layout { display: flex; gap: 20px; align-items: flex-start; }
.content-col { flex: 1; min-width: 0; }
.side-col { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }

/* ==================== 左侧站内热搜（桌面） ==================== */
.hot-col {
  width: 250px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: calc(var(--topbar-h) + 16px);
}

.side-title {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.side-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: var(--primary); flex-shrink: 0;
}

/* 热搜列表 */
.hot-list { display: flex; flex-direction: column; }
.hot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform .15s ease;
}
.hot-item:last-child { border-bottom: none; }
.hot-item:hover { transform: translateX(3px); }
.hot-rank {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05); color: var(--muted);
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.hot-rank.top {
  background: linear-gradient(135deg, #FF6B6B, var(--primary));
  color: #fff; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.hot-word {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-item:hover .hot-word { color: var(--primary-dark); }
.hot-count { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ==================== 首页 ==================== */
.feed-head { margin-bottom: 16px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-bar input {
  flex: 1; height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.sort-tabs { display: flex; gap: 8px; }
.sort-tabs .chip { font-size: 13px; }

.topic-bar {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none; margin-bottom: 14px;
}
.topic-bar::-webkit-scrollbar { display: none; }

/* 帖子卡片 */
.post-card { padding: 18px; margin-bottom: 14px; transition: box-shadow .15s ease; }
.post-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-author .a-name { font-weight: 600; font-size: 14px; }
.post-author .a-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.post-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.45; }
.post-title a:hover { color: var(--primary-dark); }
.post-content {
  color: var(--text-2); font-size: 14px; margin-bottom: 12px;
  white-space: pre-line; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-content.expand { -webkit-line-clamp: unset; }
.post-imgs { display: grid; gap: 6px; margin-bottom: 12px; }
.post-imgs.one { grid-template-columns: 1fr; }
.post-imgs.multi { grid-template-columns: repeat(3, 1fr); }
.post-imgs img {
  width: 100%; height: 150px; object-fit: cover; border-radius: 8px;
  background: #F3F4F6; cursor: pointer;
}
.post-imgs.one img { height: auto; max-height: 360px; object-fit: cover; }
.post-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.post-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.post-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.post-topics .tag { cursor: pointer; }

/* 分页 */
.pager-wrap { text-align: center; margin-top: 6px; }
.pager-tip { font-size: 13px; color: var(--muted); padding: 12px 0; }

/* 状态：空 / 加载 */
.state-box { text-align: center; padding: 60px 20px; color: var(--muted); }
.state-box .state-title { font-size: 15px; margin-bottom: 6px; color: var(--text-2); }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 10px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 侧边栏 ==================== */
.side-card .side-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.mini-user { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mini-user .mu-info { min-width: 0; }
.mini-user .mu-name { font-weight: 600; font-size: 14px; }
.mini-user .mu-level { font-size: 12px; color: var(--primary-dark); }
.side-progress { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.progress {
  height: 8px; background: #F3F4F6; border-radius: 999px; overflow: hidden;
}
.progress-bar { height: 100%; background: linear-gradient(90deg, #FBBF24, #F59E0B); border-radius: 999px; transition: width .4s ease; }
.side-link-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; font-size: 14px; color: var(--text-2);
  border-bottom: 1px solid #F3F4F6;
}
.side-link-list a:last-child { border-bottom: none; }
.side-link-list a:hover { color: var(--primary-dark); }
.side-link-list .arrow { color: var(--muted); }

/* ==================== 帖子详情 ==================== */
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-author { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.detail-author .da-info { min-width: 0; }
.detail-author .da-name { font-weight: 600; font-size: 15px; }
.detail-author .da-level { font-size: 12px; color: var(--primary-dark); margin-top: 2px; }
.detail-author .da-level .sep { color: var(--muted); }
.detail-title { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.detail-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-content { font-size: 15px; line-height: 1.85; color: var(--text); white-space: pre-line; word-break: break-word; margin-bottom: 14px; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px 18px; }
.detail-imgs { display: grid; gap: 8px; margin-bottom: 14px; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px 18px; }
.detail-imgs img { width: 100%; border-radius: 10px; background: #F3F4F6; max-height: 560px; object-fit: contain; }
.detail-actions { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 12px 18px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 22px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 14px; transition: all .15s;
}
.like-btn:hover { border-color: var(--primary); }
.like-btn.liked { background: #FEF2F2; border-color: #FECACA; color: var(--danger); }

/* 评论区 */
.comment-sec { margin-top: 18px; }
.comment-sec .sec-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 18px; }
.comment-form textarea {
  flex: 1; min-height: 72px; resize: vertical; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; outline: none; background: #fff;
}
.comment-form textarea:focus { border-color: var(--primary); }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #F3F4F6; }
.comment-item .ci-main { flex: 1; min-width: 0; }
.comment-item .ci-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.comment-item .ci-name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.comment-item .ci-time { font-size: 12px; color: var(--muted); }
.comment-item .ci-content { font-size: 14px; word-break: break-word; white-space: pre-line; }

/* ==================== 登录页 ==================== */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card { padding: 28px 26px; }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo .logo-mark { width: 46px; height: 46px; font-size: 24px; border-radius: 12px; }
.auth-logo .logo-mark-img { width: 46px; height: 46px; border-radius: 12px; }
.auth-logo .auth-name { font-size: 20px; font-weight: 700; margin-top: 10px; }
.auth-tabs { display: flex; background: #F3F4F6; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  border-radius: 8px; font-size: 14px; color: var(--text-2); font-weight: 500;
}
.auth-tabs button.active { background: #fff; color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow); }
.auth-sub-tabs { display: flex; gap: 20px; justify-content: center; margin-bottom: 18px; }
.auth-sub-tabs button { border: none; background: none; font-size: 14px; color: var(--muted); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.auth-sub-tabs button.active { color: var(--primary-dark); font-weight: 600; border-bottom-color: var(--primary); }

.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-item input {
  width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border);
  border-radius: 10px; outline: none; background: #fff; transition: border .15s;
}
.form-item input:focus { border-color: var(--primary); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { height: 42px; flex-shrink: 0; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 14px; line-height: 1.5; }
.auth-submit { width: 100%; height: 44px; font-size: 15px; border-radius: 10px; }

/* ==================== 视频页 ==================== */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.video-card { overflow: hidden; cursor: pointer; transition: box-shadow .15s ease; }
.video-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09); }
.video-cover { position: relative; aspect-ratio: 16/10; background: #111; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-cover .cover-holder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: #27272A; color: #A1A1AA; font-size: 13px;
}
.video-cover .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity .15s;
}
.video-card:hover .play-badge { opacity: 1; }
.play-badge span {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center; color: #111;
}
.video-cover .views {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, 0.55); padding: 2px 8px; border-radius: 999px;
}
.video-info { padding: 10px 12px 12px; }
.video-info .v-title { font-size: 14px; font-weight: 500; line-height: 1.45; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-info .v-cat { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 视频播放 */
.player-box { background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.player-box video { width: 100%; max-height: 60vh; display: block; background: #000; }
.player-info .p-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.player-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.p2p-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; line-height: 1; }
.p2p-badge--active { background: rgba(5, 150, 105, 0.12); color: #059669; border: 1px solid rgba(5, 150, 105, 0.35); }
.p2p-badge--inactive { background: var(--bg-soft, rgba(0,0,0,0.05)); color: var(--muted); border: 1px solid transparent; }

/* ==================== 个人中心 ==================== */
.profile-banner { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; position: relative; }
.profile-banner .bg { height: 150px; background: linear-gradient(120deg, #FDE68A, #F59E0B); background-size: cover; background-position: center; }
.profile-main { display: flex; align-items: flex-end; gap: 16px; padding: 0 20px 18px; margin-top: -34px; }
.profile-main .avatar { width: 72px; height: 72px; border: 3px solid #fff; }
.profile-main .avatar-fallback { width: 72px; height: 72px; border: 3px solid #fff; font-size: 26px; }
.profile-main .pm-info { flex: 1; min-width: 0; padding-bottom: 2px; }
.pm-name { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; }
.level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.level-badge.dim { background: #E5E7EB; color: var(--text-2); }
.pm-title { font-size: 13px; color: var(--primary-dark); margin-top: 4px; }
.pm-stats { display: flex; gap: 22px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pm-stats b { color: var(--text); font-size: 16px; margin-right: 3px; }
.profile-toolbar { display: flex; gap: 10px; padding: 0 20px 18px; flex-wrap: wrap; }

/* ==================== 通知页 ==================== */
.notify-item { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #F3F4F6; }
.notify-item:last-child { border-bottom: none; }
.notify-item.unread { background: var(--primary-bg); }
.notify-item .n-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary-dark);
}
.notify-item .n-content { flex: 1; min-width: 0; font-size: 14px; word-break: break-word; }
.notify-item .n-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.notify-item .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }

/* ==================== 成长体系 ==================== */
.energy-hero { padding: 26px; margin-bottom: 16px; text-align: center; }
.energy-num { font-size: 40px; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }
.energy-num small { font-size: 16px; color: var(--muted); font-weight: 400; }
.energy-level { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.energy-level b { color: var(--primary-dark); }
.energy-progress { max-width: 420px; margin: 18px auto 0; text-align: left; }
.energy-progress .ep-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.level-table { width: 100%; border-collapse: collapse; }
.level-table th, .level-table td { padding: 11px 14px; font-size: 14px; text-align: left; border-bottom: 1px solid #F3F4F6; }
.level-table th { color: var(--muted); font-weight: 500; font-size: 12px; background: #FAFAF9; }
.level-table tr.current td { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
.level-table .lv-no { width: 64px; color: var(--muted); }

/* ==================== 发帖 ==================== */
.publish-title { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.publish-form .form-item textarea { width: 100%; min-height: 140px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; outline: none; resize: vertical; }
.publish-form .form-item textarea:focus { border-color: var(--primary); }
.topic-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-box { display: flex; flex-wrap: wrap; gap: 10px; }
.upload-item { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; border: none; font-size: 12px; line-height: 1;
}
.upload-add {
  width: 96px; height: 96px; border: 1px dashed #D1D5DB; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; cursor: pointer; background: #FAFAF9;
}
.upload-add:hover { border-color: var(--primary); color: var(--primary-dark); }
.upload-add .plus { font-size: 22px; line-height: 1; margin-bottom: 2px; }

/* ==================== 底部 Tab 栏（移动端） ==================== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: var(--tabbar-h);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  display: none; align-items: stretch;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 11px; position: relative;
}
.tab-item svg { width: 21px; height: 21px; }
.tab-item.active { color: var(--primary-dark); font-weight: 600; }
.tab-item .dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.tab-publish { flex: 1; display: flex; align-items: center; justify-content: center; }
.tab-publish a {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(245, 158, 11, .4);
}
.tab-publish svg { width: 22px; height: 22px; }

/* ==================== Toast ==================== */
#toastBox { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(17, 24, 39, 0.92); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  animation: toast-in .2s ease; max-width: 80vw;
}
.toast.error { background: rgba(190, 18, 60, 0.95); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== 骨架屏 ==================== */
.sk-wrap { display: flex; flex-direction: column; gap: 14px; }
.sk-card { padding: 18px; margin-bottom: 0; }
.sk-line {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.10) 50%, rgba(0, 0, 0, 0.05) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: sk-shimmer 1.2s ease-in-out infinite;
}
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== 图片渐显 ==================== */
.img-fade { opacity: 0; transition: opacity .4s ease; }
.img-fade.loaded { opacity: 1; }

/* ==================== 响应式 ==================== */
@media (min-width: 1024px) {
  .tabbar { display: none; }
}
@media (max-width: 1023px) {
  .side-col { display: none; }
  .hot-col { display: none; }
  .topbar-in { gap: 12px; }
  .nav { display: none; }
  .top-right .btn-primary { display: none; } /* 发帖入口交给底部 tab */
  .tabbar { display: flex; }
  .page { padding-bottom: calc(var(--tabbar-h) + 24px); }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .profile-banner .bg { height: 110px; }
  .profile-main { margin-top: -30px; }
}
/* 1024~1279px：空间不足，仅显示右侧栏；≥1280px 三栏（左热搜 + 内容 + 右侧栏） */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hot-col { display: none; }
}
@media (max-width: 640px) {
  .post-imgs.multi { grid-template-columns: repeat(2, 1fr); }
  .detail-title { font-size: 19px; }
  .energy-num { font-size: 34px; }
}
