:root {
  --bg: #070708;
  --panel: #101012;
  --panel-2: #17171a;
  --panel-3: #24242a;
  --gold: #d8ae58;
  --gold-2: #f7d984;
  --red: #ff3150;
  --green: #26d07c;
  --blue: #58a6ff;
  --muted: #b9b4a8;
  --text: #fff7df;
  --line: rgba(216, 174, 88, .36);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(216,174,88,.16), transparent 28rem),
    radial-gradient(circle at 80% 20%, rgba(180,20,42,.13), transparent 24rem),
    linear-gradient(135deg, #050506, #0e0e13 55%, #050506);
  color: var(--text);
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #111; padding: .7rem; z-index: 1000; }
.skip-link:focus { left: 0; }
.gg-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 68px; padding: .7rem 1rem;
  background: linear-gradient(180deg, #151518, #050506);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: #111; box-shadow: 0 0 25px rgba(216,174,88,.2); }
.brand-title { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title strong { font-size: 1.2rem; letter-spacing: .02em; }
.brand-title span { color: var(--muted); font-size: .82rem; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.nav a, .btn, button.btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(242,211,135,.13), rgba(216,174,88,.04));
  color: var(--text);
  border-radius: 999px;
  padding: .68rem .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  text-decoration: none;
}
.nav a:hover, .btn:hover { border-color: var(--gold-2); transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, #ffe39a, #c58d28); color: #111; font-weight: 900; border-color: rgba(255,227,154,.55); }
.btn.danger { border-color: rgba(255,66,94,.55); background: rgba(255,66,94,.14); color: #ffdce2; }
.btn.ghost { background: rgba(255,255,255,.03); }
.btn.small { padding: .38rem .62rem; min-height: 31px; font-size: .84rem; }
.container { width: min(1160px, calc(100vw - 2rem)); margin: 0 auto; }
.hero { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 4rem 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.kicker { color: var(--gold-2); font-weight: 900; letter-spacing: .15em; text-transform: uppercase; font-size: .78rem; }
h1 { font-size: clamp(2.2rem, 6vw, 5rem); line-height: .95; margin: .6rem 0; letter-spacing: -.05em; }
.lead { color: #d8d5cd; font-size: 1.12rem; line-height: 1.65; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-card, .card, .auth-card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(25,25,29,.94), rgba(10,10,12,.94)); box-shadow: var(--shadow); border-radius: 28px; }
.hero-card { padding: 1rem; overflow: hidden; }
.logo-big { width: 100%; border-radius: 22px; display: block; background: #f5f0dd; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.6rem; }
.feature { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 1rem; }
.feature strong { color: var(--gold-2); display: block; margin-bottom: .3rem; }
.feature span { color: var(--muted); font-size: .93rem; }
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 2rem 0; }
.auth-card { width: min(480px, calc(100vw - 2rem)); padding: 1.4rem; }
.auth-card h1 { font-size: 2.2rem; }
.form-row { display: grid; gap: .35rem; margin: .9rem 0; }
label { font-weight: 800; color: #fff7de; }
input, textarea, select { width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(0,0,0,.34); color: var(--text); padding: .8rem .9rem; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216,174,88,.12); }
.help { color: var(--muted); font-size: .88rem; }
.alert { border: 1px solid rgba(255,66,94,.45); background: rgba(255,66,94,.12); color: #ffdfe5; padding: .8rem; border-radius: 14px; margin: .8rem 0; }
.success { border-color: rgba(38,208,124,.45); background: rgba(38,208,124,.12); color: #d7ffeb; }
.lobby-shell { padding: 1.3rem 0 2rem; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.2rem 0; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0; }
.room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1rem; }
.room-card { display: grid; gap: .6rem; }
.room-card h2 { margin: 0; font-size: 1.35rem; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.badge { border: 1px solid var(--line); color: var(--gold-2); background: rgba(216,174,88,.08); padding: .17rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 900; text-transform: lowercase; }
.badge.red { color: #ffdbe1; border-color: rgba(255,66,94,.45); background: rgba(255,66,94,.12); }
.badge.green { color: #d7ffeb; border-color: rgba(38,208,124,.45); background: rgba(38,208,124,.12); }

/* Classic GG room: Paltalk-style structure without copying Paltalk assets */
body[data-page="room"] { height: 100vh; overflow: hidden; background: #050506; font-size: 14px; }
body[data-page="room"] .classic-topbar {
  min-height: 58px; padding: .45rem .75rem; position: static;
  background: linear-gradient(#171717, #070707 56%, #000);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
body[data-page="room"] .brand-mark { width: 42px; height: 42px; border-radius: 6px; }
body[data-page="room"] .brand-title strong { color: #f6d371; font-size: 1.15rem; }
body[data-page="room"] .brand-title span { color: #cfc7b8; }
body[data-page="room"] .nav a, body[data-page="room"] .nav .btn { min-height: 34px; padding: .42rem .85rem; border-radius: 20px; }
.classic-room {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-rows: 26px 64px minmax(0, 1fr) 98px;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, #0a0a0b, #030303);
  color: #f9f5e8;
}
.classic-menubar {
  height: 26px; display: flex; align-items: center; gap: 1.2rem;
  padding: 0 .75rem; background: linear-gradient(#242424, #090909);
  border-bottom: 1px solid #333; color: #f3f3f3; font-size: .82rem; font-weight: 800;
  user-select: none;
}
.classic-menubar span:hover { color: var(--gold-2); }
.room-titlebar {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem;
  margin: 0; padding: .5rem .75rem;
  border-bottom: 1px solid rgba(216,174,88,.42);
  background: linear-gradient(90deg, rgba(216,174,88,.18), rgba(60,12,22,.16), rgba(0,0,0,.08));
}
.room-titlebar h1 { font-size: 1.25rem; margin: 0; letter-spacing: 0; }
.room-tab { color: #fff; font-size: .92rem; font-weight: 900; }
.room-tab strong { color: #f7d984; }
.room-topic { color: #eee5cd; font-size: .86rem; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-rows: 114px minmax(0, 1fr);
  grid-template-areas:
    "cams users"
    "chat users";
  gap: .45rem;
  padding: .45rem;
}
.panel {
  min-height: 0;
  border: 1px solid rgba(216,174,88,.42);
  background: #08080a;
  border-radius: 3px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.webcam-panel { grid-area: cams; }
.chat-panel { grid-area: chat; }
.users-panel { grid-area: users; }
.panel-head {
  min-height: 32px;
  padding: .38rem .55rem;
  border-bottom: 1px solid rgba(216,174,88,.34);
  background: linear-gradient(#1f1b16, #090909);
  color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.webcam-panel .panel-head { min-height: 30px; }
.cam-strip { padding: .45rem; overflow-x: auto; overflow-y: hidden; display: flex; gap: .48rem; align-items: stretch; }
.cam-card {
  width: 128px; min-width: 128px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px;
  background: linear-gradient(#15151a, #09090d); padding: .38rem; display: grid; gap: .24rem;
  color: #f7f2e4;
}
.cam-card strong { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-card .help { font-size: .68rem; line-height: 1.15; }
.cam-card video, .cam-placeholder {
  width: 100%; aspect-ratio: 4/3; border-radius: 3px; background: #000;
  display: grid; place-items: center; color: #cdd5ff; object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
}
.cam-live { box-shadow: inset 0 0 20px rgba(38,208,124,.17); }
.room-announcement {
  padding: .28rem .55rem; border-bottom: 1px solid #101010; background: #000; color: #f7e3a3;
  font-weight: 800; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-lines {
  flex: 1; min-height: 0; overflow: auto; padding: .55rem .65rem;
  display: flex; flex-direction: column; gap: .25rem;
  background: #f8f8f5; color: #111; font-family: Arial, Helvetica, sans-serif;
}
.chat-line { border-bottom: 1px solid rgba(0,0,0,.06); padding-bottom: .24rem; line-height: 1.3; overflow-wrap: anywhere; }
.chat-line .meta { font-size: .74rem; color: #777; margin-right: .35rem; }
.chat-line .nick { font-weight: 900; color: #0643a0; margin-right: .2rem; }
.chat-line.staff .nick, .chat-line.red-text { color: #d00019; font-weight: 900; }
.chat-line.system { color: #6b5100; font-style: italic; }
.chat-line.whisper { background: #fff0c9; border: 1px solid #e2bb57; border-radius: 4px; padding: .28rem .38rem; }
.composer { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 74px; gap: .38rem; padding: .42rem; background: linear-gradient(#ededed, #cacaca); border-top: 1px solid #a8a8a8; }
.composer input { background: #fff; color: #111; border-color: #aaa; border-radius: 4px; padding: .52rem; min-height: 36px; }
.composer .btn { border-radius: 4px; min-height: 36px; padding: .38rem .55rem; }
.red-toggle input { width: auto; margin: 0; }
.icon-btn { min-width: 42px; padding: .35rem !important; color: #111; background: #f2f2f2; }
.user-list { padding: .5rem; overflow: auto; display: grid; gap: .25rem; align-content: start; background: #09090c; }
.user-row {
  width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: .45rem;
  padding: .32rem .36rem; border-radius: 3px; border: 1px solid transparent; background: rgba(255,255,255,.035);
  color: #fff; text-align: left;
}
.user-row:hover, .user-row.active { border-color: var(--gold); background: rgba(216,174,88,.13); }
.user-row img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; background: #111; }
.user-name { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-sysop, .role-support { color: #ff3150 !important; }
.role-owner { color: #d6d6dc !important; }
.role-superadmin, .role-admin { color: #f7d984 !important; }
.role-badge { font-size: .66rem; padding: .08rem .28rem; border-radius: 99px; color: #d8c283; background: #17120a; border: 1px solid rgba(216,174,88,.28); }
.red-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; margin-left: .12rem; box-shadow: 0 0 10px rgba(255,49,80,.8); }
.room-footer {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, auto); gap: .45rem; padding: 0 .45rem .45rem;
  align-items: stretch; overflow: hidden;
}
.queue-panel, .admin-panel {
  border: 1px solid rgba(216,174,88,.42); background: #07070a; border-radius: 3px; padding: .45rem;
  display: flex; align-items: center; gap: .45rem; overflow: hidden;
}
.admin-panel { justify-content: flex-end; flex-wrap: wrap; overflow: auto; }
.queue-status { display: grid; gap: .25rem; min-width: 0; }
.queue-list { display: flex; gap: .32rem; align-items: center; min-width: 0; color: #fff; }
.queue-pill { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 99px; padding: .24rem .45rem; white-space: nowrap; font-size: .8rem; }
.queue-pill.live { color: #d7ffeb; border-color: rgba(38,208,124,.35); }
.big-talk { min-width: 136px; min-height: 54px; font-size: .98rem; border-radius: 28px !important; }
.talk-hold { min-width: 118px; min-height: 54px; border-radius: 28px !important; }
.talk-hold.talking { background: linear-gradient(#ff5971, #b00024); border-color: #ff9aac; color: #fff; box-shadow: 0 0 22px rgba(255,49,80,.35); }
.selected-user { min-width: 116px; color: #dcd7cd; }
.drawer { position: fixed; right: 1rem; bottom: 1rem; width: min(620px, calc(100vw - 2rem)); max-height: min(70vh, 650px); overflow: auto; border: 1px solid var(--line); background: #111114; border-radius: 8px; box-shadow: var(--shadow); padding: 1rem; z-index: 50; display: none; }
.drawer.open { display: block; }
.audit-lines { background: #050506; border-radius: 6px; padding: .8rem; color: #d8d8df; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; white-space: pre-wrap; }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: 1fr; }
  body[data-page="room"] { height: auto; overflow: auto; }
  .classic-room { height: auto; min-height: calc(100vh - 58px); grid-template-rows: auto auto auto auto; }
  .room-main { grid-template-columns: 1fr; grid-template-rows: auto minmax(420px, 58vh) auto; grid-template-areas: "cams" "chat" "users"; }
  .users-panel { min-height: 240px; }
  .room-footer { grid-template-columns: 1fr; overflow: visible; }
  .admin-panel { justify-content: flex-start; }
  .mobile-only { display: inline-flex; }
}
@media (max-width: 640px) {
  .gg-topbar { align-items: flex-start; flex-direction: column; position: relative; }
  .nav { width: 100%; }
  .nav a, .nav .btn { flex: 1; }
  .page-head { flex-direction: column; align-items: stretch; }
  .room-titlebar { grid-template-columns: 1fr; }
  .classic-menubar { overflow-x: auto; gap: .85rem; }
  .composer { grid-template-columns: 38px 1fr; }
  .composer .red-toggle, .composer .primary { grid-column: span 1; }
  .queue-panel { flex-wrap: wrap; }
}

/* ===== Paltalk-inspired Classic Room V4 ===== */
body[data-page="room"] {
  height: 100vh;
  overflow: hidden;
  background: #6d6d6d;
  color: #111;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 12px;
}
body[data-page="room"] .classic-topbar {
  min-height: 48px;
  padding: .28rem .55rem;
  position: static;
  background: linear-gradient(#171717, #080808 58%, #010101);
  border-bottom: 1px solid #2f2f2f;
}
body[data-page="room"] .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border-color: rgba(255,255,255,.1);
  box-shadow: none;
}
body[data-page="room"] .brand-title strong { color: #f4d57f; font-size: 1rem; }
body[data-page="room"] .brand-title span { color: #d5d5d5; font-size: .74rem; }
body[data-page="room"] .classic-nav a,
body[data-page="room"] .classic-nav .btn {
  min-height: 28px;
  padding: .28rem .7rem;
  border-radius: 18px;
  background: linear-gradient(#2d2d2d, #0f0f0f);
  border-color: #625130;
  color: #f2f2f2;
  box-shadow: inset 0 1px rgba(255,255,255,.12);
}
.paltalk-room {
  height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: 24px minmax(0,1fr);
  background: #7c7c7c;
}
.classic-menubar {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0 .55rem;
  background: linear-gradient(#f3f3f3, #d5d5d5);
  color: #111;
  border-top: 1px solid #f7f7f7;
  border-bottom: 1px solid #939393;
  font-size: 12px;
  font-weight: 400;
}
.classic-menubar span:hover { color: #003f8f; }
.window-frame {
  min-height: 0;
  display: grid;
  grid-template-rows: 56px minmax(0,1fr) 86px;
  border-top: 1px solid #ebebeb;
  background: #b7b7b7;
}
.meta-toolbar {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto auto;
  gap: .5rem;
  align-items: center;
  padding: .25rem .4rem;
  border-bottom: 1px solid #8d8d8d;
  background: linear-gradient(#4b6179, #25374a 44%, #0e1216 45%, #151515 100%);
  color: #fff;
}
.room-stamp {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-weight: 700; line-height: 1.05;
  text-align: center; color: #1c1c1c;
  background: linear-gradient(#d9d9d9, #9b9b9b);
  border: 1px solid #6b6b6b;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.65);
}
.room-heading { min-width: 0; }
.room-heading-top strong { font-size: 14px; color: #f9f9f9; }
.room-topic {
  margin-top: .18rem;
  font-size: 11px;
  color: #efefef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-links {
  margin-top: .18rem;
  font-size: 11px;
  color: #dbe5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar-link { color: #dbe5ff; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.toolbar-link:hover { text-decoration: underline; }
.toolbar-sep { color: #c2cada; margin: 0 .2rem; }
.mute-link { opacity: .95; }
.meta-badges {
  display: flex;
  align-items: center;
  gap: .35rem;
}
body[data-page="room"] .badge {
  background: linear-gradient(#f3e1a0, #c8a64f);
  color: #2b220e;
  border: 1px solid #85672a;
  border-radius: 12px;
  font-size: 11px;
  text-transform: none;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.4);
}
body[data-page="room"] .badge.green {
  background: linear-gradient(#a0efad, #41a85a);
  color: #0e2c14;
  border-color: #2a6b39;
}
.chrome-btn {
  border: 1px solid #7d7d7d;
  border-right-color: #4a4a4a;
  border-bottom-color: #4a4a4a;
  background: linear-gradient(#f1f1f1, #cfcfcf);
  color: #111;
  border-radius: 4px;
  min-height: 26px;
  padding: .28rem .65rem;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 12px;
}
.chrome-btn:hover { background: linear-gradient(#fbfbfb, #d7d7d7); transform: none; }
.chrome-btn.strong { font-weight: 700; }
.chrome-btn.small { min-height: 24px; padding: .2rem .48rem; font-size: 11px; }
.chrome-btn.danger {
  background: linear-gradient(#ffd6d8, #e89ca2);
  border-color: #ad6b72;
  color: #4b0e14;
}
.room-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 60px minmax(0,1fr) 190px;
  gap: 0;
  padding: .28rem;
  background: #b8b8b8;
}
.left-rail {
  border: 1px solid #7b7b7b;
  border-right: 0;
  background: linear-gradient(#d8d8d8, #b3b3b3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: .35rem .25rem;
  gap: .35rem;
}
.rail-btn {
  min-height: 56px;
  border: 1px solid #7d7d7d;
  border-right-color: #4a4a4a;
  border-bottom-color: #4a4a4a;
  background: linear-gradient(#f6f6f6, #cecece);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #1f1f1f;
}
.room-stage {
  min-height: 0;
  border: 1px solid #7b7b7b;
  background: #d3d3d3;
  display: grid;
  grid-template-rows: 96px 24px minmax(0,1fr) 34px;
}
.cam-toolbar {
  overflow: hidden;
  border-bottom: 1px solid #979797;
  background: linear-gradient(#e0e0e0, #c9c9c9);
}
.cam-strip {
  height: 100%;
  padding: .32rem;
  display: flex;
  gap: .34rem;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
}
.cam-card {
  width: 112px;
  min-width: 112px;
  border: 1px solid #878787;
  background: linear-gradient(#efefef, #d1d1d1);
  padding: .18rem;
  display: grid;
  gap: .12rem;
  color: #111;
  border-radius: 2px;
}
.cam-card strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cam-card .help { color: #444; font-size: 10px; line-height: 1.1; }
.cam-card video,
.cam-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #7b8795;
  color: #fff;
  display: grid;
  place-items: center;
  border: 1px solid #666;
  border-radius: 2px;
  object-fit: cover;
}
.room-announcement {
  padding: .22rem .45rem;
  background: #0f4585;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  border-bottom: 1px solid #15345c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-lines {
  background: #fff;
  color: #111;
  border-top: 1px solid #fff;
  padding: .45rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .18rem;
  overflow: auto;
  font-family: Arial, Helvetica, sans-serif;
}
.chat-line { line-height: 1.25; padding-bottom: .08rem; }
.chat-line .meta { font-size: 10px; color: #6f6f6f; margin-right: .25rem; }
.chat-line .nick { font-weight: 700; color: #0049a8; margin-right: .2rem; }
.chat-line.staff .nick,
.chat-line.red-text { color: #d10020; }
.chat-line.system { color: #4e4e4e; font-style: italic; }
.chat-line.whisper {
  background: #fff5c8;
  border: 1px solid #d9bb55;
  padding: .22rem .28rem;
}
.composer {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) 52px 56px;
  gap: .25rem;
  padding: .25rem;
  background: linear-gradient(#dfdfdf, #c4c4c4);
  border-top: 1px solid #959595;
}
.composer input {
  min-height: 26px;
  border: 1px solid #8b8b8b;
  border-right-color: #5f5f5f;
  border-bottom-color: #5f5f5f;
  border-radius: 2px;
  background: #fff;
  color: #111;
  padding: .35rem .4rem;
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.03);
}
.icon-smile,
.send-btn,
.red-toggle {
  border: 1px solid #7d7d7d;
  border-right-color: #4a4a4a;
  border-bottom-color: #4a4a4a;
  background: linear-gradient(#f1f1f1, #cfcfcf);
  border-radius: 2px;
  color: #111;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7);
}
.icon-smile { min-width: 28px; }
.red-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  font-size: 11px;
}
.red-toggle input { width: auto; margin: 0; }
.send-btn { font-weight: 700; }
.users-panel {
  min-height: 0;
  border: 1px solid #7b7b7b;
  border-left: 0;
  background: #d8d8d8;
}
.users-panel .panel-head {
  min-height: 24px;
  padding: .22rem .42rem;
  background: linear-gradient(#ececec, #cbcbcb);
  border-bottom: 1px solid #979797;
  color: #111;
  font-weight: 700;
}
.user-list {
  padding: .2rem;
  overflow: auto;
  display: grid;
  gap: .08rem;
  align-content: start;
  background: #efefef;
}
.user-row {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  gap: .3rem;
  align-items: center;
  min-height: 24px;
  padding: .18rem .2rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #111;
}
.user-row:hover,
.user-row.active {
  border-color: #96b7de;
  background: #dcecff;
}
.user-row img { width: 22px; height: 22px; border-radius: 2px; background: #bcbcbc; }
.user-name { font-weight: 700; }
.role-sysop, .role-support { color: #cf0026 !important; }
.role-owner { color: #4e4e4e !important; }
.role-superadmin, .role-admin { color: #8b5b03 !important; }
.role-badge {
  font-size: 10px;
  padding: .05rem .2rem;
  border-radius: 2px;
  border: 1px solid #c2b48d;
  background: #fff5d3;
  color: #684607;
}
.red-dot {
  width: 7px;
  height: 7px;
  background: #d70023;
  box-shadow: none;
}
.status-toolbar {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(320px, auto);
  gap: .28rem;
  padding: .28rem;
  background: #b8b8b8;
}
.talk-toolbar,
.admin-panel {
  border: 1px solid #7b7b7b;
  background: linear-gradient(#dcdcdc, #bcbcbc);
  padding: .3rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  overflow: hidden;
}
.talk-toolbar { min-width: 0; }
.admin-panel { justify-content: flex-end; flex-wrap: wrap; overflow: auto; }
.ptt-btn.talking,
.talk-hold.talking {
  background: linear-gradient(#ff8e9c, #d94760) !important;
  border-color: #b14858 !important;
  color: #34070e !important;
}
.queue-status {
  display: grid;
  gap: .1rem;
  min-width: 0;
  margin-left: .2rem;
}
.queue-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem;
  color: #222;
  min-width: 0;
  font-size: 11px;
}
.queue-pill {
  background: #fff;
  border: 1px solid #9c9c9c;
  border-radius: 2px;
  padding: .08rem .26rem;
  color: #111;
}
.queue-pill.live {
  background: #e8fff0;
  border-color: #78b58c;
  color: #0e5522;
}
.selected-user { min-width: 130px; color: #333; font-size: 11px; }
.drawer {
  border-radius: 4px;
  background: #efefef;
  color: #111;
}
.audit-lines {
  background: #fff;
  color: #111;
  border: 1px solid #bebebe;
}
@media (max-width: 1100px) {
  body[data-page="room"] { height: auto; overflow: auto; }
  .paltalk-room { height: auto; min-height: calc(100vh - 48px); }
  .window-frame { grid-template-rows: auto auto auto; }
  .meta-toolbar { grid-template-columns: 48px 1fr; }
  .meta-badges, .meta-actions { grid-column: span 2; }
  .room-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(380px, 55vh) auto;
  }
  .left-rail {
    border-right: 1px solid #7b7b7b;
    flex-direction: row;
  }
  .users-panel { border-left: 1px solid #7b7b7b; }
  .status-toolbar { grid-template-columns: 1fr; }
  .talk-toolbar, .admin-panel { overflow: auto; }
}
@media (max-width: 640px) {
  .classic-menubar { overflow-x: auto; gap: .8rem; }
  .composer { grid-template-columns: 28px 1fr 48px 52px; }
  .room-stage { grid-template-rows: 88px 24px minmax(280px,1fr) 34px; }
  body[data-page="room"] .classic-nav { width: 100%; }
  body[data-page="room"] .classic-nav a,
  body[data-page="room"] .classic-nav .btn { flex: 1; }
}

/* ===== GG Chat V5 layout repair / responsive fix ===== */
body[data-page="room"] .window-frame {
  min-height: 0;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 84px;
}
body[data-page="room"] .room-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 190px;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: none;
  gap: 6px;
  padding: 6px;
  background: #b8b8b8;
}
body[data-page="room"] .left-rail {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
}
body[data-page="room"] .room-stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 92px 24px minmax(0, 1fr) 34px;
}
body[data-page="room"] .users-panel {
  grid-area: auto !important;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  border-left: 1px solid #7b7b7b;
}
body[data-page="room"] .cam-toolbar,
body[data-page="room"] .cam-strip,
body[data-page="room"] .chat-lines,
body[data-page="room"] .user-list {
  min-height: 0;
}
body[data-page="room"] .chat-lines {
  overflow: auto;
}
body[data-page="room"] .user-list {
  overflow: auto;
}
body[data-page="room"] .composer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 56px 56px;
  gap: 4px;
  align-items: center;
  padding: 4px;
}
body[data-page="room"] .composer input,
body[data-page="room"] #chatInput {
  width: 100%;
  min-width: 0;
}
body[data-page="room"] .icon-smile,
body[data-page="room"] .send-btn,
body[data-page="room"] .red-toggle {
  min-height: 24px;
}
body[data-page="room"] .status-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 0 6px 6px;
  background: #b8b8b8;
}
body[data-page="room"] .talk-toolbar {
  min-width: 0;
  flex-wrap: wrap;
}
body[data-page="room"] .queue-status {
  flex: 1 1 220px;
  min-width: 160px;
}
body[data-page="room"] .admin-panel {
  min-width: 320px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
body[data-page="room"] .selected-user {
  flex: 0 0 auto;
  margin-right: 2px;
}
body[data-page="room"] .chat-line {
  overflow-wrap: anywhere;
}
body[data-page="room"] .room-topic,
body[data-page="room"] .room-links,
body[data-page="room"] .room-announcement {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  body[data-page="room"] .status-toolbar {
    grid-template-columns: 1fr;
  }
  body[data-page="room"] .admin-panel {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  body[data-page="room"] {
    height: auto;
    overflow: auto;
  }
  body[data-page="room"] .paltalk-room {
    height: auto;
    min-height: calc(100vh - 48px);
  }
  body[data-page="room"] .window-frame {
    grid-template-rows: auto auto auto;
  }
  body[data-page="room"] .meta-toolbar {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  body[data-page="room"] .meta-badges,
  body[data-page="room"] .meta-actions {
    grid-column: 1 / -1;
  }
  body[data-page="room"] .room-main {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: minmax(360px, 58vh) 220px;
  }
  body[data-page="room"] .left-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  body[data-page="room"] .room-stage {
    grid-column: 2;
    grid-row: 1;
  }
  body[data-page="room"] .users-panel {
    grid-column: 2;
    grid-row: 2;
    border-left: 1px solid #7b7b7b;
  }
}

@media (max-width: 640px) {
  body[data-page="room"] .gg-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  body[data-page="room"] .classic-nav {
    width: 100%;
  }
  body[data-page="room"] .classic-nav a,
  body[data-page="room"] .classic-nav .btn {
    flex: 1 1 auto;
  }
  body[data-page="room"] .room-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(320px, 48vh) 220px;
  }
  body[data-page="room"] .left-rail {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    border-right: 1px solid #7b7b7b;
  }
  body[data-page="room"] .room-stage {
    grid-column: 1;
    grid-row: 2;
  }
  body[data-page="room"] .users-panel {
    grid-column: 1;
    grid-row: 3;
  }
  body[data-page="room"] .composer {
    grid-template-columns: 28px minmax(0,1fr) 52px 52px;
  }
  body[data-page="room"] .talk-toolbar,
  body[data-page="room"] .admin-panel {
    overflow: auto;
  }
}


/* ===== GG Chat V6 classic controls: Ctrl PTT, lock mic, smileys, chat colours ===== */
body[data-page="room"] .meta-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
body[data-page="room"] .smiley-popover {
  position: absolute;
  left: 82px;
  bottom: 122px;
  z-index: 30;
  max-width: 340px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid #777;
  background: linear-gradient(#f7f7f7, #d1d1d1);
  box-shadow: 2px 2px 7px rgba(0,0,0,.35);
}
body[data-page="room"] .smiley-popover[hidden] {
  display: none;
}
body[data-page="room"] .smiley-popover button {
  width: 34px;
  height: 30px;
  border: 1px solid #8a8a8a;
  border-right-color: #4f4f4f;
  border-bottom-color: #4f4f4f;
  background: #fff;
  border-radius: 2px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
body[data-page="room"] .smiley-popover button:hover {
  background: #dcecff;
}
.gg-emo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  transform: translateY(1px);
  font-size: 1.15em;
}
body[data-page="room"] #lockMicBtn.locked,
body[data-page="room"] .chrome-btn.locked {
  background: linear-gradient(#ffed9c, #e4b437);
  border-color: #8d6b16;
  color: #1e1500;
  font-weight: 700;
}
body[data-page="room"] .ptt-btn.talking,
body[data-page="room"] #pushTalkBtn.talking {
  background: linear-gradient(#8ff0a3, #3cae52) !important;
  border-color: #2c7739 !important;
  color: #092b10 !important;
  font-weight: 700;
}
.chat-settings-drawer .settings-grid {
  display: grid;
  gap: 12px;
}
.chat-settings-drawer input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 4px;
  background: #fff;
  border-radius: 6px;
}
.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.palette-chip {
  width: 28px;
  height: 28px;
  border: 1px solid #777;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.4);
}
.msg-text {
  font-weight: 400;
}
body[data-page="room"] .chat-line.red-text .msg-text {
  color: #d10020 !important;
  font-weight: 700;
}
@media (max-width: 640px) {
  body[data-page="room"] .smiley-popover {
    left: 12px;
    right: 12px;
    bottom: 180px;
    max-width: none;
  }
}


/* ===== GG Chat V7 contrast fix for classic settings drawer ===== */
body[data-page="room"] .drawer,
body[data-page="room"] .chat-settings-drawer {
  background: #eeeeee !important;
  color: #111111 !important;
  border: 1px solid #8b8b8b !important;
}

body[data-page="room"] .chat-settings-drawer .page-head,
body[data-page="room"] .chat-settings-drawer .settings-grid,
body[data-page="room"] .chat-settings-drawer .form-row,
body[data-page="room"] .chat-settings-drawer p,
body[data-page="room"] .chat-settings-drawer .help {
  color: #111111 !important;
}

body[data-page="room"] .chat-settings-drawer h1,
body[data-page="room"] .chat-settings-drawer h2,
body[data-page="room"] .chat-settings-drawer h3 {
  color: #0b2d66 !important;
  background: transparent !important;
  text-shadow: none !important;
}

body[data-page="room"] .chat-settings-drawer .kicker {
  color: #8a5b00 !important;
  background: transparent !important;
  text-shadow: none !important;
}

body[data-page="room"] .chat-settings-drawer label,
body[data-page="room"] .chat-settings-drawer .form-row label {
  color: #111111 !important;
  background: transparent !important;
  font-weight: 700 !important;
}

body[data-page="room"] .chat-settings-drawer .help {
  color: #333333 !important;
  background: transparent !important;
}

body[data-page="room"] .chat-settings-drawer input[type="color"] {
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid #bcbcbc !important;
}

body[data-page="room"] .chat-settings-drawer .btn,
body[data-page="room"] .chat-settings-drawer button {
  color: #111111 !important;
}

body[data-page="room"] .chat-settings-drawer .btn.primary {
  color: #111111 !important;
  background: linear-gradient(#ffe9a6, #d7a83c) !important;
  border-color: #b88620 !important;
  font-weight: 800 !important;
}

body[data-page="room"] .chat-settings-drawer #closeChatSettings {
  color: #111111 !important;
  background: linear-gradient(#ffffff, #dcdcdc) !important;
  border: 1px solid #999999 !important;
}

body[data-page="room"] .chat-settings-drawer .palette-chip {
  border: 2px solid #555555 !important;
}

body[data-page="room"] .chat-settings-drawer .palette-chip:focus,
body[data-page="room"] .chat-settings-drawer .palette-chip:hover {
  outline: 2px solid #0b5bd3 !important;
  outline-offset: 2px;
}

/* Make any selected/highlighted settings text still readable */
body[data-page="room"] .chat-settings-drawer ::selection {
  background: #0b5bd3;
  color: #ffffff;
}
