:root {
  --bg: #0e1016;
  --bg-2: #151925;
  --bg-3: #1c2130;
  --line: #262c3d;
  --fg: #e7ebf3;
  --fg-dim: #98a2b8;
  --brand: #4f8cff;
  --brand-2: #6ea8ff;
  --ok: #35c07a;
  --warn: #ff8a5b;
  --danger: #ff5c72;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.6 "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--ok)); }
.brand-lg { font-size: 20px; justify-content: center; }
.topnav { display: flex; gap: 14px; font-size: 14px; }
.topnav a { color: var(--fg-dim); }
.topnav a:hover { color: var(--fg); text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.inline-form { display: inline; }

.me-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-dim); font-size: 13px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), #8b5cf6); color: #fff; flex: 0 0 auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; cursor: pointer; transition: .15s; white-space: nowrap;
  background: transparent; color: var(--fg); font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: var(--line); color: var(--fg-dim); }
.btn-ghost:hover { border-color: var(--brand); color: var(--fg); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-round {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(20, 24, 35, .8); color: var(--fg); font-size: 16px; cursor: pointer;
}
.btn-round:disabled { opacity: .4; cursor: not-allowed; }
.btn-round.off { background: var(--danger); border-color: var(--danger); }
.btn-round:hover:not(:disabled) { border-color: var(--brand); }

.mini {
  padding: 2px 8px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--fg-dim); cursor: pointer;
}
.mini:hover { color: var(--fg); border-color: var(--brand); }
.mini-danger:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- 布局 ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 24px 22px 60px; }
.page-title { font-size: 22px; margin: 0 0 18px; }

/* ---------- Hero ---------- */
.hero { padding: 34px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; }
.hero-sub { color: var(--fg-dim); margin: 0 0 20px; }
.search { display: flex; gap: 10px; max-width: 620px; }
.search input[type="search"] {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); font-size: 14px;
}
.search input:focus { outline: none; border-color: var(--brand); }

/* ---------- 房间卡片 ---------- */
.room-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.room-card {
  display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); transition: .18s; color: var(--fg);
}
.room-card:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.room-cover {
  height: 132px; background: var(--bg-3) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.cover-ph { font-size: 42px; font-weight: 800; color: #39415a; }
.lock, .src-tag {
  position: absolute; top: 8px; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; background: rgba(0, 0, 0, .6); color: #fff;
}
.lock { left: 8px; background: rgba(255, 138, 91, .9); }
.src-tag { right: 8px; }
.room-meta { padding: 12px 14px 14px; }
.room-name { margin: 0 0 4px; font-size: 15px; }
.room-owner { color: var(--fg-dim); font-size: 12px; }
.tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px;
  background: var(--bg-3); color: var(--fg-dim); border: 1px solid var(--line);
}
.tag-owner { background: rgba(79, 140, 255, .18); color: var(--brand-2); border-color: rgba(79, 140, 255, .4); }
.tag-warn { background: rgba(255, 138, 91, .16); color: var(--warn); border-color: rgba(255, 138, 91, .4); }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.form-wide { max-width: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--fg-dim); }
.field small { color: var(--fg-dim); font-size: 12px; }
.field input[type="text"], .field input[type="password"], .field input[type="email"],
.field input[type="number"], .field input[type="search"], .field textarea {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg); font-size: 14px; font-family: inherit; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field input:disabled { opacity: .5; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-dim); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fieldset legend { color: var(--fg-dim); font-size: 13px; padding: 0 6px; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; cursor: pointer; }
.radio-main { display: flex; flex-direction: column; }
.radio-main small { color: var(--fg-dim); font-size: 12px; }
.src-config { padding: 10px 0 4px 26px; }
.hint { color: var(--fg-dim); font-size: 12px; margin: 6px 0 0; }

/* ---------- 认证页 ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-wrap { width: 100%; display: flex; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px; box-shadow: var(--shadow);
}
.auth-title { font-size: 19px; margin: 18px 0 20px; text-align: center; }
.auth-hint { color: var(--fg-dim); text-align: center; font-size: 13px; margin: 0 0 18px; }
.auth-alt { text-align: center; color: var(--fg-dim); font-size: 13px; margin-top: 18px; }

/* ---------- 提示 ---------- */
.flash { padding: 10px 16px; margin: 0 0 0; font-size: 13px; }
.flash-error { background: rgba(255, 92, 114, .12); color: #ffb4c0; border-bottom: 1px solid rgba(255, 92, 114, .3); }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--fg); font-size: 13px;
  opacity: 0; transform: translateY(8px); transition: .25s; box-shadow: var(--shadow); max-width: 340px;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast-ok { border-color: rgba(53, 192, 122, .5); }
.toast-warn { border-color: rgba(255, 138, 91, .5); }
.toast-request { border-color: rgba(79, 140, 255, .6); }

/* ---------- 房间布局 ---------- */
.room-body { overflow: hidden; }
.roombar {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.roombar-title { display: flex; align-items: center; gap: 10px; }
.roombar-title > span:first-child { font-weight: 600; }
.roombar-right { margin-left: auto; }
.badge {
  padding: 2px 10px; border-radius: 20px; font-size: 12px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--fg-dim);
}
.badge-dot::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); margin-right: 6px; vertical-align: middle;
}
.badge-dot.ok::before { background: var(--ok); }
.badge-dot.bad::before { background: var(--danger); }
.badge-live { background: rgba(53, 192, 122, .16); color: var(--ok); border-color: rgba(53, 192, 122, .4); }

.room-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 0;
  height: calc(100vh - 57px);
}
.room-main { padding: 16px; overflow-y: auto; }
.room-side {
  border-left: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; min-height: 0;
}

/* 视频舞台 */
.stage-wrap { position: relative; }
.video-stage {
  background: #05070c; border-radius: var(--radius); border: 1px solid var(--line);
  aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.stage-placeholder { color: var(--fg-dim); font-size: 14px; }
.stream-panel {
  margin-top: 10px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.stream-panel-title { color: var(--fg-dim); font-size: 12px; }
.stream-url {
  font-family: Consolas, monospace; font-size: 12px; background: var(--bg-3);
  padding: 4px 8px; border-radius: 6px; color: var(--ok); word-break: break-all; flex: 1; min-width: 200px;
}
.live-offline {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--fg-dim); font-size: 14px; background: rgba(0,0,0,.4); pointer-events: none;
}

/* ---------- 金币 / 礼物 ---------- */
.chat-bar { display: flex; align-items: center; padding: 0 12px 10px; }
.balance-chip { font-size: 12px; color: var(--fg-dim); }
.balance-chip b { color: #ffd66b; font-weight: 700; }

.gift-panel {
  position: fixed; right: 380px; bottom: 80px; z-index: 300;
  width: 320px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); flex-direction: column; overflow: hidden;
}
.gift-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600;
}
.gift-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; max-height: 320px; overflow-y: auto;
}
.gift-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-3); cursor: pointer; color: var(--fg); font-family: inherit;
}
.gift-item:hover { border-color: var(--brand); }
.gift-icon { font-size: 24px; }
.gift-name { font-size: 12px; }
.gift-price { font-size: 11px; color: #ffd66b; }

.gift-overlay {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 400; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.gift-fly {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: rgba(0,0,0,.75); border: 1px solid rgba(255,214,107,.5);
  border-radius: 24px; color: #fff; font-size: 14px;
  opacity: 0; transform: translateY(20px) scale(.8); transition: .35s;
}
.gift-fly.in { opacity: 1; transform: translateY(0) scale(1); }
.gift-fly-icon { font-size: 28px; }
.msg-gift { color: #ffd66b !important; }

/* 礼物分级特效 */
.gift-tier-normal { border-color: rgba(255,255,255,.3); }
.gift-tier-luxury {
  border-color: rgba(255,214,107,.7);
  background: linear-gradient(135deg, rgba(80,40,0,.85), rgba(40,20,0,.85));
  box-shadow: 0 0 24px rgba(255,180,40,.5);
}
.gift-tier-luxury .gift-fly-icon { font-size: 36px; }
.gift-tier-legend {
  border-color: rgba(255,120,200,.8);
  background: linear-gradient(135deg, rgba(120,0,80,.9), rgba(40,0,30,.9));
  box-shadow: 0 0 40px rgba(255,80,180,.7);
  animation: gift-legend-pulse .8s ease-in-out infinite;
}
.gift-tier-legend .gift-fly-icon { font-size: 44px; }

@keyframes gift-legend-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}

/* 全屏特效（至尊礼物） */
.gift-fullscreen-fx {
  position: fixed; inset: 0; z-index: 500; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.gift-fullscreen-fx.active { opacity: 1; }
.fx-burst {
  font-size: 120px; animation: fx-burst .9s ease-out;
  filter: drop-shadow(0 0 30px rgba(255,120,200,.9));
}
.fx-label {
  margin-top: 16px; font-size: 22px; font-weight: 700; color: #fff;
  text-shadow: 0 0 20px rgba(255,120,200,.9), 0 2px 8px rgba(0,0,0,.6);
  animation: fx-label-in .6s ease-out;
}
@keyframes fx-burst {
  0% { transform: scale(.2) rotate(-20deg); opacity: 0; }
  40% { transform: scale(1.2) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes fx-label-in {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---------- 付费墙 ---------- */
.paywall-card { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); }
.paywall-fee { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; }
.fee-label { color: var(--fg-dim); font-size: 13px; }
.fee-value { font-size: 32px; font-weight: 700; color: #ffd66b; }
.fee-value small { font-size: 14px; color: var(--fg-dim); }
.paywall-balance { text-align: center; color: var(--fg-dim); font-size: 13px; margin-bottom: 16px; }
.paywall-balance b { color: #ffd66b; }
.paywall-actions { display: flex; flex-direction: column; gap: 8px; }
.hls-player, .embed-frame { width: 100%; height: 100%; border: 0; display: block; }
.tile-grid {
  position: absolute; inset: 0; display: grid; gap: 6px; padding: 6px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-content: center;
}
.tile { position: relative; background: #0a0d14; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-name {
  position: absolute; left: 8px; bottom: 6px; padding: 1px 8px; border-radius: 20px;
  font-size: 11px; background: rgba(0, 0, 0, .6); color: #fff;
}
.tile-self { outline: 2px solid rgba(79, 140, 255, .5); }

.stage-toolbar {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
}
.stage-toolbar .spacer { flex: 1; }

/* 房间信息 */
.room-info { margin-top: 18px; }
.room-info-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-info-head h1 { font-size: 20px; margin: 0; }
.room-desc { color: var(--fg-dim); margin: 8px 0; }
.room-info-foot { display: flex; gap: 20px; color: var(--fg-dim); font-size: 13px; flex-wrap: wrap; }

/* 侧栏 */
.side-tabs { display: flex; border-bottom: 1px solid var(--line); }
.side-tabs .tab {
  flex: 1; padding: 12px; background: none; border: 0; color: var(--fg-dim);
  font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit;
}
.side-tabs .tab.active { color: var(--fg); border-bottom-color: var(--brand); }
.tab-panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.tab-panel.active { display: flex; }

/* 聊天 */
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg-user { color: var(--brand-2); font-weight: 600; margin-right: 6px; }
.msg-body { color: var(--fg); }
.msg-time { color: #5b647d; font-size: 11px; margin-left: 6px; }
.msg-self .msg-user { color: var(--ok); }
.msg-sys { color: var(--fg-dim); font-size: 12px; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-3); color: var(--fg); font-size: 14px; font-family: inherit;
}
.chat-form input:focus { outline: none; border-color: var(--brand); }

/* 成员 */
.member-list { list-style: none; margin: 0; padding: 10px; overflow-y: auto; flex: 1; }
.member {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: 8px; font-size: 13px; opacity: .5;
}
.member.online { opacity: 1; }
.member.online .member-name::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); margin-left: 6px; vertical-align: middle;
}
.member-name { flex: 1; }
.member-ops { display: flex; gap: 3px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--fg-dim); font-weight: 500; font-size: 12px; }
.table tbody tr:hover { background: var(--bg-2); }
.table code { background: var(--bg-3); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.ops { display: flex; gap: 5px; }

/* 后台 */
.admin-nav { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hint-inline { color: var(--fg-dim); font-size: 13px; }
.admin-nav a {
  padding: 9px 16px; color: var(--fg-dim); font-size: 14px; border-bottom: 2px solid transparent;
}
.admin-nav a.active { color: var(--fg); border-bottom-color: var(--brand); }
.admin-nav a:hover { text-decoration: none; color: var(--fg); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.stat b { font-size: 26px; }
.stat span { color: var(--fg-dim); font-size: 13px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 15px; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv li:last-child { border: 0; }
.kv span { color: var(--fg-dim); }

/* 分页 / 空态 / 错误页 */
.pager { display: flex; gap: 6px; margin-top: 18px; }.pager a {
  padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg-dim); font-size: 13px;
}
.pager a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager a:hover { text-decoration: none; }
.empty { text-align: center; padding: 60px 20px; color: var(--fg-dim); grid-column: 1 / -1; }
.empty .btn { margin-top: 14px; }
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font-size: 64px; margin: 0; color: var(--line); }
.error-msg { color: var(--fg-dim); margin: 10px 0 22px; }

.footer {
  text-align: center; color: #4a5266; font-size: 12px;
  padding: 22px; border-top: 1px solid var(--line);
}

/* ---------- 个人中心 ---------- */
.me-balance-card {
  display: flex; align-items: baseline; gap: 8px; padding: 20px 24px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px;
}
.me-balance-label { color: var(--fg-dim); font-size: 14px; }
.me-balance-value { font-size: 36px; font-weight: 700; color: #ffd66b; }
.me-balance-coin { color: var(--fg-dim); font-size: 13px; }

/* ---------- 大厅群聊 + 私聊 ---------- */
.lobby-section {
  display: grid; grid-template-columns: 1fr 260px; gap: 18px; margin-top: 26px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.lobby-chat, .lobby-users {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 280px;
}
.lobby-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px;
}
.lobby-log {
  flex: 1; overflow-y: auto; padding: 12px 14px; max-height: 300px;
  display: flex; flex-direction: column; gap: 6px;
}
.lobby-msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.lobby-user { color: var(--brand-2); font-weight: 600; margin-right: 6px; }
.lobby-body { color: var(--fg); }
.lobby-time { color: #5b647d; font-size: 11px; margin-left: 6px; }
.lobby-msg-self .lobby-user { color: var(--ok); }

.online-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; max-height: 300px; }
.online-user {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13px;
}
.online-user:hover { background: var(--bg-3); }
.online-name { flex: 1; }

.pm-panel {
  position: fixed; right: 18px; bottom: 80px; z-index: 350; width: 340px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden;
}
.pm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px;
}
.pm-log { flex: 1; overflow-y: auto; padding: 12px 14px; max-height: 300px; display: flex; flex-direction: column; gap: 6px; }
.pm-msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.pm-msg-self { text-align: right; }
.pm-msg-self .pm-body { background: var(--brand); color: #fff; }
.pm-body {
  display: inline-block; padding: 5px 10px; border-radius: 12px;
  background: var(--bg-3); color: var(--fg); max-width: 85%;
}
.pm-time { color: #5b647d; font-size: 11px; margin: 0 4px; }

.pm-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 340;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--brand); color: #fff; font-size: 22px; cursor: pointer;
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
}
.pm-fab:hover { background: var(--brand-2); }
.pm-unread {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
