/* ==========================================================================
   小鱼来了 — 会议与群聊邀请（会议界面参考腾讯会议的布局语言）
   ========================================================================== */

/* ---------------- 会议号加入页 ---------------- */
.join-hero {
  text-align: center;
  padding: 28px 0 12px;
}
.join-hero .ico { font-size: 52px; }
.join-code {
  width: 100%;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 8px;
  padding: 14px 10px;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  outline: none;
  font-variant-numeric: tabular-nums;
}
.join-code:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.join-hint { font-size: 12.5px; color: var(--text-3); text-align: center; margin-top: 8px; }

/* ---------------- 会前预览（Lobby） ---------------- */
.lobby { padding: 16px 12px 24px; }
.lobby-stage {
  position: relative;
  background: #10141b;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}
.lobby-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.lobby-stage .placeholder { color: #6b7a90; text-align: center; }
.lobby-stage .placeholder .ico { font-size: 44px; margin-bottom: 6px; }
.lobby-preview-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
}
.lobby-toggles {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.lobby-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lobby-toggle.on { background: var(--brand-050); border-color: #cfe0ff; color: var(--brand-600); }
.lobby-toggle.off { background: #fdecec; border-color: #f7c9c9; color: var(--danger); }
.lobby-mic-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin-top: 10px;
  overflow: hidden;
}
.lobby-mic-bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }

/* ---------------- 会议中 ---------------- */
.mt-room {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #14171d;
  color: #e8ecf3;
  font-size: 14px;
}

.mt-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  padding-top: calc(8px + var(--safe-t));
  background: #1b1f27;
  border-bottom: 1px solid #262b35;
  flex: none;
}
.mt-top .mt-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.mt-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #262b35;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: #9fb0c9;
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mt-no:hover { background: #313846; color: #fff; }
.mt-timer { font-size: 12.5px; color: #9fb0c9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.mt-dot.bad { background: var(--danger); }
.mt-rec { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #ff6b6b; }

.mt-stage { flex: 1; display: flex; min-height: 0; }

.mt-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
  overflow: auto;
  align-content: center;
  justify-content: center;
  grid-auto-rows: minmax(120px, 1fr);
}
.mt-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.mt-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-grid[data-count="3"], .mt-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-grid[data-count="5"], .mt-grid[data-count="6"],
.mt-grid[data-count="7"], .mt-grid[data-count="8"], .mt-grid[data-count="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt-grid[data-count="10"], .mt-grid[data-count="11"], .mt-grid[data-count="12"],
.mt-grid[data-count="13"], .mt-grid[data-count="14"], .mt-grid[data-count="15"], .mt-grid[data-count="16"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-grid.screen { grid-template-columns: minmax(0, 1fr); }

.mt-tile {
  position: relative;
  background: #0e1116;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 110px;
  border: 1px solid #262b35;
}
.mt-tile video { width: 100%; height: 100%; object-fit: cover; }
.mt-tile.self video { transform: scaleX(-1); }
.mt-tile .mt-avatar { font-size: 34px; width: 64px; height: 64px; border-radius: 50%; background: #2a3140; display: grid; place-items: center; color: #cfd9e8; }
.mt-tile .mt-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .5);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
}
.mt-tile .mt-label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-tile .mt-flags { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.mt-tile .mt-flag { background: rgba(0, 0, 0, .5); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.mt-tile.speaking { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(18, 164, 91, .35); }
.mt-tile.sharing { grid-column: 1 / -1; }
.mt-tile.sharing video { object-fit: contain; background: #000; }

.mt-side {
  width: 320px;
  flex: none;
  background: #1b1f27;
  border-left: 1px solid #262b35;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mt-side-head { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid #262b35; flex: none; }
.mt-tab {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 13px;
  color: #9fb0c9;
  cursor: pointer;
}
.mt-tab.active { background: #2a3140; color: #fff; font-weight: 600; }
.mt-side-body { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; }
.mt-member { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; }
.mt-member:hover { background: #232835; }
.mt-member .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-member .role { font-size: 11px; color: #7f8fa6; }
.mt-member .mini { font-size: 13px; opacity: .8; }

.mt-chat { display: flex; flex-direction: column; height: 100%; }
.mt-chat-list { flex: 1; overflow-y: auto; padding: 4px 2px; }
.mt-chat-msg { margin-bottom: 10px; font-size: 13.5px; }
.mt-chat-msg .who { font-size: 11.5px; color: #7f8fa6; margin-bottom: 2px; }
.mt-chat-msg .txt { background: #262b35; border-radius: 10px; padding: 7px 10px; word-break: break-word; white-space: pre-wrap; }
.mt-chat-msg.me .txt { background: #1f4a8f; }
.mt-chat-msg.system { text-align: center; color: #7f8fa6; font-size: 12px; }
.mt-chat-input { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #262b35; flex: none; }
.mt-chat-input input {
  flex: 1;
  background: #262b35;
  border: none;
  border-radius: 8px;
  padding: 9px 11px;
  color: #e8ecf3;
  outline: none;
  min-width: 0;
}
.mt-chat-input input::placeholder { color: #6b7a90; }

.mt-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px calc(8px + var(--safe-b));
  background: #1b1f27;
  border-top: 1px solid #262b35;
  flex-wrap: wrap;
}
.mt-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 62px;
  padding: 6px 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #cfd9e8;
  font-size: 11.5px;
  cursor: pointer;
}
.mt-btn .i { font-size: 19px; line-height: 1; }
.mt-btn:hover { background: #262b35; }
.mt-btn.off { color: #ff7b7b; }
.mt-btn.primary { background: var(--brand); color: #fff; }
.mt-btn.danger { background: #b3262b; color: #fff; }
.mt-btn.on { background: #2f6b46; color: #fff; }
.mt-btn:disabled { opacity: .45; pointer-events: none; }

@media (min-width: 900px) {
  .mt-side { width: 340px; }
}
@media (max-width: 720px) {
  .mt-side {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 86vw;
    max-width: 360px;
    z-index: 70;
    box-shadow: -12px 0 32px rgba(0, 0, 0, .5);
    transform: translateX(102%);
    transition: transform .2s;
  }
  .mt-side.open { transform: none; }
  .mt-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
  .mt-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-grid[data-count="3"], .mt-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-grid[data-count="5"], .mt-grid[data-count="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-btn { min-width: 52px; padding: 6px 4px; }
}

/* ---------------- 会议邀请卡 ---------------- */
.invite-card {
  border-radius: var(--r-lg);
  padding: 18px;
  background: linear-gradient(155deg, #1b1f27, #2a3140);
  color: #fff;
  text-align: center;
}
.invite-card .t { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.invite-card .h { font-size: 12.5px; opacity: .7; margin-bottom: 14px; }
.invite-card .n {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 5px;
  font-variant-numeric: tabular-nums;
  margin: 6px 0;
}
.invite-card .p { font-size: 12.5px; opacity: .8; }
.invite-card img { margin: 12px auto 6px; width: 168px; height: 168px; border-radius: 10px; background: #fff; padding: 6px; }
.invite-card .tip { font-size: 11.5px; opacity: .6; }

/* ---------------- 群公告 ---------------- */
.announce {
  background: #fff8e6;
  border: 1px solid #ffe1a8;
  border-radius: var(--r);
  padding: 10px 12px;
  font-size: 13px;
  color: #8a5a00;
  margin-bottom: 10px;
}
.announce b { color: #6b4600; }
