:root {
  --bg: #08090d;
  --surface: #121721;
  --surface-strong: #191f2b;
  --border: #2a3140;
  --text: #f5f7fb;
  --muted: #9ba4b5;
  --accent: #ff4d5f;
  --accent-strong: #d93649;
  --accent-soft: rgba(255, 77, 95, 0.16);
  --ok: #38d996;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 77, 95, 0.18), transparent 30rem),
    linear-gradient(135deg, #08090d 0%, #141721 52%, #07080b 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.room-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    radial-gradient(ellipse at 50% 100%, rgba(255, 50, 70, 0.1), transparent 50%),
    url("assets/img/conference-prototype.png") center / cover no-repeat,
    #080a12;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel,
.stage-header,
.control-bar {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 23, 33, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  border-radius: 8px;
  padding: 18px;
}

.primary-button,
.secondary-button,
.primary-link,
.control-button,
.invite-box button,
.chat-form button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-strong);
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-button,
.primary-link {
  display: inline-grid;
  place-items: center;
  border-color: #b00c0c;
  background: linear-gradient(180deg, #ed1b1b, #b90008);
  box-shadow: 0 10px 26px rgba(255, 0, 0, 0.25);
}

/* Join buttons — HeroLink blue */
.primary-join-button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(0, 135, 255, 0.62);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: linear-gradient(180deg, #1671d9, #0748a7);
  box-shadow: 0 10px 26px rgba(0, 105, 255, 0.24);
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-join-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 150, 255, 0.8);
}

.secondary-button {
  padding: 0 12px;
}

.danger-button {
  border-color: rgba(255, 77, 95, 0.45);
  color: #ffd8de;
}

.danger-confirm-button {
  min-height: 44px;
  border: 1px solid rgba(237, 27, 27, 0.72);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(180deg, #ed1b1b, #a51f32);
  font-weight: 900;
}

.danger-confirm-button:hover {
  border-color: rgba(255, 60, 60, 0.85);
  background: linear-gradient(180deg, #ff2c2c, #bd273c);
}

.primary-button:hover,
.primary-link:hover,
.primary-join-button:hover,
.secondary-button:hover,
.control-button:hover,
.invite-box button:hover,
.chat-form button:hover {
  transform: translateY(-1px);
  border-color: rgba(237, 27, 27, 0.66);
}

input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #090d14;
}

input:focus {
  outline: 2px solid rgba(255, 77, 95, 0.34);
  outline-offset: 2px;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.empty-state,
.form-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-note:not(:empty) {
  color: #ffb3bd;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.icon-label > i {
  flex: 0 0 auto;
  color: inherit;
  font-size: 0.9em;
}

h2.icon-label,
label.icon-label,
.eyebrow.icon-label {
  justify-content: flex-start;
}

/* Lobby */
.lobby-page {
  overflow-y: auto;
}

.lobby-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.lobby-header {
  max-width: 760px;
  margin-bottom: 28px;
}

.lobby-header p:last-child {
  max-width: 42rem;
  margin: 14px 0 0;
  color: #c3cad8;
  font-size: 1.12rem;
  line-height: 1.5;
}

.lobby-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.lobby-card {
  display: grid;
  gap: 12px;
}

.recent-panel {
  min-height: 180px;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.recent-room {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.recent-room-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 8px;
  text-decoration: none;
}

.recent-room-copy {
  min-width: 0;
}

.recent-room strong,
.recent-room small {
  display: block;
}

.recent-room strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-room small,
.recent-room-code {
  color: var(--muted);
  font-size: 0.84rem;
}

.recent-room-code {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 7px;
  color: #dfe5f1;
  background: rgba(0, 0, 0, 0.2);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.recent-room:hover,
.recent-room:focus-within {
  border-color: rgba(255, 77, 95, 0.52);
  background: rgba(255, 77, 95, 0.08);
}

.recent-room-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 10px 10px;
}

.recent-room-actions button {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.72rem;
  font-weight: 850;
}

.recent-room-actions button:hover {
  border-color: rgba(255, 77, 95, 0.58);
  color: var(--text);
}

/* Room */
.watch-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 18px;
  margin-left: 126px;
  --room-backdrop-image: none;
  background-color: #050608;
  background-image: var(--room-backdrop-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.watch-room.has-room-backdrop::before {
  content: "";
  position: fixed;
  inset: 126px 0 0 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.55) 0%, rgba(5, 6, 8, 0.4) 40%, rgba(5, 6, 8, 0.7) 100%),
    radial-gradient(ellipse at 50% 50%, rgba(5, 6, 8, 0.15) 0%, rgba(5, 6, 8, 0.55) 100%);
}

.watch-room.has-room-backdrop > * {
  position: relative;
  z-index: 1;
}

.stage,
.sidebar {
  min-width: 0;
  min-height: 0;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto auto;
  gap: 16px;
  overflow: hidden;
  position: relative;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 18px 22px;
  border-radius: 8px;
}

.stage-header h1 {
  font-size: clamp(1.55rem, 3vw, 3rem);
}

.room-code {
  display: inline-block;
  margin-top: 9px;
  margin-right: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.signed-in-label {
  color: #cfd6e4;
}

.live-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 77, 95, 0.45);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffe2e6;
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.connection-pill[data-status="connected"] {
  border-color: rgba(56, 217, 150, 0.45);
  color: #dfffee;
  background: rgba(56, 217, 150, 0.13);
}

.connection-pill[data-status="reconnecting"] {
  border-color: rgba(255, 185, 80, 0.5);
  color: #ffe9c1;
  background: rgba(255, 185, 80, 0.13);
}

.connection-pill[data-status="offline"] {
  border-color: rgba(255, 77, 95, 0.58);
  color: #ffe2e6;
  background: var(--accent-soft);
}

.video-shell {
  position: relative;
  display: grid;
  min-height: 0;
  height: 100%;
  border: 1px solid #242b39;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #05070a;
  background-size: 44px 44px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
}

.video-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 100%;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(255, 77, 95, 0.12), transparent 34%);
}

.video-placeholder[hidden],
.screen-preview[hidden] {
  display: none;
}

.screen-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #020306;
  object-fit: contain;
}

.video-placeholder p {
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--muted);
}

.participant-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.participant-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.audio-enable-button {
  min-height: 30px;
  border: 1px solid rgba(255, 185, 80, 0.5);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffe9c1;
  background: rgba(255, 185, 80, 0.13);
  font-size: 0.75rem;
  font-weight: 850;
}

.participant-strip {
  display: flex;
  gap: 10px;
  min-width: 0;
  min-height: 112px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 1px 1px 5px;
}

.participant-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 106px;
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.participant-tile {
  position: relative;
  flex: 0 0 180px;
  height: 106px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #090d14;
}

.participant-badge-host {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffd966;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.72rem;
}

.participant-tile.is-offline {
  opacity: 0.58;
}

.participant-tile video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020306;
  object-fit: cover;
}

.participant-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff4f6;
  background: #141923;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 2rem;
  font-weight: 900;
  overflow: hidden;
}

.participant-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(3, 5, 8, 0.82);
  font-size: 0.72rem;
  font-weight: 850;
}

.participant-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-meta strong {
  flex: 0 0 auto;
  color: #ffbac3;
  font-size: 0.68rem;
}

.device-status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 7px 11px;
  color: #c9d1df;
  background: rgba(5, 7, 10, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.screen-share-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: min(520px, calc(100% - 32px));
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 7px 11px;
  color: #ffe2e6;
  background: rgba(5, 7, 10, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.screen-reconnect-button {
  position: absolute;
  left: 50%;
  bottom: 56px;
  z-index: 3;
  min-height: 40px;
  border: 1px solid rgba(255, 77, 95, 0.62);
  border-radius: 8px;
  padding: 0 14px;
  color: #ffe2e6;
  background: rgba(18, 23, 33, 0.94);
  font-weight: 850;
  transform: translateX(-50%);
}

.screen-reconnect-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.control-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
}

.control-button.is-active {
  border-color: rgba(237, 27, 27, 0.78);
  background: rgba(237, 27, 27, 0.16);
  color: #ffe2e6;
}

.leave-button {
  border-color: rgba(237, 27, 27, 0.45);
  color: #ffd8de;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.room-panel,
.members-panel,
.connection-lab {
  flex: 0 0 auto;
}

.invite-label {
  display: block;
  margin-bottom: 8px;
}

.invite-box,
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.collapse-button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
  font-weight: 900;
}

.collapse-button::after {
  content: " -";
}

.members-panel.is-collapsed .collapse-button::after {
  content: " +";
}

.member-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.members-panel.is-collapsed .member-list {
  display: none;
}

.connection-lab-body {
  display: grid;
  gap: 12px;
}

.signal-stats {
  display: grid;
  gap: 7px;
  margin: 0;
}

.signal-stats div {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 10px;
}

.signal-stats dt,
.signal-stats dd {
  margin: 0;
  font-size: 0.78rem;
}

.signal-stats dt {
  color: var(--muted);
  font-weight: 800;
}

.signal-stats dd {
  min-width: 0;
  overflow: hidden;
  color: #dfe5f1;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-log {
  display: grid;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.signal-log p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.member-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #dfe5f1;
}

.member-list strong {
  color: var(--accent);
  font-size: 0.75rem;
}

.member-list .is-demo strong {
  color: var(--muted);
}

.member-list .is-online strong {
  color: var(--ok);
}

.member-list .is-offline {
  color: var(--muted);
}

.member-list .member-empty {
  display: block;
  min-height: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff4f6;
  background: linear-gradient(135deg, var(--accent), #991f32);
  font-size: 0.8rem;
  font-weight: 900;
  overflow: hidden;
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-panel {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.chat-window {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 60, 50, 0.55) rgba(10, 12, 18, 0.4);
}

.chat-window::-webkit-scrollbar {
  width: 8px;
}

.chat-window::-webkit-scrollbar-track {
  background: rgba(10, 12, 18, 0.4);
  border-radius: 4px;
}

.chat-window::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(200, 70, 60, 0.55), rgba(140, 40, 35, 0.55));
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  transition: background 150ms ease;
}

.chat-window::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(230, 90, 70, 0.75), rgba(170, 50, 40, 0.7));
}

.chat-empty {
  margin: auto 0;
  text-align: center;
}

.chat-empty[hidden] {
  display: none;
}

.message {
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
}

.message + .message {
  margin-top: 8px;
}

.system-message {
  border: 0;
  border-radius: 0;
  padding: 4px 0 2px;
  background: transparent;
  opacity: 0.62;
  transition: opacity 150ms ease;
}

.system-message:hover {
  opacity: 0.95;
}

.system-message p {
  margin: 0;
  color: #c2906a;
  font-size: 0.82rem;
  line-height: 1.4;
  font-style: italic;
}

.system-message strong {
  color: #b86a3a;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-message time {
  color: #7a6a5e;
  font-size: 0.7rem;
  font-weight: 600;
}

.system-message .message-type-icon {
  color: #b86a3a;
  font-size: 0.68rem;
}

.system-message-temporary {
  max-height: 60px;
  overflow: hidden;
  transition:
    opacity 400ms ease,
    max-height 400ms ease,
    margin-top 400ms ease,
    margin-bottom 400ms ease,
    padding-top 400ms ease,
    padding-bottom 400ms ease;
}

.system-message-fading {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #991f32);
  color: #fff4f6;
  font-size: 0.72rem;
  font-weight: 900;
  overflow: hidden;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.message header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.message-type-icon {
  color: var(--muted);
  font-size: 0.72rem;
}

.system-message .message-type-icon {
  color: var(--accent);
}

.message strong {
  color: #ffffff;
  font-size: 0.84rem;
}

.message time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.message p {
  margin-bottom: 0;
  color: #c7cedb;
  font-size: 0.92rem;
  line-height: 1.45;
}

.chat-form {
  margin-top: 12px;
}

/* Error */
.error-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px;
}

.error-card {
  width: min(560px, 100%);
}

.error-card p {
  color: #c3cad8;
  line-height: 1.5;
}

.identity-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(16px);
}

.identity-card {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
}

.identity-card h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.identity-card p {
  color: #c3cad8;
  line-height: 1.5;
}

.identity-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #5a6270;
  font-size: 0.85rem;
  margin: 4px 0;
}

.identity-divider::before,
.identity-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2a2f3a;
}

.identity-alt-actions {
  display: flex;
  gap: 8px;
}

.identity-alt-actions .secondary-button {
  flex: 1;
}

.link-button {
  background: none;
  border: none;
  color: #7a8ba8;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: #a0b8d8;
}

.delete-confirm-card {
  width: min(500px, 100%);
}

.delete-confirm-card .eyebrow {
  color: #ff8b98;
}

@media (max-width: 980px) {
  .lobby-actions {
    grid-template-columns: 1fr;
  }

  .account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .watch-room {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(260px, 42vh);
    margin-left: 0;
  }

  .stage {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 620px) {
  .lobby-shell {
    width: min(100% - 20px, 1120px);
    padding: 28px 0;
  }

  .recent-room-link {
    gap: 10px;
    padding-inline: 11px;
  }

  .recent-room-actions {
    padding-inline: 8px;
  }

  .watch-room {
    grid-template-rows: minmax(0, 1fr) minmax(230px, 42vh);
    gap: 10px;
    padding: 10px;
    margin-left: 0;
  }

  .stage {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 10px;
  }

  .stage-header,
  .control-bar,
  .panel {
    padding: 12px;
  }

  .stage-header {
    min-height: 78px;
  }

  .participant-strip {
    min-height: 96px;
  }

  .participant-tile {
    flex-basis: 150px;
    height: 90px;
  }

  .device-status {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .screen-share-status {
    left: 10px;
    bottom: 44px;
    max-width: calc(100% - 20px);
  }

  .screen-reconnect-button {
    bottom: 82px;
    max-width: calc(100% - 20px);
  }

  .control-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invite-box,
  .chat-form {
    grid-template-columns: 1fr;
  }
}

/* App shell: viewer and chat are the only layout-sized room regions. */
.watch-room {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  margin-left: 126px;
}

.room-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 10px 7px 14px;
  background: rgba(18, 23, 33, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

/* Top bar */
.room-identity {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.room-identity h1 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-identity .room-code,
.room-identity .signed-in-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.topbar-button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  font-weight: 850;
}

.topbar-button:hover,
.topbar-button[aria-expanded="true"] {
  border-color: rgba(255, 77, 95, 0.62);
  background: var(--accent-soft);
}

.delete-room-topbar {
  border-color: rgba(237, 27, 27, 0.42);
  color: #ffd8de;
}

.room-topbar .live-pill {
  padding: 6px 9px;
  font-size: 0.74rem;
}

/* Viewer */
.stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.video-shell {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.video-shell > .screen-pane {
  flex: 1;
  min-height: 0;
}



.screen-preview {
  object-fit: contain;
}

.screen-share-status {
  bottom: 12px;
  left: 12px;
}

.device-status {
  right: 12px;
  bottom: 12px;
}

/* Chat */
.sidebar {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-panel {
  height: 100%;
  padding: 14px;
}

.chat-panel .panel-heading {
  flex: 0 0 auto;
}

.chat-window {
  min-height: 0;
  overflow-y: auto;
}

.chat-form {
  flex: 0 0 auto;
}

/* Floating controls */
.floating-controls {
  position: absolute;
  z-index: 8;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 10px 18px;
  background: rgba(6, 8, 14, 0.88);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 77, 95, 0.05);
  backdrop-filter: blur(18px);
}

/* Control button - large beveled/glass style */
.floating-controls .control-button {
  position: relative;
  min-width: 112px;
  min-height: 46px;
  border: 1px solid rgba(255, 77, 95, 0.3);
  border-radius: 9px;
  padding: 0 14px;
  color: #f5f7fb;
  background: linear-gradient(150deg, rgba(18, 22, 34, 0.92), rgba(8, 11, 18, 0.92));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 16px rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
  overflow: hidden;
}

.floating-controls .control-button:hover {
  border-color: rgba(255, 77, 95, 0.55);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 16px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(255, 77, 95, 0.1);
  transform: translateY(-1px);
}

.floating-controls .control-button:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.floating-controls .control-button.is-active {
  border-color: #ed1b1b;
  background: linear-gradient(150deg, rgba(237, 27, 27, 0.18), rgba(180, 20, 20, 0.22));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 24px rgba(237, 27, 27, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.28);
}

.floating-controls .control-button.is-active:hover {
  border-color: #ff3c3c;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 30px rgba(237, 27, 27, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.28);
}

/* Camera active (on) — green accent */
.floating-controls .control-button.is-active[data-active-camera="true"],
.floating-controls .control-button.is-active[data-active-mic="true"] {
  border-color: rgba(56, 217, 150, 0.5);
  background: linear-gradient(150deg, rgba(56, 217, 150, 0.12), rgba(30, 160, 100, 0.16));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 24px rgba(56, 217, 150, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.28);
}

/* Camera active hover */
.floating-controls .control-button.is-active[data-active-camera="true"]:hover,
.floating-controls .control-button.is-active[data-active-mic="true"]:hover {
  border-color: rgba(56, 217, 150, 0.7);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 30px rgba(56, 217, 150, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.28);
}

.controls-handle,
.overlay-toggle {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  font-weight: 850;
}

.control-buttons {
  display: flex;
  gap: 7px;
}

.floating-controls .control-button {
  min-width: 104px;
  min-height: 38px;
}

.floating-controls.is-collapsed .control-buttons {
  display: none;
}

.floating-controls.is-collapsed {
  padding: 5px;
}

/* Participant tiles */
.participant-section {
  position: absolute;
  z-index: 7;
  left: 12px;
  bottom: 72px;
  display: block;
  width: min(52%, 620px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px;
  background: rgba(8, 10, 15, 0.8);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
}

.participant-section[hidden] {
  display: none;
}

.participant-section-heading {
  min-height: 24px;
}

.participant-section-heading > div {
  display: flex;
  gap: 5px;
}

.participant-section.is-collapsed {
  width: auto;
}

.participant-section.is-collapsed .participant-strip {
  display: none;
}

.participant-strip {
  display: flex;
  gap: 7px;
  min-height: 82px;
  padding-bottom: 2px;
}

.participant-tile {
  flex: 0 0 142px;
  height: 80px;
}

.participant-meta {
  min-height: 26px;
  padding: 4px 7px;
}

.participant-empty {
  display: none;
}

/* Member popover */
.members-popover {
  position: absolute;
  z-index: 30;
  top: 64px;
  right: 10px;
  width: min(320px, calc(100% - 20px));
  max-height: 320px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(18, 23, 33, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.connection-lab {
  position: absolute;
  z-index: 30;
  top: 64px;
  right: 104px;
  width: min(360px, calc(100% - 20px));
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  padding: 14px;
  background: rgba(18, 23, 33, 0.98);
}

.members-popover[hidden],
.connection-lab[hidden] {
  display: none;
}

.popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.popover-heading span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Room minimized state */
.room-app-minimized #room-app {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Room overlay panels */
.room-panels {
  position: fixed;
  inset: 0 0 0 126px;
  z-index: 40;
  background: var(--bg);
  overflow-y: auto;
  padding: 24px;
}

.room-panels[hidden] {
  display: none;
}

.room-panels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.room-panels-header h2 {
  font-size: 1.2rem;
  font-weight: 900;
}

.room-panel-content {
  max-width: 640px;
}

.room-panel-content[hidden] {
  display: none;
}

.placeholder-panel {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: 60px 20px;
}

.placeholder-panel i {
  font-size: 2.5rem;
  color: var(--muted);
}

.placeholder-panel h2 {
  font-size: 1.4rem;
}

.placeholder-panel p {
  color: var(--muted);
  max-width: 400px;
  line-height: 1.5;
}

.room-panel-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  padding-right: 4px;
}

.room-home-panel {
  max-width: 860px;
}

.room-home-panel .room-panel-scroll > .lobby-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .room-home-panel .room-panel-scroll > .lobby-actions {
    grid-template-columns: 1fr;
  }
}

.room-settings-panel {
  display: grid;
  gap: 16px;
}

.room-settings-panel h2 {
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0;
}

.room-settings-panel .settings-identity-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.room-settings-panel hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.room-settings-panel .settings-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.room-settings-panel .avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.room-settings-panel .identity-details {
  color: var(--muted);
  font-size: 0.85rem;
}

.room-settings-panel .identity-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.room-settings-panel .identity-details code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.room-settings-panel .setting-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
}

.room-settings-panel .settings-field {
  display: grid;
  gap: 4px;
  padding: 6px 0;
  font-size: 0.9rem;
}

.room-settings-panel .settings-field input {
  max-width: 80px;
}

.room-settings-panel .help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* Active room dock */
.active-room-dock {
  position: fixed;
  bottom: 0;
  left: 126px;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(18, 23, 33, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.active-room-dock[hidden] {
  display: none;
}

.dock-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dock-room-name {
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-room-code {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: monospace;
  flex-shrink: 0;
}

.dock-status {
  color: #4ade80;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.dock-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.dock-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dock-actions .primary-button,
.dock-actions .secondary-button {
  padding: 6px 14px;
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .room-panels {
    left: 0;
    padding: 16px;
  }

  .active-room-dock {
    left: 0;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }

  .dock-info {
    width: 100%;
    justify-content: center;
  }

  .dock-actions {
    width: 100%;
    justify-content: center;
  }

  .room-settings-panel .help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .watch-room {
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(0, 1fr) minmax(220px, 34vh);
  }

  .room-topbar {
    grid-column: 1;
  }

  .sidebar {
    grid-row: 3;
  }

  .signed-in-label {
    display: none;
  }

  .participant-section {
    width: min(66%, 520px);
  }

  .watch-room.conference-mode .participant-strip {
    gap: 8px;
    padding: 12px;
  }
  .watch-room.conference-mode .participant-strip.conf-5-6 {
    grid-template-columns: 1fr 1fr;
  }
  .watch-room.conference-mode .participant-strip.conf-7-8 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .watch-room {
    grid-template-rows: auto minmax(0, 1fr) minmax(210px, 36vh);
  }

  .room-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 9px;
  }

  .topbar-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .room-identity {
    width: 100%;
  }

  .room-identity h1 {
    flex: 1 1 auto;
  }

  .topbar-button,
  .room-topbar .live-pill {
    flex: 0 0 auto;
  }

  .participant-section {
    right: 8px;
    bottom: 64px;
    left: 8px;
    width: auto;
  }

  .floating-controls {
    right: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
  }

  .floating-controls .control-button {
    min-width: 86px;
    min-height: 40px;
    padding: 0 8px;
    font-size: 0.73rem;
  }

  .device-status {
    display: none;
  }

  .screen-share-status {
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .members-popover {
    top: 104px;
  }

  .connection-lab {
    top: 104px;
    right: 10px;
  }

  .watch-room.conference-mode .participant-strip {
    gap: 6px;
    padding: 8px;
  }
  .watch-room.conference-mode .participant-strip.conf-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }
  .watch-room.conference-mode .participant-strip.conf-2 {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
  .watch-room.conference-mode .participant-strip.conf-3a {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .watch-room.conference-mode .participant-strip.conf-3a .participant-tile:first-child {
    grid-column: auto;
  }
  .watch-room.conference-mode .participant-strip.conf-4 {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
  .watch-room.conference-mode .participant-strip.conf-5-6 {
    grid-template-columns: 1fr 1fr;
  }
  .watch-room.conference-mode .participant-strip.conf-7-8 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Profile controls */
.identity-change-button {
  flex: 0 0 auto;
  min-height: 26px;
  border: 0;
  padding: 0 4px;
  color: var(--accent);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 850;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.host-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 185, 80, 0.5);
  border-radius: 999px;
  padding: 3px 7px;
  color: #ffe9c1;
  background: rgba(255, 185, 80, 0.13);
  font-size: 0.66rem;
  font-weight: 900;
}

.member-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-tail,
.moderation-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.moderation-actions button,
.banned-list button {
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 7px;
  color: #dfe5f1;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.68rem;
  font-weight: 850;
}

.moderation-actions button[data-moderation-action="ban"] {
  border-color: rgba(237, 27, 27, 0.42);
  color: #ffd8de;
}

.banned-users {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.banned-users summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
}

.banned-users summary span {
  color: #ffd8de;
}

.banned-list {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.banned-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #cfd6e4;
  font-size: 0.78rem;
}

.banned-list .banned-empty {
  color: var(--muted);
}

/* HeroLink product branding and finish */
:root {
  --surface: #11151e;
  --surface-strong: #1a202c;
  --border: #303747;
  --accent: #ff465b;
  --accent-strong: #c92940;
  --accent-soft: rgba(255, 70, 91, 0.14);
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 70, 91, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(83, 96, 135, 0.12), transparent 30rem),
    linear-gradient(145deg, #07080c 0%, #11141c 48%, #07080b 100%);
}

.panel,
.room-topbar {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(145deg, rgba(25, 30, 42, 0.91), rgba(13, 17, 25, 0.91));
  box-shadow:
    0 22px 65px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.brand-lockup,
.room-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eh-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 103, 120, 0.55);
  border-radius: 11px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 70, 91, 0.96), rgba(161, 27, 51, 0.96));
  box-shadow:
    0 10px 28px rgba(255, 70, 91, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.brand-copy,
.room-brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong,
.room-brand-copy strong {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.brand-copy small,
.room-brand-copy small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-hero {
  position: relative;
  max-width: none;
  min-height: 310px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  background:
    linear-gradient(105deg, rgba(15, 19, 28, 0.98) 0%, rgba(22, 27, 38, 0.94) 62%, rgba(80, 17, 31, 0.72) 100%);
  box-shadow: var(--shadow);
}

.product-hero::after {
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
  top: -190px;
  right: -70px;
  box-shadow:
    0 0 0 48px rgba(255, 70, 91, 0.035),
    0 0 0 96px rgba(255, 70, 91, 0.022);
  pointer-events: none;
}

.product-hero .brand-lockup {
  position: relative;
  z-index: 1;
  margin-bottom: 34px;
}

.product-hero .eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  color: #ff8c99;
}

.product-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: #fff;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  letter-spacing: -0.06em;
}

.product-hero h1 span {
  color: var(--accent);
}

.product-hero .hero-summary {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 18px 0 24px;
  color: #d0d6e2;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.55;
}

.feature-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.feature-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 12px;
  color: #dce1eb;
  background: rgba(4, 6, 10, 0.3);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.feature-strip i {
  color: #ff7d8d;
}

.account-panel {
  border-radius: 12px;
  padding: 15px 18px;
}

.account-panel h2 {
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.lobby-actions {
  gap: 16px;
}

.lobby-card {
  position: relative;
  gap: 13px;
  min-height: 300px;
  border-radius: 14px;
  padding: 22px;
  transition: border-color 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.lobby-card:hover {
  border-color: rgba(255, 70, 91, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

.lobby-card h2 {
  font-size: 1.22rem;
}

.card-helper {
  min-height: 42px;
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.lobby-card input {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(5, 8, 13, 0.74);
}

.lobby-card .primary-button {
  margin-top: auto;
}

.recent-panel {
  border-radius: 14px;
  padding: 20px;
}

.recent-room {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.recent-room:hover,
.recent-room:focus-within {
  transform: translateY(-1px);
}

.recent-room-code {
  border-radius: 999px;
  background: rgba(255, 70, 91, 0.08);
}

.primary-button,
.primary-link {
  box-shadow:
    0 10px 28px rgba(255, 70, 91, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.identity-card {
  border-radius: 14px;
}

.delete-confirm-card {
  border-color: rgba(255, 70, 91, 0.24);
}

.room-brand {
  flex: 0 0 auto;
}

.room-brand .eh-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 0.59rem;
}

.room-brand-copy strong {
  font-size: 0.88rem;
}

.room-brand-copy small {
  color: #ff8291;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.room-identity-divider {
  align-self: stretch;
  width: 1px;
  min-height: 26px;
  background: rgba(255, 255, 255, 0.1);
}

.room-topbar {
  border-radius: 11px;
}

.room-identity h1 {
  font-weight: 900;
  letter-spacing: -0.025em;
}

.room-code {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.04);
}

.host-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.video-shell,
.chat-panel {
  border-radius: 11px;
}

.chat-panel {
  border-color: rgba(255, 255, 255, 0.09);
}

.message {
  border-radius: 9px;
}

.floating-controls,
.participant-section {
  border-radius: 11px;
  background: rgba(9, 12, 18, 0.84);
}

.participant-tile {
  border-radius: 9px;
}

.members-popover,
.connection-lab {
  border-radius: 12px;
}

.video-placeholder {
  background:
    radial-gradient(circle at center, rgba(255, 70, 91, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(12, 15, 22, 0.35), rgba(2, 3, 6, 0.18));
}

@media (max-width: 980px) {
  .product-hero {
    min-height: 0;
  }

  .room-brand-copy {
    display: none;
  }
}

@media (max-width: 700px) {
  .product-hero {
    border-radius: 14px;
    padding: 24px 20px;
  }

  .product-hero .brand-lockup {
    margin-bottom: 28px;
  }

  .feature-strip {
    gap: 7px;
  }

  .feature-strip span {
    min-height: 31px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .room-brand,
  .room-identity-divider {
    display: none;
  }
}

/* Participant view modes */
.screen-pane {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #020306;
}

.screen-pane .screen-preview,
.screen-pane .video-placeholder {
  grid-area: 1 / 1;
}

.participant-feature {
  position: relative;
  z-index: 6;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #06080d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
}

.participant-feature[hidden] {
  display: none;
}

.participant-feature video,
.participant-feature-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020306;
}

.participant-feature-avatar {
  display: grid;
  place-items: center;
  color: #fff4f6;
  background: #141923;
  font-size: 4rem;
  font-weight: 900;
}

.participant-feature-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  background: rgba(3, 5, 8, 0.86);
}

.participant-feature-bar > div {
  display: flex;
  gap: 4px;
}

.participant-feature-bar button,
.participant-view-menu button {
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 0 6px;
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.65rem;
  font-weight: 800;
}

.exit-participant-view {
  position: absolute;
  z-index: 12;
  top: 12px;
  left: 12px;
  min-height: 34px;
  border: 1px solid rgba(255, 77, 95, 0.55);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffe2e6;
  background: rgba(8, 10, 15, 0.84);
  font-size: 0.74rem;
  font-weight: 850;
}

.video-shell[data-participant-view="split"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.video-shell[data-participant-view="split"] .screen-pane,
.video-shell[data-participant-view="split"] .participant-feature {
  height: 100%;
}

.video-shell[data-participant-view="focus"] .participant-feature {
  position: absolute;
  inset: 8px;
}

.video-shell[data-participant-view="focus"] .screen-pane {
  position: absolute;
  z-index: 9;
  right: 18px;
  bottom: 58px;
  width: min(260px, 28%);
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

/* With no active share, focus mode becomes a true full-size video chat view. */
.stage:not(.has-active-share) .video-shell[data-participant-view="focus"] .screen-pane {
  display: none;
}

.stage:not(.has-active-share) .video-shell[data-participant-view="focus"] .participant-feature {
  inset: 0;
  border-radius: 0;
}

.video-shell[data-participant-view="float"] .participant-feature {
  position: absolute;
  top: var(--float-y, 24px);
  left: var(--float-x, 24px);
  width: 240px;
  max-width: calc(100% - 16px);
  aspect-ratio: 16 / 10;
  cursor: move;
  touch-action: none;
}

.participant-view-menu {
  position: absolute;
  z-index: 5;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 4px;
  opacity: 0.78;
  transition: opacity 140ms ease, transform 140ms ease;
}

.participant-view-menu button {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  background: rgba(3, 5, 8, 0.82);
  backdrop-filter: blur(5px);
}

.participant-view-menu button:hover,
.participant-view-menu button:focus-visible {
  border-color: rgba(255, 77, 95, 0.7);
  background: rgba(120, 18, 34, 0.9);
}

.participant-tile:hover .participant-view-menu,
.participant-tile:focus-within .participant-view-menu {
  opacity: 1;
  transform: translateY(1px);
}

.participant-tile.is-selected {
  display: none;
}

@media (max-width: 700px) {
  .video-shell[data-participant-view="split"] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .video-shell[data-participant-view="focus"] .screen-pane {
    width: 34%;
  }

  .participant-view-menu {
    opacity: 1;
  }
}

/* HeroLink Rooms lobby: brighter, playful product surface */
body.lobby-page {
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 74, 116, 0.38), transparent 25rem),
    radial-gradient(circle at 88% 18%, rgba(126, 86, 255, 0.24), transparent 30rem),
    radial-gradient(circle at 48% 88%, rgba(255, 91, 70, 0.16), transparent 32rem),
    linear-gradient(145deg, #111426 0%, #171b31 45%, #0c1020 100%);
}

.lobby-page .lobby-shell {
  width: min(1160px, calc(100% - 32px));
  padding-top: 34px;
  padding-bottom: 54px;
}

.lobby-page .product-hero {
  min-height: 360px;
  border-color: rgba(255, 255, 255, 0.17);
  border-radius: 22px;
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at 84% 28%, rgba(255, 143, 113, 0.33), transparent 17rem),
    radial-gradient(circle at 70% 105%, rgba(124, 83, 255, 0.28), transparent 24rem),
    linear-gradient(118deg, rgba(39, 45, 72, 0.98) 0%, rgba(52, 38, 67, 0.97) 56%, rgba(126, 29, 55, 0.94) 100%);
  box-shadow:
    0 32px 90px rgba(2, 4, 13, 0.48),
    0 0 70px rgba(255, 70, 91, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lobby-page .product-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 28%),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(255, 255, 255, 0.018) 34px 35px);
  content: "";
  pointer-events: none;
}

.lobby-page .product-hero::after {
  width: 390px;
  height: 390px;
  top: -215px;
  right: -55px;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 54px rgba(255, 111, 132, 0.07),
    0 0 0 108px rgba(255, 111, 132, 0.035);
}

.lobby-page .product-hero .brand-lockup {
  margin-bottom: 48px;
}

.lobby-page .eh-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: 13px;
  background: linear-gradient(145deg, #ff6074, #e62f53 58%, #a71940);
  box-shadow:
    0 14px 34px rgba(255, 50, 87, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
}

.lobby-page .brand-copy strong {
  font-size: 1.25rem;
}

.lobby-page .brand-copy small {
  color: #d9dced;
  font-size: 0.7rem;
  letter-spacing: 0.025em;
}

.lobby-page .product-hero h1 {
  max-width: 880px;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.88;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
}

.lobby-page .product-hero h1 span {
  color: #ff7183;
  text-shadow: 0 0 34px rgba(255, 73, 103, 0.38);
}

.lobby-page .product-hero .hero-summary {
  max-width: 48rem;
  margin: 22px 0 30px;
  color: #f2f3fa;
  font-size: clamp(1.12rem, 2.4vw, 1.42rem);
  font-weight: 680;
  line-height: 1.45;
}

.lobby-page .feature-strip {
  gap: 10px;
}

.lobby-page .feature-strip span {
  min-height: 39px;
  border-color: rgba(255, 255, 255, 0.18);
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0.79rem;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.lobby-page .feature-strip span:hover {
  border-color: rgba(255, 143, 158, 0.62);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.lobby-page .feature-strip i {
  color: #ff9ba8;
}

.lobby-page .panel {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(43, 49, 71, 0.94), rgba(28, 33, 51, 0.95));
  box-shadow:
    0 22px 55px rgba(2, 4, 12, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.lobby-page .account-panel {
  border-color: rgba(255, 136, 151, 0.22);
  background:
    linear-gradient(110deg, rgba(52, 57, 80, 0.97), rgba(40, 37, 58, 0.96));
}

.lobby-page .account-panel .eyebrow,
.lobby-page .lobby-card .eyebrow {
  color: #ff91a0;
}

.lobby-page .lobby-card {
  min-height: 320px;
  border-radius: 17px;
}

.lobby-page .lobby-card:hover {
  border-color: rgba(255, 113, 131, 0.5);
  box-shadow:
    0 30px 75px rgba(2, 4, 12, 0.42),
    0 0 34px rgba(255, 70, 91, 0.08);
}

.lobby-page .lobby-card h2 {
  color: #fff;
  font-size: 1.32rem;
}

.lobby-page .card-helper {
  color: #c5cadb;
}

.lobby-page input {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(13, 17, 31, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.lobby-page input::placeholder {
  color: #8f97ad;
}

.lobby-page input:focus {
  border-color: rgba(255, 100, 121, 0.75);
  outline: 3px solid rgba(255, 70, 91, 0.22);
  background: rgba(16, 20, 35, 0.92);
}

.lobby-page .primary-button {
  border-color: rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, #ed1b1b, #b90008);
  box-shadow: 0 10px 26px rgba(255, 0, 0, 0.25);
}

.lobby-page .primary-button:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, #ff2c2c, #ce0000);
  box-shadow: 0 12px 30px rgba(255, 0, 0, 0.35);
}

.lobby-page .secondary-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.lobby-page .secondary-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lobby-page .recent-panel {
  border-radius: 17px;
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 82, 110, 0.08), transparent 18rem),
    linear-gradient(145deg, rgba(43, 49, 71, 0.96), rgba(27, 32, 50, 0.97));
}

.lobby-page .recent-room {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
}

.lobby-page .recent-room:hover,
.lobby-page .recent-room:focus-within {
  border-color: rgba(255, 112, 132, 0.52);
  background: rgba(255, 255, 255, 0.1);
}

.lobby-page .recent-room-code {
  color: #ffdce1;
  background: rgba(255, 70, 91, 0.14);
}

.lobby-page .empty-state {
  color: #bbc1d2;
}

@media (max-width: 700px) {
  .lobby-page .lobby-shell {
    width: min(100% - 20px, 1160px);
    padding-top: 20px;
  }

  .lobby-page .product-hero {
    min-height: 0;
    border-radius: 17px;
    padding: 28px 21px;
  }

  .lobby-page .product-hero .brand-lockup {
    margin-bottom: 34px;
  }

  .lobby-page .product-hero h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .lobby-page .feature-strip span {
    min-height: 35px;
    padding: 0 11px;
    font-size: 0.72rem;
  }
}

/* Cinematic HeroLink Rooms dashboard */
body.lobby-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #f7f7fa;
  background: #030405;
}

.hero-sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: 126px;
  flex-direction: column;
  border-right: 1px solid rgba(255, 82, 82, 0.18);
  background:
    linear-gradient(180deg, rgba(4, 5, 7, 0.98), rgba(10, 11, 15, 0.97)),
    #050608;
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.4);
}

.eh-logo-frame {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 18px auto 22px;
  filter: drop-shadow(0 0 18px rgba(255, 31, 31, 0.32));
}

.eh-logo {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 4px 7px;
}

.sidebar-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 64px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  padding: 0 10px;
  color: #d4d5da;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 860;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.sidebar-item span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.sidebar-item i {
  color: #f4f4f6;
  font-size: 1.28rem;
  text-align: center;
}

.sidebar-item:hover,
.sidebar-item:focus-visible {
  border-color: rgba(255, 59, 59, 0.5);
  border-left-color: #ff3535;
  color: #fff;
  outline: none;
  background:
    linear-gradient(90deg, rgba(255, 27, 27, 0.11), rgba(255, 27, 27, 0.015));
  box-shadow:
    inset 0 0 0 1px rgba(255, 91, 91, 0.06),
    inset 8px 0 18px rgba(255, 12, 12, 0.08),
    0 0 17px rgba(255, 17, 17, 0.12);
  transform: translateX(2px);
}

.sidebar-item:hover i,
.sidebar-item:focus-visible i {
  color: #ff6464;
  filter: drop-shadow(0 0 7px rgba(255, 37, 37, 0.72));
}

.sidebar-item.is-active {
  border-color: rgba(255, 81, 81, 0.72);
  border-left-color: #ff3a32;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(211, 9, 16, 0.94), rgba(130, 0, 8, 0.72) 62%, rgba(75, 0, 5, 0.42)),
    radial-gradient(circle at 12% 50%, rgba(255, 108, 75, 0.58), transparent 56%);
  box-shadow:
    inset 0 1px 0 rgba(255, 183, 170, 0.28),
    inset 12px 0 30px rgba(255, 72, 43, 0.2),
    0 0 24px rgba(255, 0, 0, 0.34),
    7px 0 30px rgba(255, 0, 0, 0.13);
}

.sidebar-item.is-active span {
  text-shadow: 0 0 8px rgba(255, 190, 180, 0.45), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.sidebar-item.is-active i {
  color: #fff;
  filter: drop-shadow(0 0 7px rgba(255, 218, 208, 0.86));
}

.sidebar-item.is-active:hover,
.sidebar-item.is-active:focus-visible {
  transform: none;
}

.hero-main {
  position: relative;
  min-height: 100vh;
  margin-left: 126px;
  overflow: hidden;
  background-color: #030405;
  background-image:
    linear-gradient(90deg, rgba(2, 3, 5, 0.93) 0%, rgba(3, 4, 7, 0.72) 39%, rgba(3, 4, 7, 0.16) 67%, rgba(2, 2, 4, 0.12) 100%),
    url("assets/img/lobby-bg.png");
  background-size: cover;
  background-position: center, 76% top;
  background-repeat: no-repeat;
  background-attachment: scroll, fixed;
}

.hero-main::before,
.hero-main::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero-main::before {
  z-index: 0;
  inset: 0;
  opacity: 0.24;
  background:
    radial-gradient(ellipse at 72% 29%, transparent 26%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.5));
}

.hero-main::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 54px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.hero-main.cover-menu-open {
  overflow: visible;
}

.hero-main.cover-menu-open .hero-content {
  z-index: 60;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
}

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

.hero-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 11px rgba(255, 32, 32, 0.28));
}

.hero-brand-copy {
  display: grid;
  gap: 3px;
}

.hero-brand strong {
  color: #ededef;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-brand strong span {
  color: #fff;
}

.hero-brand strong::first-letter {
  color: #fff;
}

.hero-brand strong {
  background: linear-gradient(90deg, #fff 0 48%, #e31620 48% 100%);
  background-clip: text;
  color: transparent;
}

.hero-brand small {
  color: #d5d5d8;
  font-size: 0.72rem;
   font-weight: 720;
}

.dashboard-top .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-logged-in-as {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  white-space: nowrap;
}

.header-logout-btn {
  font-size: 0.8rem;
  padding: 4px 12px;
}

.hero-main .account-panel {
  display: flex;
  width: min(370px, 100%);
  min-height: 76px;
  margin: 0;
  border: 1px solid rgba(255, 112, 112, 0.3);
  border-radius: 10px;
  padding: 13px 14px 13px 20px;
  background:
    linear-gradient(115deg, rgba(16, 17, 22, 0.1), rgba(5, 6, 10, 0.025));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 0 24px rgba(214, 18, 26, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(4px) saturate(108%);
}

.hero-main .account-panel .eyebrow {
  margin-bottom: 3px;
  color: #ff2828;
  font-size: 0.67rem;
}

.hero-main .account-panel h2 {
  color: #fff;
  font-size: 0.94rem;
}

.hero-main .account-panel .secondary-button {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f5f7;
  background: rgba(8, 9, 12, 0.18);
}

.cinematic-hero {
  position: relative;
  padding: 8px 0 12px;
}

.hero-title-block h1 {
  margin: 0;
  line-height: 0;
}

.hero-title-image {
  display: block;
  width: min(82%, 920px);
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 15px 22px rgba(0, 0, 0, 0.58));
}

.hero-title-block > p {
  display: grid;
  justify-items: start;
  gap: 9px;
  width: fit-content;
  margin: 11px 0 27px;
  color: #d2d2d5;
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 850;
}

.hero-title-block .hero-lead {
  position: relative;
  z-index: 1;
}

.hero-title-block .chaos-accent {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.05em 0.12em 0.12em;
  color: #ff3c1f;
  font-family: "Trebuchet MS", "Arial Black", sans-serif;
  font-size: clamp(1.65rem, 3.2vw, 2.85rem);
  font-style: italic;
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin-left: clamp(18px, 4vw, 62px);
  transform: rotate(-2deg) skewX(-4deg);
  transform-origin: left center;
  text-shadow:
    0 2px 0 #720007,
    0 4px 0 rgba(47, 0, 2, 0.92),
    0 0 9px rgba(255, 43, 15, 0.85),
    0 0 24px rgba(255, 88, 15, 0.58),
    0 10px 22px rgba(0, 0, 0, 0.78);
}

.hero-title-block .chaos-accent::after {
  position: absolute;
  z-index: -1;
  right: -0.18em;
  bottom: -0.04em;
  left: -0.1em;
  height: 0.12em;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, transparent, #ff2016 12%, #ff8a18 76%, transparent);
  box-shadow: 0 0 12px rgba(255, 51, 14, 0.88);
  transform: rotate(1deg);
}

.feature-callouts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 900px;
  margin-top: 8px;
}

.feature-callouts article {
  position: relative;
  min-width: 0;
  padding: 0 14px 8px;
  text-align: center;
}

.feature-tip {
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.feature-tip:hover,
.feature-tip:focus-visible {
  outline: none;
  background: rgba(255, 31, 31, 0.055);
  box-shadow: 0 0 18px rgba(255, 20, 20, 0.1);
  transform: translateY(-2px);
}

.feature-callouts article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.feature-icon,
.action-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #ff2222;
  clip-path: polygon(25% 7%, 75% 7%, 98% 50%, 75% 93%, 25% 93%, 2% 50%);
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 37, 37, 0.36), rgba(98, 0, 0, 0.72));
  box-shadow:
    0 0 18px rgba(255, 17, 17, 0.58),
    inset 0 0 14px rgba(255, 48, 48, 0.3);
  font-size: 1.25rem;
}

.feature-icon {
  border-color: rgba(255, 65, 65, 0.9);
  filter:
    drop-shadow(0 0 2px rgba(255, 167, 151, 0.55))
    drop-shadow(0 0 7px rgba(255, 24, 24, 0.34));
}

.feature-callouts h2 {
  margin-top: 8px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 950;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.feature-callouts p {
  margin: 4px auto 0;
  color: #bfc0c5;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.34;
}

.hero-main .lobby-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 10px 0 18px;
}

.hero-main .lobby-card {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 11px;
  min-height: 260px;
  border: 1px solid;
  border-radius: 16px;
  overflow: hidden;
  padding: 22px 28px 20px;
  background-color: transparent;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
}

.hero-main .lobby-card::before,
.hero-main .lobby-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero-main .lobby-card::before {
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 48% 55%, rgba(3, 4, 7, 0.56) 0%, rgba(3, 4, 7, 0.42) 34%, rgba(3, 4, 7, 0.16) 69%, rgba(3, 4, 7, 0.05) 100%),
    linear-gradient(180deg, rgba(3, 4, 7, 0.05), rgba(3, 4, 7, 0.22));
}

.hero-main .lobby-card::after {
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 24px currentColor,
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  opacity: 0.28;
}

.hero-main .create-card {
  border-color: rgba(255, 56, 32, 0.78);
  color: #ff2f22;
  background-image: url("assets/img/start-card-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #170304;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(255, 27, 18, 0.24);
}

.hero-main .join-card {
  border-color: rgba(0, 135, 255, 0.78);
  color: #008cff;
  background-image: url("assets/img/join-card-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #020c18;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(0, 135, 255, 0.26);
}

.hero-main .create-card:hover {
  border-color: rgba(255, 67, 45, 0.96);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(255, 27, 18, 0.3);
}

.hero-main .join-card:hover {
  border-color: rgba(24, 157, 255, 0.96);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(0, 135, 255, 0.32);
}

.action-card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-card-heading .action-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.join-card .action-icon {
  border-color: #008cff;
  color: #43b5ff;
  background: linear-gradient(145deg, rgba(0, 144, 255, 0.28), rgba(0, 37, 83, 0.7));
  box-shadow:
    0 0 17px rgba(0, 139, 255, 0.46),
    inset 0 0 14px rgba(0, 139, 255, 0.2);
}

.action-card-heading h2 {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.action-card-heading p {
  margin: 3px 0 0;
  color: #d1d1d5;
  font-size: 0.8rem;
}

.hero-main .lobby-card label,
.hero-main .lobby-card input,
.hero-main .lobby-card button,
.hero-main .lobby-card .form-note {
  position: relative;
  z-index: 2;
}

.hero-main .lobby-card label {
  color: #aeb0b8;
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-main .lobby-card input {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.13);
  color: #fff;
  background: rgba(15, 16, 19, 0.92);
}

.hero-main .lobby-card input:focus {
  border-color: currentColor;
  outline-color: currentColor;
}

.hero-main .lobby-card .primary-button {
  min-height: 46px;
  margin-top: 0;
  border-color: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 0.96rem;
}

.hero-main .create-card .primary-button {
  background: linear-gradient(180deg, #ed1b1b, #b90008);
  box-shadow: 0 10px 26px rgba(255, 0, 0, 0.25);
}

.hero-main .join-card .primary-button {
  background: linear-gradient(180deg, #1671d9, #0748a7);
  box-shadow: 0 10px 26px rgba(0, 105, 255, 0.24);
}

.hero-main .create-card .primary-button,
.hero-main .join-card .primary-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-main .create-card .primary-button::before,
.hero-main .join-card .primary-button::before {
  position: absolute;
  z-index: 0;
  top: -55%;
  bottom: -55%;
  left: 0;
  width: 42%;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 12%,
    rgba(255, 255, 255, 0.08) 34%,
    rgba(255, 255, 255, 0.34) 50%,
    rgba(255, 255, 255, 0.08) 66%,
    transparent 88%
  );
  transform: translateX(-260%) skewX(-20deg);
  transition: transform 650ms cubic-bezier(0.22, 0.72, 0.24, 1);
}

.hero-main .create-card .primary-button > *,
.hero-main .join-card .primary-button > * {
  position: relative;
  z-index: 1;
}

.hero-main .create-card .primary-button:hover::before,
.hero-main .join-card .primary-button:hover::before {
  transform: translateX(500%) skewX(-20deg);
}

.hero-main .create-card .primary-button:focus-visible,
.hero-main .join-card .primary-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-main .create-card .primary-button::before,
  .hero-main .join-card .primary-button::before {
    display: none;
    transition: none;
  }
}

.hero-main .recent-panel {
  min-height: 144px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.hero-main .recent-panel .panel-heading {
  margin: 0 0 11px;
}

.hero-main .recent-panel .panel-heading h2 {
  color: #e5e5e8;
  font-size: 1.12rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-main .recent-panel .panel-heading h2 i {
  color: #c7c7ca;
}

.hero-main .recent-room {
  display: flex;
  flex-direction: column;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(100deg, rgba(21, 24, 32, 0.95), rgba(7, 8, 11, 0.94));
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.hero-main .recent-room-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.recent-room-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 120px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(rgba(2, 8, 16, 0.14), rgba(2, 3, 6, 0.42)),
    url("assets/img/lobby-bg.png") 67% 57% / cover no-repeat;
  box-shadow: inset 0 -18px 26px rgba(255, 0, 0, 0.12);
}

.recent-room-thumb i {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(0, 145, 255, 0.7));
}

.hero-main .recent-room-copy {
  padding: 12px 15px 8px;
}

.hero-main .recent-room-copy strong {
  color: #fff;
  font-size: 1rem;
  display: block;
}

.hero-main .recent-room-copy small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #c1c2c7;
  font-size: 0.72rem;
}

.hero-main .recent-room-copy small i {
  color: #19d967;
  font-size: 0.55rem;
}

.recent-room-type {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-room-type.is-watch {
  color: #ff8c00;
  background: rgba(255, 140, 0, 0.15);
}

.recent-room-type.is-video {
  color: #1a73ff;
  background: rgba(26, 115, 255, 0.15);
}

.hero-main .recent-room-code {
  padding: 0 15px 8px;
  border: 0;
  color: #c4c5ca;
  background: transparent;
  font-size: 0.82rem;
}

.hero-main .recent-room-actions {
  display: flex;
  gap: 8px;
  padding: 8px 15px 15px;
  margin-top: auto;
}

.hero-main .recent-room-actions button {
  flex: 1;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 12px;
  color: #c9c9cd;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.78rem;
}

.hero-footer {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 22px;
  min-height: 92px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px max(28px, calc((100% - 1440px) / 2));
  background: rgba(7, 8, 11, 0.92);
}

.hero-footer > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.hero-footer i {
  color: #f02727;
  font-size: 1.45rem;
}

.hero-footer span {
  display: grid;
  gap: 2px;
}

.hero-footer strong {
  color: #eeeef1;
  font-size: 0.75rem;
}

.hero-footer small {
  color: #a6a7ad;
  font-size: 0.68rem;
}

.hero-footer > p {
  margin: 0;
  color: #898a90;
  font-size: 0.66rem;
  text-align: right;
}

.lobby-page .identity-modal {
  z-index: 100;
}

/* Single-page app shell. Home panel styles above remain unchanged. */
.app-panel[hidden] {
  display: none !important;
}

.workspace-panel {
  min-height: 650px;
  overflow: visible;
  padding: 36px 0 48px;
}

.workspace-panel[data-panel="settings"],
.workspace-panel[data-panel="help"] {
  padding-top: 64px;
}

.workspace-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.workspace-heading h1 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.72);
}

.panel-title-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.workspace-heading > p:last-child,
.workspace-note,
.workspace-card > p {
  color: #bfc1c8;
  line-height: 1.55;
}

.watch-helper-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 59, 59, 0.32);
  border-left: 3px solid rgba(255, 59, 59, 0.7);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255, 27, 27, 0.07), rgba(255, 27, 27, 0.02));
  color: #d6d8de;
  font-size: 0.82rem;
  line-height: 1.45;
  backdrop-filter: blur(6px);
}

.watch-helper-note i {
  color: #ff5050;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.watch-helper-note span {
  display: inline;
}

.room-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

.room-filter {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 0 18px;
  color: #c8c9ce;
  background: rgba(5, 7, 11, 0.44);
}

.room-filter:hover,
.room-filter:focus-visible {
  border-color: rgba(255, 68, 68, 0.5);
  color: #fff;
  outline: none;
}

.room-filter.is-active {
  border-color: rgba(255, 73, 63, 0.8);
  color: #fff;
  background: linear-gradient(180deg, rgba(210, 13, 20, 0.82), rgba(102, 0, 7, 0.7));
  box-shadow: 0 0 20px rgba(255, 15, 15, 0.22);
}

.panel-status {
  margin: 16px 0;
  color: #aeb0b8;
}

.settings-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-grid {
  align-items: start;
}

.help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(17, 20, 27, 0.82), rgba(6, 8, 12, 0.72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.workspace-card h2 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 1.12rem;
}

.identity-settings-card {
  grid-column: 1 / -1;
  border-color: rgba(255, 69, 69, 0.3);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 17, 24, 0.12), transparent 15rem),
    linear-gradient(145deg, rgba(20, 22, 30, 0.9), rgba(7, 8, 13, 0.8));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(255, 22, 22, 0.08);
}

.settings-identity-name {
  display: inline-flex;
  width: fit-content;
  margin: 4px 0 12px;
  border: 1px solid rgba(255, 76, 76, 0.34);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff !important;
  background: rgba(177, 6, 14, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 900;
}

#account-section {
  grid-column: 1 / -1;
}

.account-identity-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 16px;
}

.account-avatar-large {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.account-signed-in-as {
  margin: 0;
  font-size: 1.1rem;
}

.account-signed-in-as strong {
  color: #fff;
}

.account-display-name-label {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

#account-section .account-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

#account-section .account-form-group input {
  width: 100%;
}

#account-section .workspace-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.help-grid .workspace-card > i {
  margin-bottom: 16px;
  color: #ff3333;
  font-size: 1.65rem;
  filter: drop-shadow(0 0 9px rgba(255, 30, 30, 0.46));
}

.help-card {
  width: 100%;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.help-card:hover,
.help-card:focus-visible {
  border-color: rgba(255, 66, 66, 0.5);
  outline: none;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(255, 20, 20, 0.12);
  transform: translateY(-2px);
}

.identity-details {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 13px;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.settings-avatar-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.identity-details summary {
  color: #e6e7ea;
  cursor: pointer;
  font-weight: 800;
}

.identity-details code {
  color: #ff7676;
  overflow-wrap: anywhere;
}

.full-token-details {
  margin: 9px 0;
}

.full-token-details summary {
  color: #bfc1c8;
  font-size: 0.76rem;
}

.full-token-details code {
  display: block;
  margin-top: 8px;
  border-radius: 6px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
}

.settings-field {
  display: grid;
  gap: 7px;
  color: #c8c9ce;
  font-size: 0.78rem;
  font-weight: 750;
}

.settings-field input {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0 10px;
  color: #fff;
  background: rgba(4, 6, 10, 0.62);
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  color: #e1e2e6;
  cursor: pointer;
  line-height: 1.2;
  text-align: left;
}

.setting-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 0;
  flex: 0 0 17px;
  accent-color: #e61922;
}

.setting-toggle span {
  display: inline-block;
  margin: 0;
}

.activity-list,
.managed-room-list {
  display: grid;
  gap: 14px;
  overflow: visible;
}

.managed-room-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(220px, 0.8fr) minmax(300px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(120deg, rgba(28, 18, 20, 0.94), rgba(8, 10, 14, 0.88) 70%),
    radial-gradient(circle at 0% 0%, rgba(255, 35, 35, 0.08), transparent 55%),
    url("assets/img/room-covers/stock/red_blue_arcade.png") center right / cover no-repeat;
  background-blend-mode: normal, normal, soft-light;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 35, 35, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.managed-room-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.78) 0%, rgba(8, 10, 14, 0.55) 55%, rgba(8, 10, 14, 0.15) 100%);
  pointer-events: none;
  z-index: 0;
}

.managed-room-card > * {
  position: relative;
  z-index: 1;
}

.managed-room-card:hover {
  border-color: rgba(255, 81, 81, 0.45);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.46),
    0 0 30px rgba(255, 35, 35, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.managed-room-card.has-open-cover-menu {
  z-index: 20;
  overflow: visible;
}

.managed-room-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(255, 35, 35, 0.07);
}

.managed-room-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.managed-room-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.room-role {
  color: #ff4141;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.managed-room-name {
  margin: 4px 0 0;
  color: #fff;
  font-size: 1.32rem;
}

.managed-room-code {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 6px 9px;
  color: #d7d8dc;
  background: rgba(0, 0, 0, 0.22);
  font-weight: 850;
}

.managed-room-meta {
  margin: 12px 0 18px;
  color: #adb0b8;
  font-size: 0.76rem;
  line-height: 1.5;
}

.managed-room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.managed-room-actions .primary-button,
.managed-room-actions .secondary-button,
.managed-room-actions .danger-confirm-button {
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
}

.managed-room-settings {
  border-left: 1px solid rgba(255, 81, 81, 0.22);
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(255, 27, 27, 0.04), rgba(255, 27, 27, 0));
  border-radius: 0 10px 10px 0;
  padding: 12px 12px 12px 20px;
  transition: border-color 200ms ease, background 200ms ease;
}

.managed-room-card:hover .managed-room-settings {
  border-left-color: rgba(255, 81, 81, 0.42);
}

.room-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.room-settings-form label {
  color: #b9bbc2;
  font-size: 0.69rem;
  font-weight: 750;
}

.room-settings-form input,
.room-settings-form select {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0 10px;
  color: #fff;
  background: rgba(4, 6, 10, 0.72);
}

.room-settings-form .setting-toggle {
  align-self: center;
  margin: 0;
}

.cover-select-shell {
  position: relative;
  grid-column: 1 / -1;
}

.cover-select-shell.is-open {
  z-index: 25;
}

.cover-field-label {
  display: block;
  margin-bottom: 5px;
  color: #b9bbc2;
  font-size: 0.69rem;
  font-weight: 750;
}

.cover-field-help {
  margin: 0 0 8px;
  color: #8b8d95;
  font-size: 0.72rem;
  line-height: 1.4;
  font-style: italic;
}

.current-cover-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.current-cover-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background-position: center;
  background-size: cover;
}

.current-cover-label {
  min-width: 0;
  overflow: hidden;
  color: #e4e5e8;
  font-size: 0.76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-cover-button {
  min-height: 38px;
  padding-inline: 12px;
}

.cover-popover {
  position: absolute;
  z-index: 5000;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 48px));
  max-height: 360px;
  border: 1px solid rgba(255, 69, 69, 0.42);
  border-radius: 11px;
  overflow-y: auto;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(15, 18, 25, 0.97), rgba(4, 6, 10, 0.96));
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.62),
    0 0 24px rgba(255, 23, 23, 0.14);
  backdrop-filter: blur(14px);
}

.cover-popover.opens-upward {
  top: auto;
  bottom: calc(100% + 8px);
}

.cover-popover[hidden] {
  display: none;
}

.cover-popover-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.cover-popover-heading strong {
  color: #fff;
  font-size: 0.82rem;
}

.cover-popover-heading small {
  color: #9699a2;
  font-size: 0.67rem;
}

.stock-cover-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stock-cover-option {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px;
  color: #c7c8ce;
  background: rgba(5, 7, 11, 0.48);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.stock-cover-option:hover,
.stock-cover-option:focus-visible {
  border-color: rgba(255, 71, 71, 0.55);
  outline: none;
  box-shadow: 0 0 15px rgba(255, 20, 20, 0.13);
  transform: translateY(-1px);
}

.stock-cover-option.is-selected {
  border-color: rgba(255, 64, 55, 0.9);
  color: #fff;
  box-shadow:
    0 0 18px rgba(255, 20, 20, 0.24),
    inset 0 0 0 1px rgba(255, 115, 97, 0.12);
}

.stock-cover-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background-position: center;
  background-size: cover;
}

.stock-cover-label {
  overflow: hidden;
  font-size: 0.67rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-settings-form .setting-toggle input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.room-settings-form .managed-room-actions,
.room-settings-form .form-note {
  grid-column: 1 / -1;
}

.member-room-settings {
  display: grid;
  align-content: center;
  height: 100%;
  gap: 12px;
  color: #c6c8ce;
  font-size: 0.82rem;
}

.member-room-settings i {
  width: 20px;
  color: #ff3838;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.activity-item strong {
  color: #fff;
}

.activity-item span,
.activity-item time {
  color: #aeb0b8;
  font-size: 0.78rem;
}

/* Conference panel */
.conference-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.conference-card {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 12px;
  min-height: 240px;
  border: 1px solid;
  border-radius: 16px;
  overflow: hidden;
  padding: 22px 28px 20px;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
}

.conference-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 48% 55%, rgba(3, 4, 7, 0.56) 0%, rgba(3, 4, 7, 0.42) 34%, rgba(3, 4, 7, 0.16) 69%, rgba(3, 4, 7, 0.05) 100%),
    linear-gradient(180deg, rgba(3, 4, 7, 0.05), rgba(3, 4, 7, 0.22));
}

.conference-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 24px currentColor,
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  opacity: 0.28;
}

.conference-card > * {
  position: relative;
  z-index: 1;
}

#create-conference-form.conference-card {
  border-color: rgba(255, 56, 32, 0.78);
  color: #ff2f22;
  background-image: url("assets/img/start-card-bg.png");
  background-color: #170304;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(255, 27, 18, 0.24);
}

#join-conference-form.conference-card {
  border-color: rgba(0, 135, 255, 0.78);
  color: #008cff;
  background-image: url("assets/img/join-card-bg.png");
  background-color: #020a14;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(0, 135, 255, 0.22);
}

.conference-card .action-icon {
  font-size: 1.6rem;
  color: currentColor;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18));
}

.conference-card h2 {
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.conference-card p {
  margin: 0;
  color: #d6d8de;
  font-size: 0.9rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.conference-card label {
  color: #d6d8de;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.conference-card input {
  background: rgba(8, 10, 14, 0.62);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f4f4f6;
  backdrop-filter: blur(4px);
}

.conference-recording-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Conference room mode */
.watch-room.conference-mode .video-shell {
  position: relative;
  background:
    /* lava/ember glow rising from bottom */
    radial-gradient(ellipse 140% 50% at 50% 100%, rgba(237, 27, 27, 0.14), transparent 60%),
    /* subtle blue sci-fi accent at top */
    radial-gradient(ellipse 80% 35% at 50% 0%, rgba(60, 100, 255, 0.05), transparent 55%),
    /* center ambient red pulse */
    radial-gradient(circle at 50% 45%, rgba(237, 27, 27, 0.05), transparent 45%),
    /* translucent dark base — ~85% transparent so lava shows through */
    rgba(8, 10, 18, 0.15);
}

/* Conference stage — dark glass panel */
.watch-room.conference-mode .stage {
  background:
    radial-gradient(ellipse 100% 30% at 50% 100%, rgba(237, 27, 27, 0.03), transparent 50%),
    rgba(6, 8, 14, 0.15);
  backdrop-filter: blur(0);
  border: 1px solid rgba(237, 27, 27, 0.06);
  box-shadow: 0 0 60px rgba(237, 27, 27, 0.04);
}

/* Active screen-share hides the placeholder */
.stage.has-active-share .video-placeholder {
  display: none !important;
}

/* Dim the screen area when nothing is shared — overlay behind camera popup */
.stage:not(.has-active-share) .video-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.watch-room.conference-mode .participant-section {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 0;
  background:
    radial-gradient(ellipse 130% 40% at 50% 100%, rgba(255, 50, 70, 0.025), transparent 50%);
  backdrop-filter: none;
  box-shadow: none;
  padding: 12px;
}

/* ---------- Conference participant grid ---------- */
.watch-room.conference-mode .participant-strip {
  display: grid;
  gap: 12px;
  padding: 20px;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow: visible;
  align-content: center;
  justify-items: stretch;
}

/* 1 participant — single large tile centered, fills stage */
.watch-room.conference-mode .participant-strip.conf-1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  justify-content: center;
}

/* 2 participants — 50/50 split, fills stage */
.watch-room.conference-mode .participant-strip.conf-2 {
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
  gap: 14px;
}

/* 3 participants — 1 wide on top, 2 below */
.watch-room.conference-mode .participant-strip.conf-3a {
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
  gap: 12px;
}
.watch-room.conference-mode .participant-strip.conf-3a .participant-tile:first-child {
  grid-column: 1 / -1;
  max-width: 720px;
  width: 100%;
  justify-self: center;
}


/* 4 participants — 2x2 grid, fills stage */
.watch-room.conference-mode .participant-strip.conf-4 {
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
  gap: 12px;
}

/* 5-6 participants — 3 columns */
.watch-room.conference-mode .participant-strip.conf-5-6 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 100%;
  gap: 10px;
}

/* 7-8 participants — 4 columns */
.watch-room.conference-mode .participant-strip.conf-7-8 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 100%;
  gap: 8px;
}

/* ---------- Conference participant tiles ---------- */
.watch-room.conference-mode .participant-tile {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 77, 95, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

/* Self glow */
.watch-room.conference-mode .participant-tile.is-self {
  border-color: rgba(100, 200, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.2), 0 0 18px rgba(100, 200, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Host badge in tiles */
.watch-room.conference-mode .participant-badge-host {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffd966;
  background: rgba(0, 0, 0, 0.65);
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

/* Speaking — red laser outline */
.watch-room.conference-mode .participant-tile.is-speaking {
  border-color: #ff1a1a;
  box-shadow: 0 0 0 2px rgba(255, 26, 26, 0.5), 0 0 20px rgba(255, 26, 26, 0.15), 0 0 40px rgba(255, 26, 26, 0.07), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Mic on, not speaking — thin blue outline */
.watch-room.conference-mode .participant-tile.is-silent {
  border-color: rgba(60, 140, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(60, 140, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Camera-off tile polish */
.watch-room.conference-mode .participant-tile.is-camera-off .participant-avatar {
  background: radial-gradient(circle at 50% 40%, rgba(255, 77, 95, 0.1), #0a0d15 70%);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 2.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mic-muted indicator */
.watch-room.conference-mode .participant-tile.is-muted .participant-status-icon {
  color: #ff6666;
}

/* Per-participant local mute button */
.watch-room.conference-mode .participant-mute-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  padding: 0;
  color: #f5f7fb;
  background: rgba(0, 0, 0, 0.55);
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  transition: background 160ms ease, border-color 160ms ease;
}

.watch-room.conference-mode .participant-mute-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.75);
}

.watch-room.conference-mode .participant-mute-button i {
  pointer-events: none;
}

/* Cap notice */
.watch-room.conference-mode .participant-cap-notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  text-align: center;
}

/* Conference empty state */
.watch-room.conference-mode .participant-empty {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 480px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

/* Conference control bar — more anchored */
.watch-room.conference-mode .floating-controls {
  bottom: 14px;
  padding: 10px 22px;
  border-color: rgba(255, 77, 95, 0.12);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 77, 95, 0.08);
}

.watch-room.conference-mode .screen-share-status,
.watch-room.conference-mode .device-status,
.watch-room.conference-mode .participant-section-heading {
  display: none;
}

/* Conference mode — top bar & chat polish */
.watch-room.conference-mode .stage-header {
  background: rgba(8, 10, 18, 0.15);
  border: 1px solid rgba(237, 27, 27, 0.06);
  border-radius: 8px;
  backdrop-filter: blur(0);
}

.watch-room.conference-mode .chat-panel {
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(237, 27, 27, 0.06);
  backdrop-filter: blur(0);
}

.watch-room.conference-mode .chat-window {
  background: transparent;
}

.watch-room.conference-mode .chat-form {
  background: rgba(10, 13, 22, 0.15);
  border: 1px solid rgba(237, 27, 27, 0.08);
  border-radius: 8px;
}

/* Watch-party (non-conference) room — same ~85% transparent glass */
.watch-room:not(.conference-mode) .room-topbar {
  background: rgba(18, 23, 33, 0.15);
  backdrop-filter: blur(0);
}

.watch-room:not(.conference-mode) .chat-panel {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(0);
}

.walkthrough-card {
  position: relative;
  width: min(520px, calc(100% - 30px));
}

.walkthrough-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
}

.walkthrough-close:hover,
.walkthrough-close:focus-visible {
  border-color: rgba(255, 63, 63, 0.62);
  outline: none;
  color: #ff5454;
}

@media (max-width: 900px) {
  .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .managed-room-card {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .managed-room-settings {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
    padding-top: 16px;
    padding-left: 0;
  }

}

@media (max-width: 700px) {
  .settings-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .workspace-panel {
    padding-top: 24px;
  }

  .managed-room-card {
    grid-template-columns: 1fr;
  }

  .managed-room-cover {
    width: 100%;
  }

  .activity-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (max-width: 1180px) {
  .feature-callouts {
    max-width: 100%;
  }

  .feature-callouts article {
    padding-inline: 10px;
  }

  .hero-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-footer > p {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .hero-sidebar {
    position: relative;
    width: 100%;
    height: 76px;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 82, 82, 0.2);
  }

  .eh-logo-frame {
    width: 56px;
    height: 56px;
    margin: 6px 14px;
  }

  .eh-logo {
    width: 56px;
    height: 56px;
  }

  .sidebar-nav {
    display: flex;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
  }

  .sidebar-item {
    grid-template-columns: 24px auto;
    min-width: max-content;
    min-height: 75px;
    border-bottom: 2px solid transparent;
    border-left: 0;
    padding: 0 14px;
  }

  .sidebar-item.is-active {
    border-bottom-color: #ff2929;
    border-left-color: transparent;
  }

  .hero-main {
    margin-left: 0;
    background-position: center, 72% top;
  }

  .hero-content {
    width: min(100% - 28px, 1440px);
  }

  .feature-callouts {
    grid-template-columns: repeat(5, 160px);
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-main .recent-room {
    min-width: 0;
  }

  .hero-main .recent-room-actions {
    flex-wrap: wrap;
    padding: 8px 12px 12px;
  }
}

/* Room page sidebar — mirrors hero-sidebar but with links */
.room-sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: 126px;
  flex-direction: column;
  border-right: 1px solid rgba(255, 82, 82, 0.18);
  background:
    linear-gradient(180deg, rgba(4, 5, 7, 0.98), rgba(10, 11, 15, 0.97)),
    #050608;
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.4);
}

.room-sidebar .eh-logo-frame {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 18px auto 22px;
  filter: drop-shadow(0 0 18px rgba(255, 31, 31, 0.32));
}

.room-sidebar .eh-logo {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.room-sidebar .sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 4px 7px;
}

.room-sidebar .sidebar-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 64px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  padding: 0 10px;
  color: #d4d5da;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 860;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.sidebar-item span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.room-sidebar .sidebar-item i {
  color: #f4f4f6;
  font-size: 1.28rem;
  text-align: center;
}

.room-sidebar .sidebar-item:hover,
.room-sidebar .sidebar-item:focus-visible {
  border-color: rgba(255, 59, 59, 0.5);
  border-left-color: #ff3535;
  color: #fff;
  outline: none;
  background:
    linear-gradient(90deg, rgba(255, 27, 27, 0.11), rgba(255, 27, 27, 0.015));
  box-shadow:
    inset 0 0 0 1px rgba(255, 91, 91, 0.06),
    inset 8px 0 18px rgba(255, 12, 12, 0.08),
    0 0 17px rgba(255, 17, 17, 0.12);
  transform: translateX(2px);
}

.room-sidebar .sidebar-item:hover i,
.room-sidebar .sidebar-item:focus-visible i {
  color: #ff6464;
  filter: drop-shadow(0 0 7px rgba(255, 37, 37, 0.72));
}

.room-sidebar .sidebar-item.is-active {
  border-color: rgba(255, 81, 81, 0.72);
  border-left-color: #ff3a32;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(211, 9, 16, 0.94), rgba(130, 0, 8, 0.72) 62%, rgba(75, 0, 5, 0.42)),
    radial-gradient(circle at 12% 50%, rgba(255, 108, 75, 0.58), transparent 56%);
  box-shadow:
    inset 0 1px 0 rgba(255, 183, 170, 0.28),
    inset 12px 0 30px rgba(255, 72, 43, 0.2),
    0 0 24px rgba(255, 0, 0, 0.34),
    7px 0 30px rgba(255, 0, 0, 0.13);
}

.sidebar-item.is-active span {
  text-shadow: 0 0 8px rgba(255, 190, 180, 0.45), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.room-sidebar .sidebar-item.is-active i {
  color: #fff;
  filter: drop-shadow(0 0 7px rgba(255, 218, 208, 0.86));
}

.room-sidebar .sidebar-item.is-active:hover,
.room-sidebar .sidebar-item.is-active:focus-visible {
  transform: none;
}

/* Room sidebar responsive */
@media (max-width: 900px) {
  .room-sidebar {
    position: relative;
    width: 100%;
    height: 76px;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 82, 82, 0.2);
  }

  .room-sidebar .eh-logo-frame {
    width: 56px;
    height: 56px;
    margin: 6px 14px;
  }

  .room-sidebar .eh-logo {
    width: 56px;
    height: 56px;
  }

  .room-sidebar .sidebar-nav {
    display: flex;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
  }

  .room-sidebar .sidebar-item {
    grid-template-columns: 24px auto;
    min-width: max-content;
    min-height: 75px;
    border-bottom: 2px solid transparent;
    border-left: 0;
    padding: 0 14px;
  }

  .room-sidebar .sidebar-item.is-active {
    border-bottom-color: #ff2929;
    border-left-color: transparent;
  }
}

@media (max-width: 520px) {
  .room-sidebar .sidebar-item span {
    display: none;
  }

  .room-sidebar .sidebar-item {
    min-width: 54px;
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}

@media (max-width: 900px) {
  .hero-main {
    margin-left: 0;
    background-position: center, 72% top;
  }

  .hero-content {
    width: min(100% - 28px, 1440px);
  }

  .feature-callouts {
    grid-template-columns: repeat(5, 160px);
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-main .recent-room {
    min-width: 0;
  }

  .hero-main .recent-room-actions {
    flex-wrap: wrap;
    padding: 8px 12px 12px;
  }

  .watch-room {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .dashboard-top {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-top .header-right {
    justify-content: flex-end;
    margin-left: 0;
    padding-top: 8px;
  }

  .hero-main .account-panel {
    width: 100%;
  }

  .hero-title-block > p {
    line-height: 1.35;
  }

  .hero-title-block .chaos-accent {
    margin-left: 12px;
  }

  .hero-main .lobby-actions {
    grid-template-columns: 1fr;
  }

  .hero-main .recent-room-link {
    gap: 8px;
  }

  .recent-room-thumb {
    height: 90px;
  }

  .hero-main .recent-room-code {
    padding: 0 12px 6px;
  }

  .hero-footer {
    grid-template-columns: 1fr;
    padding-inline: 18px;
  }

  .hero-footer > p {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  .sidebar-item span {
    display: none;
  }

  .sidebar-item {
    min-width: 54px;
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .hero-content {
    width: min(100% - 18px, 1440px);
  }

  .hero-title-block .chaos-accent {
    margin-left: 0;
    font-size: clamp(1.55rem, 9vw, 2.25rem);
  }

  .hero-main .account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-main .account-panel .secondary-button {
    width: 100%;
  }

  .hero-main .lobby-card {
    padding: 19px 18px;
  }

  .hero-main .recent-room-link {
    gap: 6px;
  }

  .recent-room-thumb {
    height: 70px;
  }

  .hero-main .recent-room-code {
    padding: 0 10px 4px;
  }
}

/* ========= Recording UI ========= */

.recording-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #ed1b1b;
  margin-left: 8px;
  white-space: nowrap;
}

.recording-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed1b1b;
  animation: recording-pulse 1.2s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

#record-toggle.is-active {
  color: #ed1b1b;
}

#record-toggle.is-active i {
  animation: recording-pulse 1.2s ease-in-out infinite;
}

/* Recording banner */
.recording-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  max-width: 620px;
  width: fit-content;
  background: linear-gradient(135deg, rgba(237, 27, 27, 0.18), rgba(237, 27, 27, 0.12));
  border: 1px solid rgba(237, 27, 27, 0.35);
  border-radius: 999px;
  color: #ff6b6b;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(237, 27, 27, 0.25);
  white-space: nowrap;
}

.recording-banner i {
  font-size: 0.8rem;
  animation: recording-pulse 1.2s ease-in-out infinite;
}

/* Recording modal cards */
.recording-card {
  max-width: 420px;
}

.recording-mode-tabs {
  display: flex;
  gap: 0;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.recording-mode-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.recording-mode-tab:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.recording-mode-tab.is-active {
  background: rgba(237, 27, 27, 0.15);
  color: #ed1b1b;
}

.recording-mode-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.recording-mode-panel {
  margin-bottom: 12px;
}

.recording-mode-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
  line-height: 1.5;
}

.recording-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recording-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.recording-option:hover:not(.recording-option-disabled) {
  background: rgba(237, 27, 27, 0.06);
  border-color: rgba(237, 27, 27, 0.2);
}

.recording-option.is-selected {
  background: rgba(237, 27, 27, 0.1);
  border-color: rgba(237, 27, 27, 0.4);
}

.recording-option input[type="radio"] {
  accent-color: #ed1b1b;
}

.recording-option-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.recording-option-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

.recording-option-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.recording-option-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  margin-top: 4px;
}

.recording-type-info {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(237, 27, 27, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(237, 27, 27, 0.1);
}

/* File Condenser */
.files-grid {
  display: grid;
  gap: 18px;
}

.file-condenser-card {
  display: grid;
  gap: 18px;
  max-width: 860px;
}

.fc-header p {
  margin-bottom: 0;
}

.fc-dropzone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 170ms ease, background 170ms ease;
}

.fc-dropzone:hover,
.fc-dropzone:focus-visible,
.fc-dropzone.fc-drag-over {
  border-color: rgba(255, 70, 91, 0.55);
  background: rgba(255, 70, 91, 0.06);
  outline: none;
}

.fc-dropzone i {
  font-size: 2.4rem;
  color: rgba(255, 70, 91, 0.45);
}

.fc-dropzone p {
  margin: 0;
  font-size: 0.92rem;
}

.fc-dropzone strong {
  color: #fff;
}

.fc-dropzone.has-file {
  border-color: rgba(56, 217, 150, 0.35);
  min-height: 80px;
  padding: 14px;
}

.fc-dropzone.has-file i {
  font-size: 1.4rem;
}

.fc-presets {
  display: grid;
  gap: 6px;
}

.fc-presets select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #090d14;
  font: inherit;
  cursor: pointer;
  appearance: auto;
}

.fc-presets select:focus {
  outline: 2px solid rgba(255, 77, 95, 0.34);
  outline-offset: 2px;
}

.fc-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.fc-preview-col {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.fc-preview-col h3 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fc-preview-frame {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px,
    #090d14;
}

.fc-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.fc-format-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  border-radius: 6px;
  padding: 3px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.fc-arrow {
  display: grid;
  place-items: center;
  align-self: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.fc-meta {
  display: grid;
  gap: 3px;
  font-size: 0.82rem;
}

.fc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}

.fc-detail {
  color: var(--muted);
}

.fc-savings {
  font-weight: 800;
}

.fc-savings.is-positive {
  color: var(--ok);
}

.fc-savings.is-negative {
  color: #ffb3bd;
}

.fc-format-row {
  display: grid;
  gap: 8px;
}

.fc-format-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fc-format-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.84rem;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.fc-format-option:hover {
  border-color: rgba(255, 70, 91, 0.4);
  color: var(--text);
}

.fc-format-option:has(input:checked) {
  border-color: rgba(255, 70, 91, 0.6);
  color: #fff;
  background: rgba(255, 70, 91, 0.1);
}

.fc-format-option input {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}

.fc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .fc-compare {
    grid-template-columns: 1fr;
  }

  .fc-arrow {
    transform: rotate(90deg);
  }
}

/* Temporary local notices belong over the room, not permanently inside chat. */
.local-toast-stack {
  position: absolute;
  z-index: 40;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 24px));
  pointer-events: none;
}

.local-toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  justify-self: end;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: #f4f6fa;
  background: rgba(8, 10, 15, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  font-size: 0.76rem;
  line-height: 1.35;
  animation: herolink-toast-in 160ms ease-out;
}

.local-toast i {
  margin-top: 2px;
  color: #ff5a6d;
}

.local-toast.is-leaving {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 300ms ease, transform 300ms ease;
}

@keyframes herolink-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .local-toast-stack {
    top: 8px;
    right: 8px;
    width: calc(100% - 16px);
  }
}
