:root {
  --bg: #0c0d14;
  --bg2: #12141f;
  --card: #181b28;
  --line: rgba(255,255,255,.08);
  --text: #f4f1ff;
  --muted: #9aa0b8;
  --gold: #ffc94a;
  --gold-ink: #3b146f;
  --accent: #7dffc8;
  --danger: #ff6b8a;
  --blue: #3ec6ff;
  --seat: #1c2030;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Outfit, system-ui, sans-serif; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
#app { min-height: 100%; }

.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(255,201,74,.16), transparent 50%),
    radial-gradient(700px 380px at 110% 20%, rgba(122,80,255,.2), transparent 46%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--gold-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
}
.brand h1 { margin: 0; font-size: 22px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
input, textarea {
  width: 100%; background: #12141f; border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; outline: none;
}
input:focus, textarea:focus { border-color: rgba(255,201,74,.5); }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700;
  background: var(--gold); color: var(--gold-ink);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #232636; color: var(--text); }
.btn-danger { background: #3a1b28; color: var(--danger); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 10px; }
.full { width: 100%; margin-top: 16px; }

.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(12,13,20,.9);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
}
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; padding: 14px 18px 0; }
.tab {
  background: transparent; color: var(--muted); border: 0; padding: 8px 14px; border-radius: 999px; font-weight: 700;
}
.tab.on { background: #232636; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 16px 18px 40px; }
.club {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer;
  text-align: left; color: inherit; padding: 0;
}
.club:hover { border-color: rgba(255,201,74,.35); }
.cover { height: 92px; background: #1a1e2e center/cover no-repeat; }
.club-body { padding: 12px 14px 14px; }
.club-body h3 { margin: 0 0 4px; font-size: 16px; }
.meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px; }
.live { color: #2fdb6e; font-weight: 700; }
.empty { padding: 40px 18px; color: var(--muted); text-align: center; }

.room {
  height: 100%;
  display: grid;
  grid-template-rows: 64px minmax(180px, 42vh) minmax(0, 1fr);
}
.room.theater { grid-template-rows: 64px minmax(240px, 58vh) minmax(0, 1fr); }
.stage {
  background: #0a0b12; border-bottom: 1px solid var(--line); position: relative; min-height: 180px;
}
#stage-body {
  position: absolute; inset: 0 0 40px 0; overflow: hidden; background: #000;
  display: grid; place-items: center; color: var(--muted); text-align: center;
}
.stage video, .stage iframe, .mini-stage video {
  width: 100%; height: 100%; object-fit: contain; background: #000; border: 0; display: block;
}
.stage-empty, .wait {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 16px;
}
.stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.stage-bar span { flex: 1; font-size: 13px; font-weight: 700; }
.chip {
  border: 0; border-radius: 10px; padding: 8px 10px; background: #232636; color: #fff; font-weight: 700; font-size: 12px;
}
.chip.gold { background: var(--gold); color: var(--gold-ink); }
.chip.danger { background: #3a1b28; color: var(--danger); }
.people { display: flex; gap: 12px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.seat {
  min-width: 72px; background: var(--seat); border-radius: 14px; padding: 8px 6px 10px; text-align: center;
}
.av {
  width: 40px; height: 40px; border-radius: 50%; background: #2a3148; margin: 0 auto 6px;
  display: grid; place-items: center; font-weight: 800; overflow: hidden; color: #c9c4e0;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.seat small, .lis small { display: block; font-size: 11px; color: var(--muted); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lis { min-width: 64px; text-align: center; }
.chat-wrap { display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.chat { overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.sys { text-align: center; color: #b8b4c9; font-size: 12px; font-weight: 700; }
.notice {
  align-self: flex-start; max-width: 92%; background: #1a3d38; color: var(--accent);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; line-height: 1.35;
}
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .av { width: 28px; height: 28px; font-size: 12px; margin: 0; }
.msg p { margin: 0; font-size: 13px; line-height: 1.35; color: #ddd7ef; }
.msg b { color: var(--blue); }
.composer { display: flex; gap: 8px; padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.composer input { flex: 1; }
.mini-stage {
  position: fixed; right: 14px; top: 76px; width: 220px; height: 124px; z-index: 30;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.hidden { display: none !important; }
.share-menu {
  position: absolute; right: 10px; bottom: 48px; background: #1c2030; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; display: grid; gap: 6px; min-width: 180px;
}
.share-menu button { text-align: left; background: transparent; border: 0; color: #fff; padding: 8px 10px; border-radius: 8px; }
.share-menu button:hover { background: #2a3148; }
@media (max-width: 720px) {
  .room { grid-template-rows: 64px minmax(160px, 34vh) minmax(0, 1fr); }
}
