/* ==========================================================
   青禾直播 · 设计系统
   浅色工作室风格：墨黑导航 + 青禾绿主色 + 大留白卡片
   ========================================================== */

:root {
  --ink: #0C1524;
  --ink-2: #16263B;
  --paper: #F4F7FB;
  --card: #FFFFFF;
  --line: #E6ECF5;
  --line-soft: #EFF3F9;
  --text: #101A2B;
  --muted: #6B7A90;
  --brand: #12A67E;
  --brand-dark: #0B7A5C;
  --brand-soft: #E8F6F1;
  --live: #F2455B;
  --warn: #B45309;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 26, 43, .04), 0 10px 30px rgba(16, 26, 43, .06);
  --shadow-lg: 0 2px 6px rgba(16, 26, 43, .05), 0 24px 60px rgba(16, 26, 43, .10);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--paper);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

::selection { background: #C9EFE4; }

/* ---------- 顶部导航 ---------- */

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--ink);
  display: grid; place-items: center;
  flex: 0 0 auto;
}

.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .06em; }

.nav-spacer { flex: 1; }

.nav-link {
  font-size: 13px; color: var(--muted);
  padding: 7px 12px; border-radius: 9px;
  transition: .15s;
}
.nav-link:hover { color: var(--text); background: #F1F4F9; }

.nav-btn {
  font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px;
  background: var(--ink); color: #fff;
  transition: .15s;
}
.nav-btn:hover { background: var(--ink-2); }

/* ---------- 大厅 ---------- */

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 28px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #CDEDE2;
  padding: 5px 10px; border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 44px; line-height: 1.18;
  letter-spacing: -.03em; font-weight: 600;
  margin: 0 0 16px;
}

.hero h1 em { font-style: normal; color: var(--brand); }

.hero p {
  font-size: 15px; color: var(--muted);
  max-width: 46ch; margin: 0 0 26px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff;
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500; border: 0; cursor: pointer;
  box-shadow: 0 8px 20px rgba(18, 166, 126, .22);
  transition: .18s;
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; color: var(--text); cursor: pointer;
  transition: .18s;
}
.btn-ghost:hover { border-color: #CFE9E0; background: #FBFDFC; }

.hero-stats { display: flex; gap: 32px; margin-top: 34px; }
.hero-stat b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.hero-stat span { font-size: 12px; color: var(--muted); }

/* 右侧预览卡 */
.preview-card {
  border-radius: 22px; overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.preview-stage {
  aspect-ratio: 16 / 10;
  position: relative;
  background:
    radial-gradient(120% 90% at 20% 10%, #1E3550 0%, #0C1524 60%);
  display: grid; place-items: center;
}

.preview-stage::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 11, 18, .85));
}

.preview-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.preview-meta {
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  z-index: 2; color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.preview-meta h4 { margin: 0 0 2px; font-size: 14px; font-weight: 500; }
.preview-meta p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .6); }

.preview-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, .07);
}
.preview-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.preview-bar span { font-size: 12px; color: rgba(255, 255, 255, .55); }

/* 房间区块 */
.section { max-width: 1240px; margin: 0 auto; padding: 20px 24px 64px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 26px 0 18px; gap: 12px;
}
.section-head h2 { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.02em; }
.section-head span { font-size: 13px; color: var(--muted); }

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: 20px;
}

.room-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .2s ease;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #DCE9F3; }

.room-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.room-cover .initial {
  font-size: 54px; font-weight: 600;
  color: rgba(255, 255, 255, .16);
  letter-spacing: -.04em;
  user-select: none;
}
.room-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.cover-tone-0 { background: linear-gradient(135deg, #0F2A3F, #163A4D); }
.cover-tone-1 { background: linear-gradient(135deg, #14342C, #0F4A3A); }
.cover-tone-2 { background: linear-gradient(135deg, #2A2440, #3B2A55); }
.cover-tone-3 { background: linear-gradient(135deg, #402A22, #55372A); }
.cover-tone-4 { background: linear-gradient(135deg, #24303F, #37455A); }
.cover-tone-5 { background: linear-gradient(135deg, #2E2A18, #4A3F20); }

.badge-live {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; color: #fff;
  background: var(--live);
  padding: 4px 9px; border-radius: 999px;
  letter-spacing: .04em;
}
.badge-live .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

.badge-off {
  position: absolute; top: 12px; left: 12px;
  font-size: 11px; color: rgba(255, 255, 255, .7);
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 4px 9px; border-radius: 999px;
}

.cover-viewers {
  position: absolute; right: 12px; bottom: 12px;
  font-size: 11px; color: rgba(255, 255, 255, .82);
  background: rgba(6, 12, 20, .45);
  padding: 3px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}

.room-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.room-title { font-size: 15px; font-weight: 500; letter-spacing: -.01em; margin: 0; }
.room-speaker { font-size: 12px; color: var(--muted); }
.room-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag {
  font-size: 11px; color: #4B5B70;
  background: #F3F6FA; border: 1px solid var(--line-soft);
  padding: 2px 8px; border-radius: 6px;
}

.room-foot {
  margin-top: auto; padding-top: 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.room-foot .go { color: var(--brand-dark); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center; color: var(--muted);
  background: #fff;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 22px 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
  max-width: 1240px; margin: 0 auto;
}

/* ---------- 直播间 ---------- */

.room-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.room-top .title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-top .sep { color: #C8D2E0; }
.room-top .meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; }

.viewer-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }

.room-layout {
  max-width: 1360px; margin: 0 auto;
  padding: 20px 24px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  gap: 20px;
  align-items: start;
}

.stage-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: #070C13;
  aspect-ratio: 16 / 9;
}
.video-shell video { width: 100%; height: 100%; display: block; object-fit: contain; background: #070C13; }

.video-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(120% 100% at 50% 0%, rgba(23, 42, 62, .55), rgba(6, 11, 18, .92));
  color: #fff; text-align: center; padding: 24px;
  z-index: 2;
}
.video-overlay[hidden] { display: none; }
.video-overlay .ov-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.video-overlay .ov-desc { font-size: 12.5px; color: rgba(255, 255, 255, .55); max-width: 34ch; }
.video-overlay .ov-icon {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center; margin: 0 auto 14px;
}

.controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, rgba(6, 11, 18, 0), rgba(6, 11, 18, .82));
  z-index: 3;
  opacity: 1; transition: opacity .2s;
}
.video-shell:hover .controls { opacity: 1; }

.ctrl {
  width: 30px; height: 30px; border-radius: 8px;
  border: 0; background: rgba(255, 255, 255, .12);
  color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: .15s;
}
.ctrl:hover { background: rgba(255, 255, 255, .22); }

.ctrl-time { font-size: 11.5px; color: rgba(255, 255, 255, .65); font-variant-numeric: tabular-nums; }
.ctrl-spacer { flex: 1; }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #fff; background: rgba(242, 69, 91, .9);
  padding: 3px 8px; border-radius: 6px;
}

.stage-meta { padding: 18px 20px 20px; }
.stage-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.stage-title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.stage-sub { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

.speaker { display: inline-flex; align-items: center; gap: 7px; }
.speaker .av {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 11px; display: grid; place-items: center; font-weight: 500;
}

.announce {
  margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: #FBFDFC;
  font-size: 13px; color: #3D4C60;
  display: flex; gap: 9px; align-items: flex-start;
}
.announce b { font-weight: 500; color: var(--text); flex: 0 0 auto; }

.stage-tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

/* 聊天面板 */
.chat {
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px;
  display: flex; flex-direction: column;
  overflow: hidden;
  height: calc(100vh - 108px);
  min-height: 520px;
  position: sticky; top: 76px;
  box-shadow: var(--shadow);
}

.chat-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tabs { display: inline-flex; gap: 2px; background: #F1F4F9; padding: 3px; border-radius: 10px; }
.tab {
  border: 0; background: none; cursor: pointer;
  font-size: 12.5px; color: var(--muted);
  padding: 6px 11px; border-radius: 8px;
  transition: .15s;
}
.tab.active { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 26, 43, .08); }
.tab .cnt { font-size: 11px; color: var(--muted); margin-left: 3px; }

.conn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.conn .dot { width: 6px; height: 6px; border-radius: 50%; background: #C4CEDC; }
.conn.on .dot { background: var(--brand); }
.conn.off .dot { background: var(--live); }

.chat-body {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 11px;
  scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: #DEE6F0; border-radius: 3px; }

.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #EDF2F8; color: #43536A;
  font-size: 11.5px; font-weight: 500;
  display: grid; place-items: center; flex: 0 0 auto;
}
.avatar.brand { background: var(--brand-soft); color: var(--brand-dark); }
.msg-body { min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #93A1B3; margin-bottom: 3px; }
.msg-meta .nick { color: #5A6B80; font-weight: 500; }
.msg-text {
  display: inline-block;
  font-size: 13.5px; line-height: 1.55;
  background: #F5F7FA; color: #1B2738;
  padding: 7px 11px; border-radius: 10px;
  border-top-left-radius: 4px;
  word-break: break-word; white-space: pre-wrap;
  max-width: 100%;
}
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-body { text-align: right; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg.mine .msg-text {
  background: var(--brand-soft); color: #0A5E49;
  border-radius: 10px; border-top-right-radius: 4px;
  text-align: left;
}
.msg.private .msg-text { background: #FFF7EC; color: #7C4A12; border: 1px solid #F6E4C9; }

.sys {
  align-self: center; max-width: 92%;
  font-size: 11.5px; color: var(--muted);
  background: #F5F7FA; border-radius: 999px;
  padding: 4px 12px; text-align: center;
}

.chat-empty {
  margin: auto; text-align: center; color: #97A5B7;
  font-size: 12.5px; line-height: 1.8; padding: 20px;
}

.online-wrap { padding: 8px 6px; }
.online-title { font-size: 11px; color: var(--muted); padding: 6px 8px; letter-spacing: .04em; }
.online-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; cursor: pointer;
  transition: .15s;
}
.online-item:hover { background: #F5F7FA; }
.online-item .name { font-size: 13px; }
.online-item .hint { margin-left: auto; font-size: 11px; color: var(--brand-dark); opacity: 0; transition: .15s; }
.online-item:hover .hint { opacity: 1; }

.compose { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: #fff; position: relative; }

.target-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #CFEDE3;
  padding: 4px 8px; border-radius: 7px; margin-bottom: 8px;
  width: fit-content;
}
.target-chip button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 0 0 2px; font-size: 13px; line-height: 1; }

.compose-box {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 10px 6px;
  transition: .15s;
  background: #fff;
}
.compose-box:focus-within { border-color: #A9E0D0; box-shadow: 0 0 0 3px rgba(18, 166, 126, .08); }

.compose-box textarea {
  width: 100%; border: 0; outline: 0; resize: none;
  font: inherit; font-size: 13.5px; line-height: 1.55;
  max-height: 84px; min-height: 22px;
  color: var(--text); background: transparent;
}
.compose-box textarea::placeholder { color: #A6B3C3; }

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

.icon-btn {
  border: 0; background: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: #7C8B9E;
  transition: .15s;
}
.icon-btn:hover { background: #F1F4F9; color: var(--text); }

.counter { margin-left: auto; font-size: 11px; color: #A6B3C3; font-variant-numeric: tabular-nums; }

.send-btn {
  border: 0; cursor: pointer;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 500;
  padding: 7px 15px; border-radius: 9px;
  transition: .15s;
}
.send-btn:hover { background: var(--brand-dark); }
.send-btn:disabled { background: #D8E2EC; cursor: not-allowed; }

.emoji-pop {
  position: absolute; left: 12px; right: 12px; bottom: 96px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 8px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  box-shadow: var(--shadow-lg); z-index: 6;
}
.emoji-pop[hidden] { display: none; }
.emoji-pop button {
  border: 0; background: none; cursor: pointer;
  font-size: 19px; padding: 6px 0; border-radius: 8px; line-height: 1;
}
.emoji-pop button:hover { background: #F3F6FA; }

.notice {
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  background: #FFF6E9; color: var(--warn);
  border: 1px solid #F7E5C9;
}
.notice[hidden] { display: none; }

/* 昵称弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9, 16, 26, .42);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 20px;
}
.modal-mask[hidden] { display: none; }

.modal {
  width: 100%; max-width: 380px;
  background: #fff; border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.modal p { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }

.field {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px;
  font-size: 14px; outline: 0; transition: .15s;
  background: #fff; color: var(--text);
}
.field:focus { border-color: #A9E0D0; box-shadow: 0 0 0 3px rgba(18, 166, 126, .1); }

.modal .btn-primary { width: 100%; justify-content: center; margin-top: 14px; }
.modal-hint { font-size: 11.5px; color: #9AA8BA; margin-top: 10px; text-align: center; }

/* 提示条 */
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font-size: 13px; padding: 9px 16px; border-radius: 10px;
  box-shadow: var(--shadow-lg); z-index: 80;
  opacity: 0; pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }

/* ---------- 分享按钮 ---------- */

.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 12.5px; padding: 7px 12px; border-radius: 10px;
  cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  transition: .15s;
}
.share-btn:hover { border-color: #CFE9E0; background: #FBFDFC; }
.share-btn:active { transform: scale(.95); }
.share-btn svg { color: var(--brand-dark); }

/* ---------- 微信内打开引导浮层 ---------- */

.wx-guide {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 14, 23, .82);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: wx-fade .25s ease;
}
@keyframes wx-fade { from { opacity: 0; } to { opacity: 1; } }

.wx-arrow-wrap {
  position: absolute; top: 12px; right: 16px;
  text-align: center; color: #fff;
  animation: wx-bounce 1.1s ease-in-out infinite;
}
@keyframes wx-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.wx-tip {
  margin-top: 2px;
  font-size: 14px; line-height: 1.65;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.wx-tip b { font-weight: 600; }

.wx-card {
  position: absolute; left: 50%; top: 52%;
  transform: translate(-50%, -50%);
  width: min(320px, 84vw);
  background: #fff; border-radius: 18px;
  padding: 24px 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.wx-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.wx-card p { margin: 10px 0 18px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.wx-copy {
  display: block; width: 100%;
  border: 0; cursor: pointer;
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 500;
  padding: 12px 0; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(18, 166, 126, .22);
}
.wx-copy:active { background: var(--brand-dark); }

.wx-close {
  display: block; width: 100%;
  margin-top: 10px; padding: 10px 0;
  border: 0; background: none; cursor: pointer;
  font-size: 12.5px; color: var(--muted);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero h1 { font-size: 34px; }
  .preview-card { max-width: 560px; }
  .room-layout { grid-template-columns: minmax(0, 1fr); }
  .chat { height: 62vh; min-height: 420px; position: static; }
}

@media (max-width: 720px) {
  .nav { padding: 0 12px; height: 54px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-name { white-space: nowrap; font-size: 14px; }
  .nav-hide-sm { display: none; }
  .nav-btn { white-space: nowrap; padding: 8px 12px; }
  .share-btn span { display: none; }          /* 手机端只留图标 */
  .share-btn { padding: 7px 9px; }
  .hero { padding: 30px 16px 16px; }
  .hero > div { min-width: 0; }
  .hero h1 { font-size: 26px; overflow-wrap: anywhere; margin-bottom: 22px; }
  .hero-actions .btn-primary { white-space: nowrap; }
  .hero-stats { gap: 20px; margin-top: 24px; }
  .hero-stat b { font-size: 21px; }
  .section { padding: 10px 16px 36px; }
  .room-grid { padding: 0; gap: 14px; grid-template-columns: 1fr; }
  .foot { padding: 16px; flex-direction: column; gap: 4px; text-align: center; }
  .toast { top: auto; bottom: 96px; width: max-content; max-width: 86vw; }
}

/* ==========================================================
   H5 直播间：抖音式全屏（视频铺满、聊天浮在画面上、输入固定底部）
   ========================================================== */

@media (max-width: 720px) {
  body.room-page { overflow: hidden; height: 100%; }

  .room-layout {
    position: fixed; inset: 0;
    display: block; padding: 0; max-width: none;
  }

  /* 视频铺满整屏 */
  .stage-card {
    position: absolute; inset: 0;
    border: 0; border-radius: 0; box-shadow: none;
    background: #05090F;
  }
  .video-shell {
    position: absolute; inset: 0;
    aspect-ratio: auto; height: 100%;
    background: #05090F;
  }
  .video-shell video { object-fit: contain; }
  .video-overlay { background: radial-gradient(120% 100% at 50% 30%, rgba(23, 42, 62, .5), rgba(5, 9, 15, .86)); }
  .video-overlay .ov-desc { max-width: 26ch; }

  /* 顶栏透明浮层 */
  .room-top {
    position: absolute; top: 0; left: 0; right: 0;
    z-index: 24;
    background: linear-gradient(180deg, rgba(4, 8, 14, .74), rgba(4, 8, 14, 0));
    border-bottom: 0;
    color: #fff;
    padding: calc(env(safe-area-inset-top) + 10px) 12px 26px;
    gap: 8px;
  }
  .room-top .hide-sm, .room-top .sep, .room-top .share-txt { display: none; }
  .room-top .brand-name, .room-top .title { color: #fff; font-size: 13px; }
  .room-top .brand-mark { background: rgba(255, 255, 255, .18); }
  .room-top .viewer-chip { color: rgba(255, 255, 255, .88); }
  .room-top .share-btn {
    background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .24);
    color: #fff; padding: 7px 9px;
  }
  .room-top .share-btn svg { color: #fff; }

  /* 播放控制：浮在聊天区上方 */
  .controls {
    position: absolute; left: 0; right: 0;
    bottom: 46vh; z-index: 6;
    padding: 22px 10px 8px;
  }
  .ctrl { width: 34px; height: 34px; }

  /* 标题/标签让位给画面，只保留公告条 */
  .stage-meta {
    position: absolute; z-index: 7;
    top: calc(env(safe-area-inset-top) + 50px);
    left: 10px; right: 10px;
    padding: 0;
  }
  .stage-title-row, .stage-tags { display: none; }
  .announce {
    margin: 0;
    background: rgba(8, 14, 23, .58);
    border: 1px solid rgba(255, 255, 255, .14);
    border-left: 3px solid var(--brand);
    color: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 7px 11px;
    font-size: 12px;
    gap: 6px;
    align-items: center;
  }
  .announce b { color: #fff; }
  .announce span {
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; flex: 1;
  }

  /* 聊天：半透明浮层 */
  .chat {
    position: absolute; left: 0; right: 0; top: auto; bottom: 0;
    z-index: 22;
    height: 46vh; min-height: 0;
    background: linear-gradient(180deg, rgba(4, 8, 14, 0) 0%, rgba(4, 8, 14, .5) 18%, rgba(4, 8, 14, .9) 52%, rgba(4, 8, 14, .96) 100%);
    border: 0; border-radius: 0; box-shadow: none;
  }
  .chat-head { border-bottom: 0; padding: 4px 12px 2px; }
  .tabs { background: rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .tab { color: rgba(255, 255, 255, .74); padding: 7px 12px; font-size: 12.5px; }
  .tab.active { background: rgba(255, 255, 255, .94); color: #101A2B; }
  .tab .cnt { color: inherit; opacity: .55; }
  .conn { color: rgba(255, 255, 255, .6); }
  .conn .dot { background: rgba(255, 255, 255, .4); }
  .conn.on .dot { background: #35E0AE; }

  .chat-body { padding: 10px 12px 4px; -webkit-overflow-scrolling: touch; }
  .chat-body::-webkit-scrollbar { width: 3px; }
  .chat-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); }

  .msg-text {
    background: rgba(8, 14, 23, .52);
    color: #fff;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-size: 13px;
  }
  .msg.mine .msg-text { background: rgba(18, 166, 126, .94); color: #fff; }
  .msg.private .msg-text { background: rgba(255, 248, 238, .95); color: #7C4A12; border-color: rgba(255, 255, 255, .2); }
  .msg-meta { color: rgba(255, 255, 255, .5); }
  .msg-meta .nick { color: rgba(255, 255, 255, .85); }
  .avatar { background: rgba(255, 255, 255, .2); color: #fff; }
  .avatar.brand { background: rgba(53, 224, 174, .26); color: #B9FFEB; }
  .sys { background: rgba(8, 14, 23, .5); color: rgba(255, 255, 255, .74); }
  .chat-empty { color: rgba(255, 255, 255, .58); }
  .online-wrap { padding: 4px 2px; }
  .online-title { color: rgba(255, 255, 255, .55); }
  .online-item .name { color: #fff; }
  .online-item .hint { color: #7FE3C4; }
  .online-item:active { background: rgba(255, 255, 255, .1); }

  .notice { background: rgba(255, 246, 233, .95); }

  /* 输入区：固定底部、玻璃质感 */
  .compose {
    background: rgba(10, 16, 24, .78);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  }
  .compose-box {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 6px 12px 6px;
  }
  .compose-box:focus-within { border-color: rgba(53, 224, 174, .55); box-shadow: 0 0 0 3px rgba(53, 224, 174, .12); }
  .compose-box textarea { color: #fff; font-size: 13.5px; }
  .compose-box textarea::placeholder { color: rgba(255, 255, 255, .48); }
  .counter { color: rgba(255, 255, 255, .42); }
  .icon-btn { color: rgba(255, 255, 255, .68); }
  .icon-btn:active { background: rgba(255, 255, 255, .12); }
  .send-btn { border-radius: 999px; padding: 7px 16px; }
  .send-btn:disabled { background: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .5); }
  .target-chip {
    background: rgba(53, 224, 174, .16); border-color: rgba(53, 224, 174, .32);
    color: #B9FFEB;
  }
  .emoji-pop {
    left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 92px);
    background: rgba(16, 24, 34, .96); border-color: rgba(255, 255, 255, .12);
  }
  .emoji-pop button:hover, .emoji-pop button:active { background: rgba(255, 255, 255, .1); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
