/* ============================================================
   屏共会议 · 视觉系统 v2
   外部页面：明亮、有层次的现代 SaaS 风格
   会议中：  深色沉浸舞台（共享画面需要高对比），带蓝紫光晕
   ============================================================ */
:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e3e9f3;
  --text: #16213c;
  --muted: #6b7a99;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --grad: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
  --danger: #dc2626;
  --danger-strong: #b91c1c;
  --ok: #059669;
  --warn: #d97706;
  --shadow: 0 12px 34px rgba(24, 39, 75, .08);
  --shadow-lg: 0 24px 64px rgba(24, 39, 75, .16);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(99, 102, 241, .13), transparent 62%),
    radial-gradient(760px 480px at 96% 4%, rgba(14, 165, 233, .12), transparent 60%),
    radial-gradient(680px 520px at 50% 110%, rgba(168, 85, 247, .07), transparent 65%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.02em; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(227, 233, 243, .9);
  box-shadow: 0 2px 16px rgba(24, 39, 75, .04);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--grad); box-shadow: 0 6px 16px rgba(79, 70, 229, .32);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; line-height: 1;
}
.room-label { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
main { max-width: 1120px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px) 60px; }

/* ---------------- 表单与按钮 ---------------- */
input, select, textarea {
  padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color .16s, box-shadow .16s, background .16s;
  outline: none;
}
input::placeholder { color: #9aa8c2; }
input:focus, select:focus, textarea:focus {
  border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, .13);
}
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; padding: 0; }
button {
  cursor: pointer; border: 1px solid transparent; border-radius: 11px;
  padding: 11px 18px; font-size: 15px; font-weight: 600; font-family: inherit;
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .22);
  transition: transform .14s, box-shadow .14s, filter .14s, background .14s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79, 70, 229, .3); }
button:active { transform: translateY(0); }
button:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
button.danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 6px 18px rgba(220, 38, 38, .2); }
button.ghost {
  background: var(--surface); border-color: var(--line); color: var(--muted);
  box-shadow: none;
}
button.ghost:hover { color: var(--accent); border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(24, 39, 75, .07); }
button.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
button.primary { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 6px 18px rgba(5, 150, 105, .22); }
button.mini { padding: 4px 9px; font-size: 12px; border-radius: 8px; background: #edf1f8; color: #43547a; box-shadow: none; }
button.mini:hover { filter: brightness(.96); box-shadow: none; }
button.mini.ok { background: #d1fae5; color: #047857; }
button.mini.no { background: #fee2e2; color: var(--danger-strong); }
button.mini.danger { background: #fee2e2; color: var(--danger-strong); box-shadow: none; }
.mini-actions { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }
.row { display: flex; gap: 8px; }
.row input, .row select { flex: 1; min-width: 0; }
.row button { flex-shrink: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 14px; }
.hidden { display: none !important; }
.sub { color: #94a3b8; font-size: 12px; font-weight: 400; }

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 32px); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h1 { margin: 0 0 20px; font-size: 24px; font-weight: 750; }
.card label { display: block; margin: 15px 0 6px; color: #45577c; font-size: 14px; font-weight: 600; }
.card > label > input { width: 100%; margin-top: 7px; }
.card > button { width: 100%; margin-top: 22px; padding: 13px; }
.card > button.ghost { margin-top: 10px; width: auto; display: block; }
.card label.chk { display: flex; align-items: center; gap: 9px; color: var(--text); margin-top: 17px; font-weight: 500; }
.card label.chk input { width: auto; margin: 0; }
.two-col label > input { margin-top: 7px; width: 100%; }
.page-head { margin: 4px 0 26px; }
.page-head h1 { margin: 0 0 8px; font-size: 28px; font-weight: 780; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 16px; border-radius: 3px; background: var(--grad); }

/* ---------------- 首页 Hero ---------------- */
.hero { text-align: center; padding: 0 0 14px; }
.hero h1 {
  margin: 0 0 8px; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.2;
  font-weight: 820; letter-spacing: -.045em;
  background: linear-gradient(120deg, #1e2a4a 10%, #4f46e5 55%, #0ea5e9 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* 首页一屏显示：auto 外边距在剩余高度内垂直居中；
   内容超高时自动退化为普通滚动，不会像 justify-content:center 那样裁掉顶部 */
body.on-entry main { padding-top: 10px; padding-bottom: 10px; }
/* 减去顶栏(约 59px) + main 上下 padding(20px)，否则弹性高度本身就会把页面撑出滚动条 */
body.on-entry #entryPanel { min-height: calc(100dvh - 80px); display: flex; flex-direction: column; }
body.on-entry #entryPanel > .hero { margin-top: auto; }
body.on-entry #entryPanel > .entry-wrap { margin-bottom: auto; }
#entryPanel .card { padding: 18px 22px; }
#entryPanel .card h1 { margin: 0 0 10px; font-size: 20px; }
#entryPanel .card label { margin: 9px 0 4px; }
#entryPanel .card > label > input { margin-top: 5px; padding: 9px 12px; }
#entryPanel .card > button { margin-top: 14px; padding: 11px; }
#entryPanel .hint { margin-top: 9px; font-size: 12px; line-height: 1.5; }
#entryPanel .notice { margin: 10px 0 0; padding: 9px 12px; font-size: 12px; }
@media (max-height: 780px) {
  #entryPanel .hero { padding-bottom: 8px; }
  #entryPanel .hero h1 { font-size: 26px; }
  #entryPanel .hero p { font-size: 13px; }
  #entryPanel .card { padding: 14px 20px; }
  #entryPanel .card label { margin: 7px 0 3px; }
  #entryPanel .card > label > input { padding: 8px 11px; }
  #entryPanel .card > button { margin-top: 11px; padding: 10px; }
}

/* ---------------- 入口标签页 ---------------- */
.entry-wrap { max-width: 500px; margin: 0 auto; }
.tabs, .entry-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.entry-tabs { justify-content: center; background: rgba(255,255,255,.7); padding: 6px; border-radius: 14px; border: 1px solid var(--line); }
.tab {
  background: transparent; color: var(--muted); border: none; box-shadow: none;
  padding: 9px 18px; border-radius: 10px; font-size: 14px;
}
.tab:hover { transform: none; box-shadow: none; color: var(--accent); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .24); }
.tab-page h2 { font-size: 18px; }
.join-panel { max-width: 420px; margin: 6vh auto; }
.join-panel h1 { margin-top: 0; font-size: 22px; }
.join-panel label { display: block; margin: 16px 0 6px; color: var(--muted); font-size: 14px; }
.join-panel input { width: 100%; }
.join-panel > button { width: 100%; margin-top: 18px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-row > button { flex: 1; min-width: 130px; margin-top: 0; }

.warn {
  background: #fffbeb; border: 1px solid #fcd34d; color: #92400e;
  padding: 11px 14px; border-radius: 11px; font-size: 13px; line-height: 1.65; margin-bottom: 15px;
}
.warn button { margin-left: 8px; }
.notice {
  background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3;
  padding: 11px 14px; border-radius: 11px; font-size: 13px; line-height: 1.65; margin: 14px 0;
}
.meeting-info {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
  padding: 9px 12px; border-radius: 10px; font-size: 13px; margin-top: 8px; line-height: 1.6;
}

/* ---------------- 预约成功 / 我的预约 ---------------- */
#bookResult { max-width: 560px; margin: 28px auto; }
.result-card { text-align: left; }
.result-ok { color: var(--ok); font-size: 16px; font-weight: 750; margin-bottom: 10px; }
.kv {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.kv > span:first-child { color: var(--muted); flex-shrink: 0; }
.big-number { font-size: 22px; letter-spacing: 2px; color: var(--accent); font-weight: 750; }
.kv .link { color: var(--accent); font-size: 13px; word-break: break-all; text-align: right; }
#enterAsHost { margin-top: 20px; }
.my-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(24, 39, 75, .04);
  transition: border-color .15s, box-shadow .15s;
}
.my-item:hover { border-color: #c7d2fe; box-shadow: 0 8px 24px rgba(24, 39, 75, .08); }
.my-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; gap: 10px; }
.my-meta { color: var(--muted); font-size: 13px; margin: 9px 0 10px; line-height: 1.6; }
.my-link { display: inline-block; color: var(--accent); font-size: 13px; margin-bottom: 12px; word-break: break-all; }
.my-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mine-group { color: var(--muted); font-size: 13px; margin: 20px 0 10px; font-weight: 700; }
.mine-group:first-of-type { margin-top: 4px; }

/* ---------------- 等候室 ---------------- */
#lobbyPanel { max-width: 480px; margin: 8vh auto; }
.lobby-card { text-align: center; padding: 44px 30px; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 22px;
  border: 4px solid #e0e7ff; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lobby-info { color: var(--accent); font-size: 15px; font-weight: 600; }

/* ---------------- 表格 / 徽章 / 后台 ---------------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 650; background: var(--surface-2); font-size: 13px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fafbff; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge.on { background: #d1fae5; color: #047857; }
.badge.off { background: #fee2e2; color: var(--danger-strong); }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.info { background: #e0e7ff; color: #4338ca; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 8px; background: #eef2f8; color: #43547a; font-size: 12px; font-weight: 600; }
.add-user { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.add-user input { flex: 1 1 160px; min-width: 140px; padding: 9px 11px; }
.add-user button { flex: 0 0 auto; }
.review-setting {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin: 0 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.review-setting .switch-line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.review-setting .hint { margin: 0; }
.room-form {
  display: flex; flex-wrap: wrap; gap: 10px; background: var(--surface);
  padding: 16px; border-radius: 14px; margin-bottom: 16px; align-items: center; border: 1px solid var(--line);
}
.room-form input#fName { width: 210px; }
.room-form input#fTitle { width: 170px; }
.room-form input#fMax { width: 90px; }
.room-form input#fPassword { width: 150px; }
#participantBox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-top: 16px; }
#participantBox h3 { margin: 0 0 12px; font-size: 15px; }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; }

/* ---------------- 控制台 / 平台后台 ---------------- */
.console-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 28px; }
.console-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s, border-color .16s; color: var(--text);
}
.console-card:hover { text-decoration: none; transform: translateY(-3px); border-color: #c7d2fe; box-shadow: var(--shadow-lg); color: var(--text); }
.console-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 25px; box-shadow: 0 10px 24px rgba(79,70,229,.28); margin-bottom: 18px; }
.console-icon.alt { background: linear-gradient(135deg, #0f766e, #0ea5e9); box-shadow: 0 10px 24px rgba(14,165,233,.26); }
.console-card h2 { margin: 0 0 8px; font-size: 19px; }
.console-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.console-card .go { display: inline-block; margin-top: 18px; color: var(--accent); font-weight: 700; font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 4px 0 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 4px 14px rgba(24,39,75,.04); }
.stat-card b { display: block; font-size: 26px; font-weight: 780; line-height: 1.2; color: var(--accent); }
.stat-card span { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.form-grid label { display: block; font-size: 13px; font-weight: 650; color: #45577c; }
.form-grid input, .form-grid select { width: 100%; margin-top: 6px; }
.panel-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel-block h2 { margin: 0 0 6px; font-size: 18px; }
.panel-block > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.quota-bar { height: 7px; border-radius: 99px; background: #e8edf6; overflow: hidden; margin-top: 7px; max-width: 190px; }
.quota-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.quota-bar.full i { background: linear-gradient(135deg, #ef4444, #dc2626); }
.user-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; flex-shrink: 0; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 750; box-shadow: 0 10px 24px rgba(79,70,229,.26); }
.user-hero h2 { margin: 0; font-size: 20px; }
.user-hero p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------------- 登录 / 注册弹窗 ---------------- */
.user-area { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; }
.user-area .user-name { color: var(--accent); font-weight: 700; }
.auth-modal {
  position: fixed; inset: 0; background: rgba(16, 24, 48, .48);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px;
}
.auth-box {
  width: min(400px, 94vw); max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px; box-shadow: var(--shadow-lg);
}
.auth-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.auth-tabs { display: flex; gap: 18px; }
.auth-tab {
  background: transparent; color: var(--muted); border: none; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 8px 2px; box-shadow: none; font-size: 15px;
}
.auth-tab:hover { transform: none; box-shadow: none; color: var(--accent); }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-box label { display: block; margin: 13px 0 6px; color: #45577c; font-size: 13px; font-weight: 650; }
.auth-box label input { width: 100%; margin-top: 6px; }
#doLogin, #doRegister { width: 100%; margin-top: 20px; padding: 12px; }
.auth-box .row input { margin-top: 0; }
.auth-box .row button { margin-top: 0; }
.auth-modal .auth-close { background: transparent; color: var(--muted); box-shadow: none; border: none; padding: 4px 8px; font-size: 18px; }
.auth-modal .auth-close:hover { color: var(--danger); transform: none; box-shadow: none; }

/* ---------------- 屏幕源选择弹窗 ---------------- */
.source-picker {
  position: fixed; inset: 0; background: rgba(16, 24, 48, .6);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 100;
}
.source-picker-box {
  width: min(760px, 92vw); max-height: 80vh; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg);
}
.source-picker-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.source-picker-list { padding: 18px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
.source-group { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-weight: 650; margin-top: 4px; }
.source-item { background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .1s; }
.source-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.source-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #0b1020; display: block; }
.source-ph { width: 100%; aspect-ratio: 16/9; display: grid; place-items: center; font-size: 34px; color: #94a3b8; background: linear-gradient(135deg, #eef2ff, #e0f2fe); }
.source-name { padding: 9px 11px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 网页版「共享内容类型」选择：整个屏幕 / 应用窗口 / 标签页 */
.share-chooser-list { padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.share-choice {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px;
  padding: 18px 12px; cursor: pointer; transition: border-color .15s, transform .1s, background .15s;
  color: var(--text); text-align: center;
}
.share-choice:hover { border-color: var(--accent); transform: translateY(-2px); }
.share-choice:disabled { opacity: .45; cursor: not-allowed; transform: none; border-color: var(--line); }
.share-choice .sc-icon { font-size: 30px; line-height: 1; }
.share-choice .sc-title { font-size: 15px; font-weight: 700; }
.share-choice .sc-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.share-chooser-note {
  margin: 0 18px 18px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5;
  color: #92400e; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px;
}
@media (max-width: 560px) { .share-chooser-list { grid-template-columns: 1fr; } }

/* ============================================================
   会议中：沿用首页 / 登录页的明亮渐变背景
   视频画面保留深色舞台保证共享内容高对比，其余面板改为浅色玻璃态
   ============================================================ */
body.in-meeting { color: var(--text); }
body.in-meeting main { padding-bottom: 24px; }

.meeting-panel { display: flex; flex-direction: column; gap: 16px; }
.perm-banner {
  background: #fffbeb; border: 1px solid #fcd34d;
  color: #92400e; padding: 11px 15px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; line-height: 1.6;
}
.share-banner, .host-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 15px; border-radius: 12px; font-size: 14px;
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(5, 150, 105, .28);
  color: #047857; box-shadow: var(--shadow);
}
.share-banner span { flex: 1; }
.host-bar { border-color: rgba(99, 102, 241, .28); color: #4338ca; }
.host-tag { color: #b45309; font-weight: 700; }
.host-info { flex: 1; color: var(--muted); }
.meeting-body { display: flex; gap: 14px; align-items: stretch; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.meeting-body .grid { flex: 1; min-width: 0; align-content: start; }
/* 侧栏收起把手：贴在两栏之间，点一下把右侧栏收起，画面区自动变宽 */
.side-toggle {
  flex: 0 0 auto; align-self: flex-start; margin-top: 20px;
  width: 22px; height: 62px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: var(--muted);
  border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); font-size: 16px; font-weight: 800; line-height: 1;
  transition: color .15s, background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.side-toggle:hover { color: var(--accent); border-color: #c7d2fe; background: #fff; box-shadow: 0 6px 18px rgba(24, 39, 75, .12); transform: translateX(1px); }
.side-toggle:active { transform: translateX(1px) scale(.97); }
.meeting-body.collapsed .side-toggle:hover { transform: translateX(-1px); }
.meeting-body.collapsed .side-toggle:active { transform: translateX(-1px) scale(.97); }
.tile {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
  background: linear-gradient(150deg, #111b31, #0a1122);
  border: 1px solid #263352;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .24);
}
.tile video { width: 100%; height: 100%; object-fit: contain; background: #05080f; }
.tile-label {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  background: rgba(8, 13, 26, .72); backdrop-filter: blur(6px);
  padding: 4px 10px; border-radius: 8px; font-size: 12px; color: #e9efff;
  border: 1px solid rgba(255,255,255,.09);
}
.tile.focused { grid-column: 1 / -1; aspect-ratio: 16/9; cursor: zoom-out; }
.hand-badge { position: absolute; right: 10px; top: 10px; z-index: 2; background: #f59e0b; color: #141d33; border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 700; }
.tile-watermark { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; pointer-events: none; z-index: 1; overflow: hidden; transform: rotate(-20deg) scale(1.15); user-select: none; padding: 20px; }
.tile-watermark span { color: rgba(255,255,255,.10); font-size: 22px; font-weight: 700; letter-spacing: 4px; white-space: nowrap; margin: 12px 18px; }
/* 画面全屏按钮：常驻可见、纯图标（不带文字），带状态反馈 */
.tile-fs {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  background: rgba(8, 13, 26, .82); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 9px;
  font-size: 12px; font-weight: 650; line-height: 1;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.tile-fs .tile-fs-icon { font-size: 15px; line-height: 1; }
.tile-fs:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79, 70, 229, .4); }
.tile-fs.on { background: var(--accent); border-color: rgba(255, 255, 255, .5); }
.tile:fullscreen { aspect-ratio: auto; border-radius: 0; background: #000; }
.tile:fullscreen video { object-fit: contain; }
.tile.fs-fullscreen { position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; cursor: default; }
.tile.fs-fullscreen video { object-fit: contain; }
/* 放大后把退出按钮挪到右上角并放大，保证一眼可见、随时能退出 */
.tile:fullscreen .tile-fs, .tile.fs-fullscreen .tile-fs { top: 16px; right: 16px; bottom: auto; width: 40px; height: 40px; }
.tile:fullscreen .tile-fs .tile-fs-icon, .tile.fs-fullscreen .tile-fs .tile-fs-icon { font-size: 19px; }

.sidebar {
  width: 310px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
  transition: width .24s cubic-bezier(.22, .61, .36, 1), opacity .18s ease;
}
/* 收起后侧栏宽度归零，画面区（flex:1）自动占满剩余空间 */
.meeting-body.collapsed .sidebar {
  width: 0; opacity: 0; pointer-events: none;
  visibility: hidden;
  transition: width .24s cubic-bezier(.22, .61, .36, 1), opacity .18s ease, visibility 0s linear .24s;
}
.side-section {
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; min-height: 0;
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.side-head { font-size: 13px; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; font-weight: 650; }
.p-count { background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.p-list { list-style: none; margin: 0; padding: 0; max-height: 170px; overflow-y: auto; }
.p-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 3px; font-size: 14px; border-bottom: 1px solid var(--line); }
.p-list li:last-child { border-bottom: none; }
.p-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.p-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.empty-line { color: var(--muted); font-size: 13px; justify-content: center; }
#hostApproval .p-list { max-height: 180px; }
.chat-section { flex: 1; }
.chat-log { flex: 1; min-height: 240px; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding-right: 4px; }
.chat-msg { font-size: 14px; line-height: 1.5; }
.chat-msg .chat-meta { display: block; color: var(--muted); font-size: 12px; }
.chat-msg .chat-text { display: block; word-break: break-word; }
.chat-msg.self .chat-text { color: var(--accent); }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; min-width: 0; font-size: 14px; }
.chat-form button { padding: 9px 15px; font-size: 14px; }
.transcript-section .side-head { display: flex; align-items: center; }
.transcript-log { max-height: 260px; }
.transcript-item { padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.transcript-item .t-meta { display: block; color: var(--accent-2); font-size: 12px; margin-bottom: 2px; }
.transcript-item .t-text { white-space: pre-wrap; word-break: break-word; }

.controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 18px; padding: 12px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .88); border: 1px solid var(--line);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  position: sticky; bottom: 12px; z-index: 20;
}
.controls button { min-width: 106px; background: #f1f4fb; color: #43547a; border-color: var(--line); box-shadow: none; }
.controls button:hover { background: #e7ecfa; color: var(--accent); box-shadow: none; }
.controls button.active { background: linear-gradient(135deg, #059669, #10b981); color: #fff; border-color: transparent; }
.controls button.recording { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border-color: transparent; animation: recPulse 1.4s ease-in-out infinite; }
.controls button.danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.controls button.danger:hover { background: linear-gradient(135deg, #e03b3b, #b91c1c); color: #fff; }
.controls button.mini { min-width: 0; padding: 7px 10px; font-size: 12px; }
.rec-dir-group { display: inline-flex; gap: 5px; align-items: center; }
@keyframes recPulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }

/* D：画面铺满（cover）开关——开启后共享画面填满整个格子，不再留黑边 */
body.cover-fill .tile video,
body.cover-fill .tile img { object-fit: cover; }
.controls button.on { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; border-color: transparent; }

/* B：沉浸模式——隐藏一切非画面元素，画面占满整屏；控件可自动淡出 */
body.immersive .topbar,
body.immersive .share-banner,
body.immersive .host-bar,
body.immersive .side-toggle,
body.immersive .perm-banner { display: none !important; }
body.immersive main { max-width: none; padding: 0; }
body.immersive .meeting-body { min-height: 100vh; gap: 0; }
body.immersive .sidebar { display: none !important; }
body.immersive .controls {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 50; margin-top: 0;
  transition: opacity .45s ease, transform .45s ease;
}
body.immersive .controls.faded { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(14px); }

/* C：浏览器全屏被拦截（如预览 iframe / 无头环境）时的页面级铺满兜底 */
body.page-fs main {
  position: fixed; inset: 0; z-index: 9999; max-width: none;
  padding: 70px 16px 16px; overflow: auto; background: var(--bg);
}
body.page-fs .topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; }

/* ============================================================
   摄像头视频（完整版）
   - 仅摄像头：画面铺满格子（cover 人像更自然）
   - 摄像头 + 屏幕共享同格：摄像头缩小为右下角画中画
   - 本地画面可镜像（仅自己看到），远端不受影响
   ============================================================ */
.tile video.cam-video { width: 100%; height: 100%; object-fit: cover; background: #05080f; }
.tile video.cam-video.mirror { transform: scaleX(-1); }
.tile.has-screen video.cam-video {
  position: absolute; right: 10px; bottom: 44px; width: 168px; height: 112px;
  object-fit: cover; border-radius: 11px; border: 2px solid rgba(255, 255, 255, .45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55); z-index: 2;
}
.tile.has-screen video.cam-video.mirror { transform: scaleX(-1); }
.cam-gear { min-width: 0 !important; padding: 11px 12px !important; font-size: 16px !important; line-height: 1; }
.controls button#cameraBtn.active { background: linear-gradient(135deg, #059669, #10b981); color: #fff; border-color: transparent; }

/* 摄像头 / 麦克风设置弹窗 */
.cam-modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(9, 14, 28, .62); backdrop-filter: blur(6px); padding: 20px;
}
.cam-box {
  width: min(520px, 100%); background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 20px;
}
.cam-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 17px; font-weight: 750; }
.cam-preview-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden;
  background: linear-gradient(150deg, #111b31, #0a1122); margin-bottom: 16px;
}
.cam-preview-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-preview-wrap video.mirror-off { transform: none; }
.cam-preview-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #9fb0d0; font-size: 15px; pointer-events: none;
}
.cam-preview-ph.hidden { display: none; }
.cam-fields { display: grid; gap: 12px; }
.cam-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.cam-fields select { width: 100%; }
.cam-fields .cam-chk { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.cam-tip { font-size: 12px; color: var(--warn); margin: 12px 0 0; min-height: 16px; line-height: 1.5; }
.cam-actions { display: flex; gap: 10px; margin-top: 14px; }
.cam-actions button { flex: 1; }
@media (max-width: 560px) {
  .tile.has-screen video.cam-video { width: 112px; height: 78px; right: 8px; bottom: 40px; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .meeting-body { flex-direction: column; }
  .sidebar { width: 100%; }
  .side-toggle { display: none; }
  .meeting-body.collapsed .sidebar { width: 100%; opacity: 1; pointer-events: auto; }
  .chat-log { min-height: 180px; }
}
@media (max-width: 560px) {
  .two-col { grid-template-columns: 1fr; }
  .controls { gap: 7px; padding: 10px; bottom: 6px; }
  .controls button { min-width: 88px; padding: 10px 8px; font-size: 13px; }
  .hero { padding: 0 0 10px; }
  .room-label { gap: 8px; font-size: 12px; }
  .topbar { padding: 10px 14px; }
  .tbl th, .tbl td { padding: 9px 10px; font-size: 13px; }
}
