/* ==========================================================================
   Nobar — styles
   ========================================================================== */

:root {
  --bg: #070a10;
  --bg-soft: #0a0f18;
  --panel: #0d131f;
  --panel-2: #111927;
  --panel-3: #16202f;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #e9eef8;
  --text-soft: #c7d1e2;
  --muted: #8b98ad;
  --faint: #5f6d83;
  --accent: #7c6cff;
  --accent-bright: #9a8dff;
  --accent-2: #2fd7f2;
  --accent-soft: rgba(124, 108, 255, 0.13);
  --accent-line: rgba(124, 108, 255, 0.4);
  --ok: #3ddc97;
  --warn: #ffb86b;
  --danger: #ff6b81;
  --danger-soft: rgba(255, 107, 129, 0.11);
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(124, 108, 255, 0.35);
  color: #fff;
}

h1, h2, h3, p {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video, svg {
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.ambient-orb-a {
  width: 720px;
  height: 720px;
  top: -340px;
  left: -160px;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.35), transparent 68%);
}

.ambient-orb-b {
  width: 640px;
  height: 640px;
  right: -220px;
  top: 240px;
  background: radial-gradient(circle, rgba(47, 215, 242, 0.18), transparent 68%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
}

.ambient-room {
  opacity: 0.6;
}

.ambient-room .ambient-orb-a {
  width: 560px;
  height: 560px;
  top: -280px;
  left: 10%;
  opacity: 0.5;
}

.ambient-room .ambient-orb-b {
  width: 520px;
  height: 520px;
  right: -180px;
  top: 45%;
  opacity: 0.35;
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #8b7bff, #2fd7f2);
  color: #080b11;
  box-shadow: 0 8px 20px -8px rgba(124, 108, 255, 0.8);
}

.brand-mark .icon {
  width: 17px;
  height: 17px;
  margin-left: 1px;
}

.brand-mark-sm {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.brand-mark-sm .icon {
  width: 14px;
  height: 14px;
}

.brand-word {
  color: var(--text);
}

.brand-dot {
  color: var(--accent-bright);
}

.brand-sm {
  font-size: 1.05rem;
  gap: 9px;
}

.brand-sm .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.brand-sm .brand-mark .icon {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Buttons, fields, badges
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b7bff 0%, #6d5cf6 55%, #5a8ff7 100%);
  color: #fff;
  box-shadow: 0 12px 28px -12px rgba(124, 108, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 16px 34px -12px rgba(124, 108, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 107, 129, 0.3);
  color: #ff93a3;
}

.btn-danger:hover {
  background: rgba(255, 107, 129, 0.18);
  border-color: rgba(255, 107, 129, 0.5);
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  color: var(--text);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--faint);
  line-height: 1.4;
}

.field-error {
  font-size: 0.78rem;
  color: var(--danger);
}

input[type="text"],
input[type="url"],
input[type="password"],
select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(6, 10, 17, 0.7);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

input::placeholder {
  color: var(--faint);
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus {
  border-color: var(--accent-line);
  background: rgba(8, 12, 21, 0.9);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.12);
  outline: none;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%) rotate(90deg);
  color: var(--muted);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge .icon {
  width: 11px;
  height: 11px;
}

.badge-soft {
  background: rgba(148, 163, 184, 0.09);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge-owner {
  background: rgba(255, 184, 107, 0.12);
  border: 1px solid rgba(255, 184, 107, 0.25);
  color: #ffc98a;
}

.live-dot,
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: pulse 2.2s infinite;
  flex: none;
}

.pulse-dot {
  background: var(--accent-bright);
  box-shadow: 0 0 0 0 rgba(124, 108, 255, 0.6);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  65% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.eyebrow-muted {
  color: var(--muted);
}

.grad-text {
  background: linear-gradient(100deg, #c9c2ff 0%, #8b7bff 40%, #4be1f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Landing
   -------------------------------------------------------------------------- */

.landing-body {
  overflow-x: hidden;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-link {
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--muted);
  transition: color 0.16s ease;
}

.header-link:hover {
  color: var(--text);
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.72fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
  padding-top: clamp(36px, 7vh, 78px);
  padding-bottom: clamp(48px, 8vh, 96px);
}

.hero-copy {
  max-width: 660px;
  padding-top: 8px;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.75rem, 6.4vw, 4.7rem);
  font-weight: 800;
  line-height: 1.01;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 520px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(0.94rem, 1.4vw, 1.04rem);
  line-height: 1.65;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--text-soft);
}

.point-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(61, 220, 151, 0.12);
  color: var(--ok);
}

.point-check .icon {
  width: 11px;
  height: 11px;
}

/* Hero preview */

.hero-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.8fr);
  gap: 10px;
  margin-top: 44px;
  max-width: 590px;
  transform: perspective(1200px) rotateX(1deg);
}

.preview-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    radial-gradient(circle at 70% 30%, rgba(124, 108, 255, 0.22), transparent 55%),
    linear-gradient(145deg, #0c1220, #080c14);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.preview-glow {
  position: absolute;
  inset: 18% 12% auto;
  height: 45%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(47, 215, 242, 0.14), transparent 70%);
}

.preview-play {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(124, 108, 255, 0.9);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(124, 108, 255, 0.12);
}

.preview-play .icon {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.preview-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 21px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.preview-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.preview-live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6, 10, 17, 0.7);
  border: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-soft);
  backdrop-filter: blur(8px);
}

.preview-chat {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding-bottom: 4px;
}

.preview-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px 9px 9px 3px;
  background: rgba(13, 19, 31, 0.85);
  font-size: 0.66rem;
  color: var(--muted);
  box-shadow: 0 10px 20px -16px #000;
}

.preview-bubble-own {
  align-self: flex-end;
  border-radius: 9px 9px 3px 9px;
  border-color: rgba(124, 108, 255, 0.3);
  background: rgba(124, 108, 255, 0.13);
  color: #c9c2ff;
}

.preview-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 0.56rem;
  font-weight: 700;
  flex: none;
}

.pa-a {
  background: rgba(124, 108, 255, 0.2);
  color: #b3a8ff;
}

.pa-b {
  background: rgba(47, 215, 242, 0.15);
  color: #7ae6f7;
}

/* Create card */

.create-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 45%),
    rgba(11, 16, 26, 0.86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.create-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(124, 108, 255, 0.45), transparent 40%, rgba(47, 215, 242, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.create-card-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}

.create-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(124, 108, 255, 0.13);
  border: 1px solid rgba(124, 108, 255, 0.24);
  color: var(--accent-bright);
  flex: none;
}

.create-icon .icon {
  width: 18px;
  height: 18px;
}

.create-card h2 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.create-card-head p {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
}

#create-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--faint);
}

.form-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--warn);
  flex: none;
}

/* Rooms section */

.rooms-section {
  padding: 34px 0 20px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.85rem;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 19px;
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.032), transparent 55%),
    rgba(11, 16, 26, 0.7);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.room-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.room-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 108, 255, 0.35);
  background:
    linear-gradient(160deg, rgba(124, 108, 255, 0.07), transparent 55%),
    rgba(13, 19, 31, 0.85);
}

.room-card:hover::after {
  opacity: 1;
}

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-card-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--faint);
}

.room-card-live.is-live {
  color: var(--ok);
}

.room-card-live .live-dot {
  background: var(--faint);
  animation: none;
  box-shadow: none;
}

.room-card-live.is-live .live-dot {
  background: var(--ok);
  animation: pulse 2.2s infinite;
}

.room-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  color: var(--faint);
}

.room-card h3 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-card-now {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 0;
}

.room-card-now .icon {
  width: 13px;
  height: 13px;
  color: var(--accent-bright);
  flex: none;
}

.room-card-now span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 2px;
}

.room-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.68rem;
  color: var(--faint);
}

.room-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.room-card-meta .icon {
  width: 12px;
  height: 12px;
}

.room-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.room-card:hover .room-card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.room-card-arrow .icon {
  width: 14px;
  height: 14px;
}

.rooms-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.rooms-empty .icon {
  width: 26px;
  height: 26px;
  color: var(--faint);
}

.rooms-empty strong {
  font-size: 0.94rem;
  color: var(--text-soft);
}

.rooms-empty p {
  font-size: 0.8rem;
}

.skeleton-card {
  min-height: 168px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 26, 0.6);
  overflow: hidden;
  position: relative;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.5s infinite;
}

.skeleton-line {
  height: 11px;
  margin-bottom: 11px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.08);
}

.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-90 { width: 90%; height: 17px; }
.skeleton-line.w-55 { width: 55%; }

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 54px 0 70px;
}

.step-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 26, 0.45);
  overflow: hidden;
}

.step-number {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: rgba(124, 108, 255, 0.1);
  border: 1px solid rgba(124, 108, 255, 0.2);
  color: var(--accent-bright);
}

.step-icon .icon {
  width: 18px;
  height: 18px;
}

.step-card h3 {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.step-card p {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--faint);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.footer-year {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Room page
   -------------------------------------------------------------------------- */

.room-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.conn-banner {
  position: fixed;
  z-index: 80;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 184, 107, 0.3);
  border-radius: 999px;
  background: rgba(20, 16, 10, 0.92);
  color: #ffd09a;
  font-size: 0.76rem;
  font-weight: 550;
  box-shadow: 0 12px 30px -18px #000;
  backdrop-filter: blur(10px);
}

.conn-banner .icon {
  width: 15px;
  height: 15px;
  color: var(--warn);
}

.room-topbar {
  position: relative;
  z-index: 20;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 16, 0.72);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex: none;
}

.room-heading {
  min-width: 0;
}

.room-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.room-title-row h1 {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.room-viewers-text {
  font-size: 0.68rem;
  color: var(--faint);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.viewer-stack {
  display: flex;
  align-items: center;
  padding-right: 4px;
}

.viewer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid #0a0e16;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease;
}

.viewer-avatar:first-child {
  margin-left: 0;
}

.viewer-avatar:hover {
  transform: translateY(-2px);
  z-index: 2;
}

.viewer-avatar.is-owner {
  box-shadow: 0 0 0 1px rgba(255, 184, 107, 0.55);
}

.viewer-avatar-more {
  background: var(--panel-3);
  color: var(--muted);
}

.copy-btn .copy-label {
  white-space: nowrap;
}

.mobile-only {
  display: none !important;
}

/* Layout */

.room-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr) 340px;
  gap: 14px;
  padding: 14px 16px 16px;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 34%),
    rgba(10, 15, 24, 0.78);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.panel-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-eyebrow {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  font-family: var(--mono);
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel-foot {
  flex: none;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.drawer-close {
  display: none;
}

/* Video list */

.upload-section {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 14px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(124, 108, 255, 0.035);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent-line);
  background: rgba(124, 108, 255, 0.08);
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(124, 108, 255, 0.12);
  color: var(--accent-bright);
}

.dropzone-icon .icon {
  width: 17px;
  height: 17px;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropzone-text strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.dropzone-text span {
  font-size: 0.64rem;
  color: var(--faint);
}

.dropzone .btn {
  margin-top: 2px;
}

.upload-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 9px;
}

.upload-item {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(6, 10, 17, 0.5);
  animation: fade-up 0.2s ease;
}

.upload-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.upload-name {
  font-size: 0.67rem;
  color: var(--text-soft);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.upload-status {
  font-size: 0.6rem;
  color: var(--faint);
  font-family: var(--mono);
  white-space: nowrap;
}

.upload-item.is-done .upload-status {
  color: var(--ok);
}

.upload-item.is-error .upload-status {
  color: var(--danger);
}

.upload-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.upload-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.upload-item.is-done .upload-bar span {
  background: var(--ok);
}

.upload-item.is-error .upload-bar span {
  background: var(--danger);
}

.url-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.url-form input {
  height: 34px;
  padding: 0 10px;
  font-size: 0.68rem;
  border-radius: 8px;
}

.url-form .btn {
  padding: 6px 10px;
  font-size: 0.68rem;
}

.upload-note {
  margin-top: 7px;
  text-align: center;
  font-size: 0.6rem;
  color: var(--faint);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.video-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.video-item.is-active {
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.14), rgba(47, 215, 242, 0.05));
  border-color: rgba(124, 108, 255, 0.3);
}

.video-index {
  width: 18px;
  flex: none;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--faint);
  text-align: center;
}

.video-item.is-active .video-index {
  color: var(--accent-bright);
}

.video-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 34px;
  flex: none;
  border-radius: 7px;
  background: linear-gradient(145deg, #141b2a, #0c111b);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.video-thumb .icon {
  width: 12px;
  height: 12px;
}

.video-item.is-active .video-thumb {
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.35), rgba(47, 215, 242, 0.2));
  border-color: rgba(124, 108, 255, 0.4);
  color: #fff;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.video-name {
  font-size: 0.7rem;
  font-weight: 550;
  color: var(--text-soft);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-item.is-active .video-name {
  color: var(--text);
}

.video-meta {
  font-size: 0.58rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.video-item:hover .video-delete,
.video-delete:focus-visible {
  opacity: 1;
}

.video-delete:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.video-delete .icon {
  width: 14px;
  height: 14px;
}

.empty-videos {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.06);
  color: var(--faint);
}

.empty-icon .icon {
  width: 20px;
  height: 20px;
}

.empty-videos strong {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.empty-videos p {
  max-width: 200px;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--faint);
}

/* Stage */

.stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.player-frame {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 15, 24, 0.72);
  overflow: hidden;
  box-shadow: 0 24px 70px -40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: calc(100dvh - 270px);
  background: #030508;
  overflow: hidden;
  isolation: isolate;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030508;
  outline: none;
}

.player-shell.has-video video {
  position: relative;
  z-index: 1;
}

.player-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(124, 108, 255, 0.12), transparent 55%),
    #05070b;
}

.player-shell.has-video .player-empty {
  display: none;
}

.player-empty-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.player-empty-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(124, 108, 255, 0.16);
  animation: halo 3.5s ease-in-out infinite;
}

@keyframes halo {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 0.25; }
}

.player-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.85), rgba(47, 215, 242, 0.55));
  color: #fff;
  box-shadow: 0 16px 40px -16px rgba(124, 108, 255, 0.9);
}

.player-empty-icon .icon {
  width: 23px;
  height: 23px;
  margin-left: 3px;
}

.player-empty strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
}

.player-empty p {
  font-size: 0.75rem;
  color: var(--faint);
}

.player-top {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.sync-badge,
.control-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.72);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.sync-badge i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.sync-badge.is-synced {
  color: #9df3cc;
  border-color: rgba(61, 220, 151, 0.24);
}

.sync-badge.is-synced i {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.8);
}

.sync-badge.is-paused {
  color: #ffcf9e;
  border-color: rgba(255, 184, 107, 0.24);
}

.sync-badge.is-paused i {
  background: var(--warn);
}

.sync-badge.is-buffering,
.sync-badge.is-syncing {
  color: #b8b0ff;
  border-color: rgba(124, 108, 255, 0.3);
}

.sync-badge.is-buffering i,
.sync-badge.is-syncing i {
  background: var(--accent-bright);
  animation: blink 0.9s ease-in-out infinite;
}

.sync-badge.is-offline {
  color: #ff9daa;
  border-color: rgba(255, 107, 129, 0.3);
}

.sync-badge.is-offline i {
  background: var(--danger);
}

@keyframes blink {
  50% { opacity: 0.25; }
}

.control-badge {
  color: #ffc98a;
  border-color: rgba(255, 184, 107, 0.25);
}

.control-badge .icon {
  width: 11px;
  height: 11px;
}

.tap-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: rgba(4, 6, 10, 0.72);
  color: var(--text);
  text-align: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.tap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(124, 108, 255, 0.13);
  transition: transform 0.16s ease;
}

.tap-overlay:hover .tap-icon {
  transform: scale(1.06);
}

.tap-icon .icon {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.tap-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.tap-sub {
  max-width: 330px;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
}

.now-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 17px 14px;
  border-top: 1px solid var(--line);
}

.now-info {
  min-width: 0;
}

.now-info h2 {
  margin-top: 3px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-info p {
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-actions {
  display: flex;
  gap: 7px;
  flex: none;
}

.stage-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.62rem;
  color: var(--faint);
}

.stage-hint > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-hint-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.tiny-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}

.stage-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: auto;
}

.stage-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 15, 24, 0.55);
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease;
}

button.stage-tile:hover {
  border-color: rgba(124, 108, 255, 0.32);
  background: rgba(124, 108, 255, 0.06);
}

.stage-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: rgba(124, 108, 255, 0.1);
  border: 1px solid rgba(124, 108, 255, 0.18);
  color: var(--accent-bright);
}

.stage-tile-icon .icon {
  width: 15px;
  height: 15px;
}

.stage-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stage-tile-text strong {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
}

.stage-tile-text span {
  font-size: 0.63rem;
  color: var(--faint);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage-tile-action {
  margin-left: auto;
  flex: none;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.stage-tile-static {
  cursor: default;
}

/* Chat */

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: auto;
  padding: 30px 16px;
  text-align: center;
  color: var(--faint);
}

.chat-empty .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
  color: var(--faint);
}

.chat-empty strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.chat-empty p {
  font-size: 0.66rem;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: fade-up 0.18s ease;
}

.msg-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  margin-top: 1px;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  align-items: flex-start;
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  line-height: 1;
}

.msg-name {
  font-weight: 600;
  color: var(--text-soft);
}

.msg-owner {
  display: inline-flex;
  align-items: center;
  color: var(--warn);
}

.msg-owner .icon {
  width: 10px;
  height: 10px;
}

.msg-time {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.msg-text {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 7px 9px;
  border-radius: 3px 10px 10px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.07);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-soft);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg-text a {
  color: #9fd9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.msg-text a:hover {
  color: #c4eaff;
}

.msg.own {
  flex-direction: row-reverse;
}

.msg.own .msg-body {
  align-items: flex-end;
}

.msg.own .msg-head {
  flex-direction: row-reverse;
}

.msg.own .msg-text {
  border-radius: 10px 3px 10px 10px;
  background: rgba(124, 108, 255, 0.14);
  border-color: rgba(124, 108, 255, 0.22);
  color: #ded9ff;
}

.chat-system {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--faint);
  text-align: center;
  animation: fade-up 0.18s ease;
}

.chat-system .icon {
  width: 11px;
  height: 11px;
  color: var(--accent-bright);
  flex: none;
}

.typing-line {
  flex: none;
  height: 18px;
  padding: 0 16px;
  font-size: 0.62rem;
  font-style: italic;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-form {
  flex: none;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px 12px 6px;
}

.chat-form input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(6, 10, 17, 0.72);
  padding: 0 12px;
  font-size: 0.78rem;
  min-width: 0;
}

.chat-form input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.1);
  outline: none;
}

.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #8b7bff, #5a8ff7);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(124, 108, 255, 0.9);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.send-btn:hover {
  filter: brightness(1.08);
}

.send-btn:active {
  transform: scale(0.96);
}

.send-btn .icon {
  width: 17px;
  height: 17px;
  margin-right: 1px;
}

.chat-note {
  flex: none;
  padding: 0 12px 8px;
  text-align: center;
  font-size: 0.58rem;
  color: var(--faint);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 5, 9, 0.74);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

body.modal-open,
body.drawer-open {
  overflow: hidden;
}

.modal-card {
  width: min(440px, 100%);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 40%),
    #0c121d;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-card-sm {
  width: min(390px, 100%);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  margin-bottom: 20px;
}

.modal-head h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.modal-head p {
  margin-top: 5px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

.modal-head strong {
  color: var(--text-soft);
  font-weight: 600;
}

.modal-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(124, 108, 255, 0.12);
  border: 1px solid rgba(124, 108, 255, 0.22);
  color: var(--accent-bright);
}

.modal-icon .icon {
  width: 19px;
  height: 19px;
}

.modal-icon-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 107, 129, 0.25);
  color: var(--danger);
}

.modal-center {
  text-align: center;
}

.modal-center h2 {
  margin-bottom: 6px;
}

.modal-center p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

#name-form,
#settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-back-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--faint);
  transition: color 0.16s ease;
}

.modal-back-link:hover {
  color: var(--text-soft);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.danger-zone strong {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.danger-zone p {
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-root {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  position: relative;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(13, 19, 31, 0.96);
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 18px 40px -20px #000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-error::before {
  background: var(--danger);
}

.toast-success::before {
  background: var(--ok);
}

.toast-warn::before {
  background: var(--warn);
}

/* Scrollbars */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.34);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   Drawer overlay & responsive
   -------------------------------------------------------------------------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(3, 5, 9, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1280px) {
  .room-layout {
    grid-template-columns: 270px minmax(0, 1fr) 314px;
    gap: 12px;
    padding: 12px;
  }

  .now-actions .btn span {
    display: none;
  }

  .now-actions .btn {
    padding: 9px;
  }
}

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

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.8fr);
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .room-body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .room-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .stage {
    order: 1;
    width: 100%;
  }

  .player-shell {
    max-height: none;
  }

  .panel-videos,
  .panel-chat {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    width: min(360px, 88vw);
    height: 100dvh;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    background: #0a0f18;
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .panel-videos {
    position: static;
    order: 2;
    width: 100%;
    height: auto;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 34%),
      rgba(10, 15, 24, 0.78);
    transform: none;
    box-shadow: none;
  }

  .panel-videos .panel-body {
    overflow: visible;
  }

  .panel-videos .drawer-close {
    display: none;
  }

  #open-videos.mobile-only {
    display: none !important;
  }

  .panel-chat {
    right: 0;
    border-right: 0;
    border-radius: 0;
    transform: translateX(102%);
    box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.8);
  }

  .panel.is-open {
    transform: translateX(0);
  }

  .drawer-close {
    display: inline-flex;
  }

  .video-delete {
    opacity: 1;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  .stage-hint,
  .stage-footer {
    display: none;
  }

  .room-topbar {
    position: sticky;
    top: 0;
  }

  .toast-root {
    bottom: 14px;
  }
}

@media (max-width: 900px) {
  .container {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 72px;
  }

  .header-link {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 28px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-preview {
    max-width: 540px;
    margin-top: 34px;
  }

  .create-card {
    position: static;
  }

  .steps {
    grid-template-columns: 1fr;
    padding: 38px 0 54px;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .site-footer p {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
  }

  .header-actions {
    gap: 0;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .hero-points {
    gap: 8px 14px;
  }

  .hero-preview {
    grid-template-columns: 1fr;
  }

  .preview-chat {
    display: none;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head .btn span {
    display: none;
  }

  .room-topbar {
    height: 60px;
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-left {
    gap: 9px;
  }

  .topbar-divider {
    display: none;
  }

  .brand-sm .brand-word {
    display: none;
  }

  .room-title-row h1 {
    max-width: 40vw;
    font-size: 0.88rem;
  }

  .badge-owner {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .room-sub .badge {
    font-size: 0.6rem;
  }

  .viewer-stack {
    display: none;
  }

  .topbar-right {
    gap: 6px;
  }

  .copy-btn {
    padding-inline: 9px;
  }

  .copy-label {
    display: none;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .room-layout {
    padding: 9px;
    gap: 9px;
  }

  .player-frame {
    border-radius: 13px;
  }

  .player-shell {
    aspect-ratio: 16 / 10;
  }

  .player-empty p {
    max-width: 240px;
    font-size: 0.68rem;
  }

  .now-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 11px 13px 12px;
  }

  .now-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .now-actions .btn span {
    display: inline;
  }

  .now-actions .btn {
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .now-info h2 {
    font-size: 0.88rem;
  }

  .panel-videos,
  .panel-chat {
    width: min(340px, 92vw);
  }

  .modal-card {
    padding: 20px;
  }

  .toast-root {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}

@media (max-width: 400px) {
  .hero-points li {
    font-size: 0.74rem;
  }

  .create-card {
    padding: 20px;
  }

  .header-pill {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
