/* ============ 武松社区 - 时尚科技风格 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
/* 页面切换流畅动画 */
.page { animation: pageIn .3s cubic-bezier(.22,.68,.35,1); will-change: opacity, transform; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px) scale(.995); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
/* 列表项依次入场 */
.feed-item, .article-card, .comment-item, .friend-item { animation: itemIn .35s ease-out backwards; }
.feed-item:nth-child(1), .article-card:nth-child(1) { animation-delay: .02s; }
.feed-item:nth-child(2), .article-card:nth-child(2) { animation-delay: .05s; }
.feed-item:nth-child(3), .article-card:nth-child(3) { animation-delay: .08s; }
.feed-item:nth-child(4), .article-card:nth-child(4) { animation-delay: .11s; }
.feed-item:nth-child(5), .article-card:nth-child(5) { animation-delay: .14s; }
@keyframes itemIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 全局点击反馈 */
button, .feed-item, .article-card, .menu-item, .category-card, .role-card { transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
button:active, .menu-item:active, .category-card:active, .role-card:active { transform: scale(.96); }
.feed-item:active, .article-card:active { transform: scale(.98); }
/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
:root {
  --primary: #00d4ff;
  --primary2: #7c3aed;
  --primary-grad: linear-gradient(135deg, #00d4ff, #7c3aed);
  --bg: #0a0e1a;
  --bg2: #111827;
  --card: rgba(255,255,255,.06);
  --card-border: rgba(255,255,255,.1);
  --text: #e8eaf0;
  --text-light: #8b92a8;
  --border: rgba(255,255,255,.08);
  --danger: #ff4757;
  --success: #00e5a0;
  --warning: #ffaa00;
  --radius: 16px;
  --top-bar-h: 56px;
  --bottom-nav-h: 62px;
  --glow: 0 0 20px rgba(0,212,255,.3);
}
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}
/* 背景装饰 */
body::before {
  content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,212,255,.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(124,58,237,.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(0,229,160,.06) 0%, transparent 40%);
  z-index: 0; pointer-events: none;
}

/* ============ 顶部导航 ============ */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-bar-h);
  background: rgba(10,14,26,.8); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100; border-bottom: 1px solid var(--border);
}
/* 聊天室/我的页面：顶部功能区从界面与布局中彻底移除（display:none，不占位、不渲染） */
.top-bar.hide,
body.hide-topbar .top-bar { display: none !important; }
/* 隐藏顶栏后：主内容区去掉顶部留白 */
body.hide-topbar .main-content { padding-top: 0 !important; }
/* 仅聊天室：去掉底部留白、外层不滚动，由消息区内部滚动 */
body.chat-mode .main-content { padding-bottom: 0 !important; overflow: hidden; }
body.chat-mode .bottom-nav, body.chat-mode .bottom-nav { z-index: 60; }
/* 消息区底部留白，确保最后一条消息不被输入区遮挡 */
body.chat-mode .chat-messages { padding-bottom: 8px; }
.top-bar-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
}
.logo { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; font-size: 18px; cursor: pointer; }
.logo-img { height: 36px; border-radius: 8px; box-shadow: 0 0 12px rgba(0,212,255,.25); }
.logo-icon { font-size: 22px; filter: drop-shadow(0 0 8px rgba(0,212,255,.6)); }
.logo-text {
  background: var(--primary-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.top-actions { display: flex; gap: 4px; }
.top-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: transparent; border: none; color: var(--text); cursor: pointer;
  padding: 4px 10px; border-radius: 10px; transition: all .2s;
}
.top-btn:hover { background: rgba(0,212,255,.1); color: var(--primary); }
.top-btn .btn-icon { font-size: 18px; }
.top-btn .btn-label { font-size: 11px; opacity: .8; }

/* ============ 搜索栏 ============ */
.search-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(17,24,39,.9); backdrop-filter: blur(20px);
  padding: 10px 12px; z-index: 99;
  border-bottom: 1px solid var(--border);
  display: none;
}
.search-bar.show { display: block; }
.search-inner { display: flex; gap: 8px; max-width: 1200px; margin: 0 auto; }
.search-inner input {
  flex: 1; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; outline: none;
  background: rgba(255,255,255,.05); color: var(--text);
}
.search-inner input::placeholder { color: var(--text-light); }
.search-inner input:focus { border-color: var(--primary); box-shadow: 0 0 12px rgba(0,212,255,.2); }
.search-inner button {
  padding: 8px 20px; background: var(--primary-grad); color: #fff;
  border: none; border-radius: 20px; cursor: pointer; font-size: 14px;
  font-weight: 600;
}
.close-btn {
  background: none !important; border: none !important; font-size: 18px;
  color: var(--text-light) !important; padding: 4px 8px !important;
}

/* ============ 分类面板 ============ */
.category-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.category-mask.show { opacity: 1; pointer-events: auto; }
.category-panel {
  position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
  background: rgba(17,24,39,.95); backdrop-filter: blur(20px);
  z-index: 201; transition: right .3s; overflow-y: auto;
  border-left: 1px solid var(--border);
}
.category-panel.show { right: 0; }
.category-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.category-panel-header h3 { font-size: 17px; color: var(--text); }
.category-list { padding: 8px 0; }
.category-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; cursor: pointer; transition: all .2s;
  color: var(--text);
}
.category-item:hover {
  background: rgba(0,212,255,.06);
}
.cat-icon { font-size: 20px; }
.cat-name { font-size: 15px; flex: 1; }
.cat-arrow { font-size: 20px; color: var(--text-light); opacity: .6; }

/* 分类二级页面 */
.category-page-list {
  padding: 12px 20px 120px;
  max-width: 600px;
  margin: 0 auto;
  min-height: 60vh;
}
.category-page-list .category-item {
  margin: 6px 12px;
  border-radius: 12px;
  background: var(--card);
  border-left: none !important;
  border: 1px solid var(--border);
}
.category-page-list .category-item:hover,
.category-page-list .category-item.active {
  background: rgba(0,212,255,.1);
  border-color: var(--primary);
}

/* ============ 主内容区 ============ */
.main-content {
  padding-top: 0;
  padding-bottom: var(--bottom-nav-h);
  height: 100vh; overflow-y: auto; overflow-x: hidden;
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
}
.page { display: none; min-height: 100%; overflow-x: hidden; }
.page.active { display: block; }
#page-mine { padding-bottom: 90px; }
#page-mine .mine-menu { margin-bottom: 16px; }
#page-security .form-container { padding-bottom: 100px; }

/* ============ 首页 ============ */
.banner {
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(124,58,237,.15));
  border-bottom: 1px solid var(--border);
  padding: 40px 20px; text-align: center;
  position: relative; overflow: hidden;
}
.banner::before {
  content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; background: radial-gradient(circle, rgba(0,212,255,.2), transparent 70%);
  pointer-events: none;
}
.banner h1 {
  font-size: 30px; margin-bottom: 8px; font-weight: 800;
  background: var(--primary-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0,212,255,.3));
}
.banner p { color: var(--text-light); font-size: 14px; letter-spacing: 2px; }
.banner-logo {
  width: 72px; height: 72px; border-radius: 18px; object-fit: cover;
  box-shadow: 0 0 30px rgba(0,212,255,.4); margin-bottom: 12px;
}

/* 首页中间功能区（签到/客服/分类/搜索）：固定4列grid，杜绝换行错乱 */
.home-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 18px 14px 6px;
}
.home-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  background: rgba(255,255,255,.08); background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 16px; color: var(--text); cursor: pointer;
  font-size: 12px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: all .25s;
}
.home-action-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(0,212,255,.4);
  box-shadow: 0 8px 20px rgba(0,212,255,.15), 0 0 0 1px rgba(0,212,255,.2);
}
.ha-icon { font-size: 24px; filter: drop-shadow(0 0 8px rgba(0,212,255,.4)); }

.filter-tabs {
  display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
  background: transparent;
}
.tab {
  padding: 7px 18px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: all .2s; color: var(--text-light); backdrop-filter: blur(10px);
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active {
  background: var(--primary-grad); color: #fff; border-color: transparent;
  box-shadow: 0 0 16px rgba(0,212,255,.4);
}

.article-list { padding: 12px; }
.article-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px;
  margin-bottom: 12px; backdrop-filter: blur(10px);
  cursor: pointer; transition: all .25s;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,212,255,.4);
  box-shadow: 0 8px 24px rgba(0,212,255,.15), 0 0 0 1px rgba(0,212,255,.2);
}
.article-card-title {
  font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4;
  color: var(--text);
}
.article-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-light); }
.article-card-cover {
  width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin: 8px 0;
}
.article-card-excerpt {
  font-size: 13px; color: var(--text-light); line-height: 1.6; margin: 8px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px;
  font-weight: 500;
}
.badge-video { background: rgba(255,170,0,.15); color: var(--warning); border: 1px solid rgba(255,170,0,.3); }
.badge-image { background: rgba(0,212,255,.15); color: var(--primary); border: 1px solid rgba(0,212,255,.3); }
.badge-text { background: rgba(139,146,168,.15); color: var(--text-light); border: 1px solid rgba(139,146,168,.3); }
.loading { text-align: center; padding: 20px; color: var(--text-light); }

/* ============ 文章详情（公众号风格） ============ */
/* 文章页：隐藏全局底部主导航，主内容区不滚动（由 .article-scroll 内部滚动） */
body.article-mode .bottom-nav { display: none; }
body.article-mode .main-content { padding-bottom: 0; overflow: hidden; }
#page-article {
  display: none; flex-direction: column;
  height: 100vh; height: 100dvh;
}
#page-article.active { display: flex; }

/* 顶部固定栏：左返回箭头，右更多 */
.article-topbar {
  flex-shrink: 0; height: 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px; background: var(--bg);
}
.article-top-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text); cursor: pointer; border-radius: 50%;
}
.article-top-btn:active { background: rgba(255,255,255,.08); }
.article-top-btn svg {
  width: 25px; height: 25px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.article-top-btn svg.dots circle { fill: currentColor; stroke: none; }

/* 中间滚动区 */
.article-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.article-detail { padding: 14px 18px 4px; }
.article-detail-title { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 14px; color: var(--text); }
.article-detail-sub {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: var(--text-light); margin-bottom: 18px;
}
.orig-badge {
  font-size: 12px; line-height: 1; padding: 4px 7px;
  border: 1px solid var(--text-light); border-radius: 4px; color: var(--text-light);
}
.article-detail-author { color: var(--primary); font-weight: 500; }
.article-detail-time { font-size: 13px; }
.article-detail-content { font-size: 16px; line-height: 1.8; color: var(--text); }
.article-detail-content p { margin-bottom: 12px; }
.article-detail-content img { max-width: 100%; border-radius: 8px; margin: 14px 0; }
.article-detail-content video { max-width: 100%; border-radius: 8px; margin: 14px 0; }

/* 底部固定操作栏：作者信息 + 浏览/点赞/转发/评论 */
.article-actionbar {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  background: rgba(10,14,26,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.actionbar-author { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.actionbar-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 600;
}
.actionbar-author-name {
  font-size: 15px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.actionbar-btns { display: flex; align-items: center; flex-shrink: 0; }
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 47px; padding: 3px 5px; background: none; border: none;
  color: var(--text-light); cursor: pointer; gap: 1px; border-radius: 8px;
  transition: color .2s;
}
.action-btn:active { opacity: .55; }
.action-btn svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.action-btn .action-num { font-size: 12px; line-height: 1.25; }
.action-btn.active { color: var(--primary); }
.action-btn.active svg { fill: rgba(0,212,255,.12); }

/* ============ 评论区 ============ */
.comment-section {
  margin-top: 18px; padding: 18px 18px 0;
  border-top: 8px solid rgba(255,255,255,.04);
}
.comment-section-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.comment-item {
  display: flex; gap: 10px; padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.comment-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 600;
}
.comment-body { flex: 1; min-width: 0; }
.comment-name { font-size: 13px; color: var(--text-light); margin-bottom: 3px; }
.comment-content { font-size: 15px; line-height: 1.65; word-break: break-word; color: var(--text); }
.comment-meta { display: flex; align-items: center; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--text-light); }
.comment-del {
  background: none; border: none; color: var(--text-light);
  font-size: 12px; cursor: pointer; padding: 0;
}
.comment-del:active { color: var(--danger); }
.comment-empty { text-align: center; color: var(--text-light); font-size: 13px; padding: 28px 0; }

/* ============ 聊天室 ============ */
/* 聊天室激活时：fixed 定位，始终占满底部导航上方区域，不依赖 100vh 计算，兼容所有浏览器 */
#page-chat { display: none; flex-direction: column; min-height: 0 !important; position: fixed; top: 0; bottom: var(--bottom-nav-h); left: 0; right: 0; z-index: 50; background: var(--bg); }
#page-chat.active { display: flex; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }
/* 聊天室顶部：中间"聊天社区"标题，右侧加号卡片按钮（微信风格） */
.chat-header {
  flex-shrink: 0; height: 50px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 12px;
  background: rgba(17,24,39,.85); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.chat-header-title {
  text-align: center; font-size: 16px; font-weight: 700; color: var(--text);
  background: var(--primary-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.chat-header-plus {
  justify-self: end;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-grad); color: #fff;
  border: none; font-size: 22px; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 12px rgba(0,212,255,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.chat-header-plus:active { transform: scale(.92); }
/* 加号弹出的二级卡片菜单（微信风格） */
.chat-fab-menu {
  position: absolute; top: 56px; right: 12px; z-index: 20;
  background: rgba(17,24,39,.97); backdrop-filter: blur(20px);
  border: 1px solid var(--card-border); border-radius: 14px;
  padding: 6px; min-width: 160px; display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.chat-fab-menu.show { display: block; }
.chat-fab-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text);
  padding: 12px 14px; font-size: 14px; cursor: pointer; border-radius: 10px;
}
.chat-fab-menu button:hover { background: rgba(0,212,255,.12); color: var(--primary); }
.chat-msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.chat-msg.self { flex-direction: row-reverse; }
.chat-msg > div:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.chat-msg.self > div:last-child { align-items: flex-end; }
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: #3a3a4e url('../logo.png') center/cover no-repeat;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.chat-avatar img, .dm-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 微信风格语音条 */
.voice-bar {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; min-width: 80px;
  background: rgba(255,255,255,.15); cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.chat-messages, .dm-body, .chat-input-row {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.chat-bubble, .dm-bubble {
  user-select: text; -webkit-user-select: text;
}
.voice-bar.self { background: rgba(255,255,255,.25); }
.voice-bar.playing .voice-icon { animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }
.voice-dur { font-size: 14px; }
/* 长按消息菜单 */
#msgMenu {
  position: fixed; z-index: 9999; display: none;
  background: #2a2a3e; border-radius: 10px; padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
#msgMenu button {
  display: block; width: 100%; padding: 10px 20px;
  background: none; border: none; color: #fff; font-size: 14px;
  text-align: left; cursor: pointer; border-radius: 6px;
}
#msgMenu button:active { background: rgba(255,255,255,.1); }
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 8px;
  background: rgba(255,255,255,.12);
  font-size: 15px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; color: var(--text);
  position: relative;
}
.chat-msg.self .chat-bubble {
  background: #07c160; color: #fff;
}
/* 微信风格小三角尾巴 */
.chat-msg .chat-bubble::before {
  content: ''; position: absolute; top: 12px;
  border: 6px solid transparent;
}
.chat-msg:not(.self) .chat-bubble::before { left: -11px; border-right-color: rgba(255,255,255,.12); }
.chat-msg.self .chat-bubble::before { right: -11px; border-left-color: #07c160; }
.chat-name { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.chat-time { font-size: 10px; color: var(--text-light); opacity: .6; margin-top: 2px; }
.chat-msg.self .chat-name { text-align: right; }
.chat-file {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; background: rgba(0,0,0,.2); border-radius: 10px; margin-top: 6px;
  text-decoration: none; color: inherit; border: 1px solid var(--border);
}
.chat-msg.self .chat-file { background: rgba(255,255,255,.08); }
.chat-file img { max-width: 200px; max-height: 200px; border-radius: 8px; }
.chat-file video { max-width: 250px; max-height: 200px; border-radius: 8px; }
.file-icon { font-size: 28px; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; word-break: break-all; }
.file-size { font-size: 11px; opacity: .6; }
.msg-system {
  text-align: center; font-size: 12px; color: var(--text-light);
  margin: 12px 0;
}
.chat-input-area {
  background: rgba(17,24,39,.92); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  flex-shrink: 0; position: relative; z-index: 5;
}
.chat-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 8px; min-height: 36px; }
.tool-btn {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px;
  padding: 5px 12px; cursor: pointer; font-size: 13px; color: var(--text);
  transition: all .2s; white-space: nowrap;
}
.tool-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,212,255,.08); }
.chat-input-row { display: flex; gap: 6px; padding: 6px 4px; align-items: center; }
.chat-input-row input {
  flex: 1; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 22px; font-size: 14px; outline: none;
  background: rgba(255,255,255,.06); color: var(--text); min-width: 0;
  transition: border-color .2s, box-shadow .2s;
}
.chat-input-row input::placeholder { color: var(--text-light); }
.chat-input-row input:focus { border-color: var(--primary); box-shadow: 0 0 12px rgba(0,212,255,.2); background: rgba(255,255,255,.08); }
.send-btn, .friend-btn {
  padding: 8px 14px; background: var(--primary-grad); color: #fff;
  border: none; border-radius: 22px; cursor: pointer; font-size: 13px; font-weight: 600;
  box-shadow: 0 0 12px rgba(0,212,255,.3); flex-shrink: 0;
  transition: transform .15s, box-shadow .2s; white-space: nowrap;
}
.send-btn:active, .friend-btn:active { transform: scale(.95); }

/* ============ 我的页面 ============ */
.mine-header {
  background: linear-gradient(135deg, rgba(0,212,255,.12), rgba(124,58,237,.12));
  border-bottom: 1px solid var(--border);
  color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 14px;
}
.mine-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #1a2238 url('/logo.png') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 0 16px rgba(0,212,255,.35);
  flex-shrink: 0; overflow: hidden;
}
.mine-avatar.user { font-size: 24px; font-weight: 700; color: #fff; }
.mine-name { font-size: 17px; font-weight: 700; color: var(--text); }
.mine-info { flex: 1; min-width: 0; }
.mine-edit-btn {
  flex: 0 0 auto; padding: 10px 18px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(124,58,237,.18));
  border: 1px solid rgba(0,212,255,.4);
  color: #00d4ff; font-size: 14px; font-weight: 600; letter-spacing: 2px;
}
.mine-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mine-auth-btn {
  padding: 5px 14px; background: var(--primary-grad); color: #fff;
  border: none; border-radius: 14px; cursor: pointer; font-size: 12px; font-weight: 600;
  box-shadow: 0 0 12px rgba(0,212,255,.3); flex-shrink: 0;
}
.mine-bio { font-size: 13px; color: var(--text-light); margin-top: 4px; word-break: break-all; }
.mine-stats {
  display: flex; background: var(--card); border: 1px solid var(--card-border);
  margin: 0 16px 12px; backdrop-filter: blur(10px);
  border-radius: var(--radius); padding: 18px;
}
.stat-item { flex: 1; text-align: center; }
.stat-item span {
  font-size: 22px; font-weight: 700; display: block;
  background: var(--primary-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-item label { font-size: 12px; color: var(--text-light); }
.mine-menu {
  background: var(--card); border: 1px solid var(--card-border);
  margin: 0 16px 16px; border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all .2s; color: var(--text);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: rgba(0,212,255,.08); padding-left: 20px; }
.menu-icon { font-size: 18px; }
.menu-text { flex: 1; font-size: 15px; }
.arrow { color: var(--text-light); }
.mine-actions { padding: 20px 16px; }

/* ============ 表单 ============ */
.page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: rgba(17,24,39,.95);
  backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  width: 100%; max-width: 100%; margin: 0 auto;
  box-sizing: border-box;
}
.back-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); padding: 0; }
.page-header h3 { font-size: 17px; color: var(--text); }
.form-container { padding: 16px; max-width: 600px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none; font-family: inherit;
  background: var(--card); color: var(--text);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-light); }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 12px rgba(0,212,255,.2);
}
.form-group select option { background: var(--bg2); color: var(--text); }
.btn-primary {
  padding: 12px; background: var(--primary-grad); color: #fff;
  border: none; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600;
  box-shadow: 0 0 16px rgba(0,212,255,.3); transition: all .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,212,255,.4); }
.btn-block { width: 100%; }
.btn-danger {
  padding: 12px; background: transparent; color: var(--danger);
  border: 1px solid var(--danger); border-radius: 10px; cursor: pointer; font-size: 15px;
  margin-top: 10px; transition: all .2s;
}
.btn-danger:hover { background: rgba(255,71,87,.1); }

/* ============ 静态页 ============ */
.static-content { padding: 20px; line-height: 1.8; color: var(--text); }
.static-content h4 { font-size: 18px; margin-bottom: 12px; color: var(--text); }
.static-content h5 { font-size: 15px; margin: 16px 0 8px; color: var(--primary); }
.static-content p { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.about-logo { font-size: 60px; text-align: center; margin: 20px 0; filter: drop-shadow(0 0 20px rgba(0,212,255,.5)); }
.about-links { text-align: center; margin-top: 20px; }
.about-links p { color: var(--text-light); }

/* ============ 底部导航 ============ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h);
  background: rgba(10,14,26,.85); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); z-index: 100; display: flex;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text-light);
  transition: all .2s;
}
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 8px rgba(0,212,255,.6)); }
.nav-icon { font-size: 22px; transition: all .2s; }
.nav-label { font-size: 11px; margin-top: 2px; }

/* ============ 模态框 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  z-index: 300; display: none; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: rgba(17,24,39,.95); backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px; width: 90%; max-width: 400px; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,212,255,.15);
}
.modal-tabs { display: flex; border-bottom: 1px solid var(--border); position: relative; }
.modal-tab {
  flex: 1; padding: 14px; background: none; border: none; cursor: pointer;
  font-size: 15px; color: var(--text-light); position: relative;
}
.modal-tab.active { color: var(--primary); font-weight: 600; }
.modal-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px; background: var(--primary-grad); border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}
.modal-close {
  position: absolute; right: 8px; top: 8px; background: none; border: none;
  font-size: 18px; cursor: pointer; color: var(--text-light);
}
.modal-body { padding: 20px; }
.modal-body input {
  background: var(--card) !important; border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
/* 修复自动填充导致的白色背景 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ============ Toast ============ */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,.9); color: #fff; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; z-index: 999;
  border: 1px solid rgba(0,212,255,.3);
  opacity: 0; transition: opacity .3s; pointer-events: none;
  box-shadow: 0 0 20px rgba(0,212,255,.2);
}
.toast.show { opacity: 1; }

/* ============ 客服 ============ */
/* 客服页：fixed 定位在底部导航上方，兼容所有浏览器 */
#page-support { display: none; flex-direction: column; min-height: 0 !important; position: fixed; top: 0; bottom: var(--bottom-nav-h); left: 0; right: 0; z-index: 50; background: var(--bg); }
#page-support.active { display: flex; }
.support-container { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.support-container .chat-input-row {
  flex-shrink: 0; background: rgba(17,24,39,.92);
  border-top: 1px solid var(--border); padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.support-chat { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ============ 多设备自适应断点 ============ */

/* 超小手机 (<=360px) */
@media (max-width: 360px) {
  .top-bar-inner { padding: 0 8px; }
  .logo-text { font-size: 15px; }
  .top-btn { padding: 3px 6px; }
  .top-btn .btn-icon { font-size: 16px; }
  .top-btn .btn-label { font-size: 10px; }
  .banner { padding: 24px 16px; }
  .banner h1 { font-size: 22px; }
  .article-list { padding: 8px; }
  .article-card { padding: 14px; }
  .chat-bubble { max-width: 85%; }
  .mine-header { padding: 14px 16px; }
  .menu-item { padding: 12px 14px; }
}

/* 手机 (361px-640px) */
@media (max-width: 640px) {
  .main-content { max-width: 100%; }
  .article-list { grid-template-columns: 1fr !important; }
  .chat-bubble { max-width: 75%; }
  .mine-stats { margin: 0 12px 10px; }
  .mine-menu { margin: 0 12px; }
  .form-container { padding: 12px; }
  .article-detail { padding: 12px; }
  .article-detail-title { font-size: 19px; }
  .filter-tabs { padding: 10px 12px; }
  .tab { padding: 5px 14px; font-size: 13px; }
  .category-panel { width: 260px; }
  .chat-toolbar { flex-wrap: wrap; }
  .tool-btn { font-size: 12px; padding: 4px 8px; }
}

/* 大手机/小平板 (641px-768px) */
@media (min-width: 641px) and (max-width: 768px) {
  .article-list { grid-template-columns: repeat(2, 1fr) !important; }
}

/* 平板 (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .top-bar-inner { padding: 0 24px; max-width: 100%; }
  .article-list { padding: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .article-card { margin-bottom: 0; }
  .main-content { max-width: 900px; }
  .form-container { padding: 24px; }
  .banner { padding: 44px 24px; }
  .banner h1 { font-size: 34px; }
  .mine-stats, .mine-menu { margin-left: 24px; margin-right: 24px; }
}

/* 桌面端 (>=1025px) */
@media (min-width: 1025px) {
  .top-bar-inner { padding: 0 32px; }
  .article-list { padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .article-card { margin-bottom: 0; }
  .main-content { max-width: 1280px; }
  .form-container { padding: 32px; }
  .banner { padding: 64px 32px; }
  .banner h1 { font-size: 42px; }
  .chat-bubble { max-width: 55%; }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .banner { padding: 16px; }
  .banner h1 { font-size: 22px; }
  .chat-messages { padding: 8px; }
}

/* 平板/桌面：聊天室消息区与输入栏居中，更宽屏阅读不撑满 */
@media (min-width: 769px) {
  .chat-messages, .chat-input-area { max-width: 880px; margin-left: auto; margin-right: auto; width: 100%; }
}
/* 小屏手机：聊天室输入栏按钮紧凑 */
@media (max-width: 480px) {
  .chat-input-row { gap: 4px; padding: 4px 2px; }
  .friend-btn { padding: 7px 10px; font-size: 12px; }
  .send-btn { padding: 7px 12px; font-size: 12px; }
  .chat-input-row input { padding: 9px 12px; font-size: 13px; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,.5); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 角色标签（官方/运营/审核） ============ */
.role-tag {
  display: inline-block; font-size: 14px; line-height: 1.2;
  padding: 2px 8px; border-radius: 6px; margin-right: 6px;
  font-weight: 600; vertical-align: middle; white-space: nowrap;
}
.role-tag-admin { background: linear-gradient(135deg,#00d4ff,#7c3aed); color:#fff; }
.role-tag-auditor { background: linear-gradient(135deg,#f6d365,#fda085); color:#5a3d00; }
.role-tag-support { background: linear-gradient(135deg,#00e5a0,#00d4ff); color:#fff; }

/* ============ 我的页：经验等级卡 ============ */
.exp-card {
  margin: 14px 14px 4px; padding: 16px;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.exp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.exp-level {
  font-size: 14px; font-weight: 700; color: #0a0e1a;
  background: linear-gradient(135deg,#00d4ff,#7c3aed);
  padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.exp-role-tag {
  font-size: 14px; font-weight: 700; color: #0a0e1a;
  background: linear-gradient(135deg,#00d4ff,#7c3aed);
  padding: 4px 10px; border-radius: 8px; white-space: nowrap;
  margin-right: 0; line-height: 1;
}
.exp-total { margin-left: auto; font-size: 12px; color: var(--text-light); white-space: nowrap; }
.exp-bar { height: 8px; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,.08); }
.exp-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg,#00d4ff,#7c3aed);
  box-shadow: 0 0 8px rgba(0,212,255,.6);
  transition: width .5s ease;
}
.exp-foot { margin-top: 8px; font-size: 11px; color: var(--text-light); }

/* ============ 申请资格页 ============ */
.role-apply-wrap { padding: 14px; }
.role-apply-tip { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.role-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.role-card {
  padding: 14px; border-radius: 14px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--card-border);
  transition: all .2s;
}
.role-card.selected { border-color: #00d4ff; box-shadow: 0 0 0 1px #00d4ff, 0 6px 18px rgba(0,212,255,.2); }
.role-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.role-card-icon { font-size: 20px; }
.role-card-name { font-size: 15px; font-weight: 600; }
.role-card-desc { font-size: 12px; color: var(--text-light); line-height: 1.6; }
.role-apply-sub { font-size: 14px; margin: 18px 0 10px; }
.role-apply-list { display: flex; flex-direction: column; gap: 10px; }
.ra-item { padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--card-border); }
.ra-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.ra-name { font-size: 14px; font-weight: 600; }
.ra-st { font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.ra-pending { background: rgba(246,211,101,.2); color: #f6d365; }
.ra-ok { background: rgba(52,199,89,.2); color: #34c759; }
.ra-no { background: rgba(255,45,85,.18); color: #ff4d6d; }
.ra-reason { font-size: 12px; color: var(--text); opacity: .85; line-height: 1.5; }
.ra-time { font-size: 10px; color: var(--text-light); margin-top: 5px; }

/* ============ 首页顶部滚动公告横条 ============ */
.notice-marquee {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin: 10px 14px 0;
  background: linear-gradient(90deg, rgba(0,212,255,.15), rgba(124,58,237,.15));
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 10px; overflow: hidden;
}
.marquee-icon { flex: 0 0 auto; font-size: 14px; }
.marquee-track { flex: 1; overflow: hidden; white-space: nowrap; }
.marquee-text {
  display: inline-block; padding-left: 100%;
  font-size: 13px; color: var(--text);
  animation: marqueeScroll 16s linear infinite;
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============ 客服：AI标签/转人工/评价条 ============ */
.ai-tag { font-size: 11px; color: #00d4ff; font-weight: 600; }
.support-human-btn {
  flex: 0 0 auto; background: rgba(124,58,237,.25);
  border-color: rgba(124,58,237,.5);
}
.support-rating-bar {
  display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--card-border);
  background: var(--bg2); font-size: 13px;
}
.support-rating-bar button {
  padding: 6px 12px; border-radius: 16px; border: 1px solid var(--card-border);
  background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font-size: 13px;
}
.support-rating-bar button:active { background: rgba(0,212,255,.25); }

/* 关于页文本 */
.about-text { padding: 10px 20px 30px; font-size: 14px; line-height: 1.8; color: var(--text); }
.about-text p { margin: 0 0 10px; }

/* 关于页科技风 */
.about-hero {
  text-align: center; padding: 36px 20px 24px;
  background: radial-gradient(circle at 50% 0%, rgba(0,212,255,.18), transparent 70%);
}
.about-logo img { width: 80px; height: 80px; border-radius: 22px; box-shadow: 0 0 30px rgba(0,212,255,.4); }
.about-title { margin: 14px 0 4px; font-size: 24px; font-weight: 800;
  background: linear-gradient(90deg,#00d4ff,#7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-sub { font-size: 11px; letter-spacing: 3px; color: var(--text-light); margin: 0 0 16px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.about-tag {
  padding: 5px 12px; font-size: 12px; border-radius: 20px;
  background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.25); color: #00d4ff;
}
.about-sections { padding: 0 14px 30px; display: flex; flex-direction: column; gap: 12px; }
.about-card {
  padding: 16px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-left: 3px solid #00d4ff;
}
.about-card-title { font-size: 14px; font-weight: 700; color: #00d4ff; margin-bottom: 8px; }
.about-card p { font-size: 13px; line-height: 1.8; color: var(--text-light); margin: 0; }

/* ============ 我的页未登录态 ============ */
.mine-guest { display: flex; align-items: center; gap: 12px; padding: 16px; }
.mine-guest-avatar { flex: 0 0 auto; margin-right: auto; }
.mine-guest-avatar img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid rgba(0,212,255,.3); }
.mine-guest-btns { flex: 0 1 auto; display: flex; gap: 10px; }
.mine-guest-btn {
  flex: 0 0 auto; padding: 12px 22px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(124,58,237,.18));
  border: 1px solid rgba(0,212,255,.4);
  color: #00d4ff; font-size: 14px; font-weight: 600; white-space: nowrap;
  letter-spacing: 2px;
}
.mine-guest-btn.primary {
  background: linear-gradient(135deg,#00d4ff,#7c3aed); border: none; color:#fff;
  box-shadow: 0 4px 16px rgba(0,212,255,.35);
}

/* 信息编辑卡片 */
.menu-card-edit {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 0; padding: 14px 16px;
  border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, rgba(0,212,255,.12), rgba(124,58,237,.12));
  border: 1px solid rgba(0,212,255,.35);
}
.menu-card-edit .menu-text { flex: 1; color: #fff; font-weight: 600; font-size: 15px; }
.menu-card-cta { font-size: 12px; color: #00d4ff; }
.mine-user { display: flex; align-items: center; gap: 14px; padding: 8px 4px; }
.mine-avatar.has-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* 个人资料头像上传 */
.profile-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-avatar-row img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0,212,255,.3); }
.avatar-upload-btn {
  padding: 8px 14px; border-radius: 8px; background: rgba(0,212,255,.15);
  color: #00d4ff; font-size: 13px; cursor: pointer; border: 1px dashed #00d4ff;
}

/* 登录注册弹窗 */
.auth-avatar-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px; }
.auth-avatar-preview > img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0,212,255,.3); }
.auth-avatar-edit { font-size: 12px; color: #00d4ff; cursor: pointer; }
.reg-type-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.reg-type {
  flex: 1; padding: 8px 0; font-size: 12px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--card-border); color: var(--text-light);
}
.reg-type.active { background: rgba(0,212,255,.18); color: #00d4ff; border-color: #00d4ff; }
.verify-row { display: flex; gap: 8px; }
.verify-row input { flex: 1; }
.verify-row button {
  flex: 0 0 auto; padding: 0 12px; font-size: 12px; border-radius: 8px;
  background: rgba(0,212,255,.15); color: #00d4ff; border: 1px solid #00d4ff; cursor: pointer; white-space: nowrap;
}
.verify-row button:disabled { opacity: .5; }
.captcha-box {
  flex: 0 0 auto; padding: 0 14px; border-radius: 8px;
  background: rgba(0,212,255,.15); color: #00d4ff;
  border: 1px solid #00d4ff; cursor: pointer; font-size: 13px; font-weight: 600;
  min-width: 90px;
}

/* ============ 首页顶部搜索栏+通知 ============ */
.home-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 4px;
}
.home-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 8px 14px;
}
.home-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13px;
}
.hs-icon { opacity: .6; font-size: 14px; }
.home-notice-btn {
  position: relative; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--card-border);
  color: var(--text); font-size: 18px; cursor: pointer;
}
.notice-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b5c; border: 1.5px solid var(--bg);
}

/* 通知中心 */
.notice-list { padding: 12px 14px; }
.notice-item {
  display: flex; gap: 12px; padding: 12px; margin-bottom: 10px;
  background: var(--bg2); border: 1px solid var(--card-border); border-radius: 12px;
}
.notice-item.unread { border-color: rgba(0,212,255,.4); }
.notice-icon { font-size: 20px; flex: 0 0 auto; }
.notice-body { flex: 1; }
.notice-title { font-size: 14px; font-weight: 600; }
.notice-content { font-size: 12px; color: var(--text-light); margin-top: 4px; line-height: 1.5; }
.notice-time { font-size: 10px; color: var(--text-light); opacity: .7; margin-top: 6px; }
.mark-read-btn {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #00d4ff; font-size: 13px; cursor: pointer;
}

/* 公告页 */
.announce-list { padding: 12px 14px; }
.announce-item {
  padding: 14px; margin-bottom: 12px;
  background: var(--bg2); border: 1px solid var(--card-border); border-radius: 12px;
}
.announce-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.announce-content { font-size: 13px; color: var(--text); line-height: 1.7; }
.announce-time { font-size: 10px; color: var(--text-light); margin-top: 10px; }

/* ============ 私聊弹窗（微信风格） ============ */
.dm-box {
  height: 88vh; height: 88dvh; max-width: 520px;
  display: flex; flex-direction: column; overflow: hidden;
}
.dm-body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px; background: rgba(0,0,0,.25);
}
.dm-row { margin: 10px 0; display: flex; justify-content: flex-start; align-items: flex-start; gap: 10px; }
.dm-row.self { justify-content: flex-end; flex-direction: row-reverse; }
.dm-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: #1a1a2e url('../logo.png') center/cover no-repeat; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 0 12px rgba(0,212,255,.3);
}
.dm-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 8px; font-size: 15px; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap; background: rgba(255,255,255,.12); color: var(--text);
  position: relative;
}
.dm-row.self .dm-bubble {
  background: #07c160; color: #fff;
}
.dm-row .dm-bubble::before {
  content: ''; position: absolute; top: 12px; border: 6px solid transparent;
}
.dm-row:not(.self) .dm-bubble::before { left: -11px; border-right-color: rgba(255,255,255,.12); }
.dm-row.self .dm-bubble::before { right: -11px; border-left-color: #07c160; }
.dm-input-bar {
  flex-shrink: 0; display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: rgba(17,24,39,.95);
}
.dm-input-bar input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: rgba(255,255,255,.06); color: var(--text);
  font-size: 14px; outline: none;
}
.dm-input-bar input:focus { border-color: var(--primary); }
.dm-send-btn { flex-shrink: 0; padding: 10px 18px; }

/* ============ 好友列表/申请 ============ */
.friend-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.friend-row:active { background: rgba(0,212,255,.08); }
.friend-row-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.friend-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-row-info { flex: 1; min-width: 0; }
.friend-row-name { font-size: 14px; color: var(--text); font-weight: 500; }
.friend-row-user { font-size: 12px; color: var(--text-light); }
.friend-row-arrow { color: var(--text-light); font-size: 20px; }
.friend-del-btn {
  background: rgba(255,80,80,.15); color: #ff6b6b; border: 1px solid rgba(255,80,80,.3);
  padding: 6px 14px; border-radius: 16px; font-size: 12px; cursor: pointer; margin-left: 8px;
}
.friend-del-btn:active { background: rgba(255,80,80,.3); }

.fr-section {
  font-size: 12px; color: var(--text-light); margin: 12px 0 6px; padding-left: 2px;
}
.fr-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.fr-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.fr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fr-info { flex: 1; min-width: 0; }
.fr-name { font-size: 14px; color: var(--text); font-weight: 500; }
.fr-user { font-size: 11px; color: var(--text-light); font-weight: normal; margin-left: 4px; }
.fr-msg { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.fr-pending { font-size: 11px; color: var(--warning); margin-top: 2px; }
.fr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fr-accept, .fr-reject {
  padding: 6px 14px; border-radius: 16px; border: none; font-size: 13px; cursor: pointer;
}
.fr-accept { background: var(--primary-grad); color: #fff; }
.fr-reject { background: rgba(255,255,255,.08); color: var(--text-light); }

/* ============ 滑块人机验证 ============ */
.slider-captcha {
  position: relative; width: 100%; height: 44px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 22px; overflow: hidden; user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.slider-captcha .slider-track {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, rgba(0,212,255,.22) 0%, rgba(0,212,255,.22) var(--fill, 0%), rgba(255,255,255,.04) var(--fill, 0%));
}
.slider-captcha .slider-text {
  font-size: 13px; color: var(--text-light); pointer-events: none;
}
.slider-captcha .slider-btn {
  position: absolute; top: 0; left: 0; width: 44px; height: 44px;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  border-radius: 22px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: bold; cursor: grab;
  box-shadow: 0 2px 8px rgba(0,212,255,.4);
  touch-action: none;
}
.slider-captcha .slider-btn:active { cursor: grabbing; }
.slider-captcha.passed { border-color: #00e5a0; }
.slider-captcha.passed .slider-track { background: linear-gradient(90deg, rgba(0,229,160,.28), rgba(0,229,160,.28) 100%); }
.slider-captcha.passed .slider-text { color: #00e5a0; }
.slider-captcha.passed .slider-btn { background: #00e5a0; box-shadow: 0 2px 8px rgba(0,229,160,.4); }

/* ============ 表情面板 ============ */
.emoji-panel {
  position: absolute; bottom: 58px; left: 0; right: 0;
  background: rgba(17,24,39,.98); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 10px; max-height: 260px; overflow-y: auto; z-index: 100;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
}
.emoji-panel span {
  font-size: 26px; text-align: center; padding: 8px 0; cursor: pointer;
  border-radius: 8px; transition: background .15s;
}
.emoji-panel span:active { background: rgba(255,255,255,.12); }

/* ============ 语音按钮 ============ */
.voice-hold-btn {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  background: #f0f0f0; font-size: 15px; cursor: pointer; font-weight: 600;
}
.voice-hold-btn.recording { background: #ff5e62; color: #fff; }
.dm-bubble audio { max-width: 180px; }

/* ============ 微信风格聊天输入栏（深色圆形描边） ============ */
.chat-input-row, .dm-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.chat-input-row { background: transparent; }
.dm-input-bar { background: rgba(17,24,39,.95); border-top: 1px solid var(--border); }
/* 圆形描边图标按钮：左侧语音/键盘切换、表情、加号 */
.icon-circle-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(255,255,255,.45);
  color: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0;
  transition: border-color .2s, color .2s, transform .1s;
}
.icon-circle-btn svg { width: 22px; height: 22px; display: block; }
.icon-circle-btn:active { transform: scale(.9); border-color: var(--primary); color: var(--primary); }
/* 输入框包裹：右侧内嵌麦克风图标 */
.input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.input-wrap input, #chatInput, #dmInput {
  width: 100%; height: 38px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  background: rgba(255,255,255,.08); color: var(--text);
  font-size: 15px; outline: none;
}
.input-wrap input::placeholder { color: var(--text-light); }
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 12px rgba(0,212,255,.2); }
/* 按住 说话 */
.voice-hold-btn {
  flex: 1; height: 38px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  background: rgba(255,255,255,.08); color: var(--text);
  font-size: 15px; cursor: pointer; font-weight: 500;
}
.voice-hold-btn.recording { background: #ff5e62; border-color: #ff5e62; color: #fff; }
/* 发送按钮保留项目品牌色 */
.send-btn, .dm-send-btn {
  height: 38px; padding: 0 16px; border: none; border-radius: 10px;
  background: var(--primary-grad); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; flex-shrink: 0; box-shadow: 0 0 12px rgba(0,212,255,.3);
}

/* ============ 文章页：二级评论输入条（点右下角评论按钮弹出） ============ */
.comment-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90;
}
.comment-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(17,24,39,.98); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  transform: translateY(100%); transition: transform .25s ease;
}
.comment-dock.show { transform: translateY(0); }
.comment-dock input {
  flex: 1; min-width: 0; height: 40px; padding: 0 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08);
  color: var(--text); font-size: 15px; outline: none;
}
.comment-dock input::placeholder { color: var(--text-light); }
.comment-dock input:focus { border-color: var(--primary); }
.comment-dock-send {
  flex-shrink: 0; height: 40px; padding: 0 18px; border: none; border-radius: 20px;
  background: var(--primary-grad); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 0 12px rgba(0,212,255,.3);
}

/* ============ 下载管理 ============ */
.download-list { padding: 12px 16px; max-width: 600px; margin: 0 auto; }
.download-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px;
}
.download-icon { font-size: 26px; flex-shrink: 0; }
.download-info { flex: 1; min-width: 0; }
.download-name {
  font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.download-meta { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.download-btn {
  flex-shrink: 0; padding: 6px 14px; border: none; border-radius: 8px;
  background: var(--primary-grad); color: #fff; font-size: 13px; cursor: pointer;
}
.download-del {
  flex-shrink: 0; width: 28px; height: 28px; border: none; border-radius: 50%;
  background: rgba(255,59,92,.15); color: #ff3b5c; font-size: 14px; cursor: pointer;
}

/* ============ 会员中心 ============ */
.cat-vip { color: #ffd700; font-size: 13px; margin-left: 4px; }
.membership-wrap { padding: 16px; max-width: 600px; margin: 0 auto; }
.membership-hero {
  text-align: center; padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,215,0,.15), rgba(124,58,237,.15));
  border: 1px solid rgba(255,215,0,.3); border-radius: 16px; margin-bottom: 20px;
}
.membership-badge { font-size: 50px; }
.membership-hero h2 { font-size: 22px; color: var(--text); margin: 8px 0; }
.membership-hero p { color: var(--text-light); font-size: 14px; margin: 4px 0; }
.membership-desc { font-size: 13px !important; line-height: 1.6; margin-top: 10px !important; }
.membership-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.plan-card {
  background: var(--card); border: 2px solid var(--border); border-radius: 14px;
  padding: 16px 10px; text-align: center; cursor: pointer; transition: all .2s;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.selected { border-color: #ffd700; background: rgba(255,215,0,.08); }
.plan-name { font-size: 14px; color: var(--text); font-weight: 600; }
.plan-price { font-size: 22px; color: #ffd700; font-weight: 700; margin: 6px 0; }
.plan-days { font-size: 12px; color: var(--text-light); }
.membership-pay h3 { font-size: 16px; color: var(--text); margin-bottom: 12px; }
.pay-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.pay-tab {
  flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text-light); cursor: pointer; font-size: 14px;
}
.pay-tab.active { border-color: var(--primary); color: var(--primary); background: rgba(0,212,255,.08); }
.pay-qr { text-align: center; padding: 16px; background: var(--card); border-radius: 12px; margin-bottom: 10px; }
.pay-tip { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 14px; }
