:root {
  color-scheme: dark;
  --panel: rgba(15, 18, 28, 0.88);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f9fbff;
  --muted: #aeb8d4;
  --soft: #77829f;
  --cyan: #29d9ff;
  --green: #4be69f;
  --pink: #ff4d9d;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 16% 8%, rgba(41, 217, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 90% 88%, rgba(255, 77, 157, 0.16), transparent 22rem),
    linear-gradient(145deg, #07080d 0%, #13172a 46%, #06171c 100%);
  background-size: 48px 48px, auto, auto, auto;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(18px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate div {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 28, 0.96);
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.auth-gate strong {
  font-size: 24px;
}

.auth-gate span {
  color: var(--muted);
}

.auth-gate a {
  min-height: 44px;
  border-radius: 8px;
  color: #041116;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  text-decoration: none;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.cinema-app {
  min-height: 100vh;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(92px, auto) 1fr minmax(130px, auto);
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.home-link,
.control-button,
.video-form button,
.text-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.home-link {
  justify-self: start;
  padding: 10px 14px;
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 118px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 0 12px rgba(40, 213, 255, 0.34));
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.profile {
  justify-self: end;
  min-width: 0;
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
}

.profile span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(75, 230, 159, 0.8);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.rooms-panel,
.watch-panel,
.panel-block {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rooms-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-heading h1,
.screen-status h2,
.panel-block h3 {
  margin: 0;
}

.panel-heading h1 {
  font-size: 28px;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.room-list {
  display: grid;
  gap: 10px;
}

.room-card {
  width: 100%;
  min-height: 94px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  text-align: left;
  display: grid;
  gap: 9px;
}

.room-card:hover,
.room-card:focus-visible,
.room-card.active {
  border-color: rgba(41, 217, 255, 0.72);
  background: rgba(41, 217, 255, 0.12);
  outline: none;
}

.room-card.full:not(.active) {
  opacity: 0.58;
}

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

.room-card small {
  color: var(--muted);
  line-height: 1.35;
}

.room-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: 13px;
}

.capacity-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(75, 230, 159, 0.24);
  border-radius: 8px;
  background: rgba(75, 230, 159, 0.08);
}

.capacity-note strong,
.capacity-note span {
  display: block;
}

.capacity-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.watch-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
}

.screen-wrap {
  min-width: 0;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  gap: 14px;
}

.screen-status,
.panel-title-row,
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screen-status h2 {
  font-size: 26px;
}

.quality-pill,
.playback-state,
.panel-title-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.cinema-screen {
  position: relative;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16%),
    #05070b;
}

.cinema-screen > .player-layer,
.cinema-screen > #youtubePlayer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.cinema-screen > .player-layer,
.cinema-screen > #youtubePlayer {
  display: none;
  border: 0;
  background: #05070b;
}

.cinema-screen > .player-layer.active,
.cinema-screen > #youtubePlayer.active {
  display: block;
}

#youtubePlayer iframe {
  display: block;
  width: 100%;
  height: 100%;
}

#nativePlayer {
  object-fit: contain;
}

.embed-notice {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: none;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(14px);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.embed-notice.visible {
  display: grid;
}

.embed-notice strong {
  color: var(--text);
}

.empty-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(120deg, rgba(41, 217, 255, 0.09), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 11px),
    #05070b;
}

.empty-screen strong {
  max-width: 520px;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.05;
}

.empty-screen span {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.5;
}

.empty-screen.hidden {
  display: none;
}

.control-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 950;
}

.control-button {
  min-height: 44px;
  padding: 0 16px;
}

.side-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.3);
  display: grid;
  align-content: start;
}

.panel-block {
  border-width: 0 0 1px;
  box-shadow: none;
  background: transparent;
  padding: 18px;
}

.seat-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seat {
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  display: grid;
  align-content: center;
  gap: 5px;
}

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

.seat small {
  color: var(--soft);
}

.seat.empty {
  border-style: dashed;
  color: var(--soft);
}

.video-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.video-form input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.video-form input:focus {
  border-color: rgba(41, 217, 255, 0.72);
}

.video-form button {
  height: 44px;
  padding: 0 14px;
  background: linear-gradient(135deg, rgba(41, 217, 255, 0.9), rgba(75, 230, 159, 0.9));
  color: #041116;
  border-color: transparent;
}

.source-help {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
}

.form-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.queue-block {
  border-bottom: 0;
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
}

.queue-list {
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.queue-thumb {
  width: 74px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(41, 217, 255, 0.2), rgba(75, 230, 159, 0.14)),
    #05070b;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.queue-item img {
  width: 74px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #05070b;
}

.queue-item strong,
.queue-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item small {
  margin-top: 3px;
  color: var(--soft);
}

.queue-item button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 950;
}

.queue-empty {
  color: var(--soft);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .layout,
  .watch-panel {
    grid-template-columns: 1fr;
  }

  .rooms-panel {
    order: 2;
  }

  .side-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-block {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .panel-block:last-child {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .cinema-app {
    padding: 10px;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .brand,
  .profile,
  .home-link {
    justify-self: stretch;
  }

  .brand {
    justify-content: flex-start;
  }

  .profile {
    max-width: none;
  }

  .screen-wrap,
  .rooms-panel,
  .panel-block {
    padding: 14px;
  }

  .screen-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .cinema-screen {
    min-height: 200px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .panel-block {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .video-form {
    grid-template-columns: 1fr;
  }

  .video-form button {
    width: 100%;
  }
}

/* PATCH_V1002_VIRTUAL_CINEMA_ROOM */
body {
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 115%, rgba(128, 13, 20, 0.55), transparent 38%),
    radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.055), transparent 34%),
    linear-gradient(180deg, #020203 0%, #070707 48%, #000000 100%);
}

.cinema-app {
  position: relative;
  min-height: 100vh;
  padding: 14px;
  display: block;
}

.topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 10;
  min-height: 56px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(5, 5, 7, 0.66);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.layout {
  position: relative;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 28px);
}

.rooms-panel {
  position: relative;
  z-index: 8;
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.78), rgba(7, 7, 10, 0.92)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.56);
}

.watch-panel {
  position: relative;
  display: block;
  min-height: calc(100vh - 28px);
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(255, 255, 255, 0.045), transparent 30%),
    linear-gradient(180deg, #020202 0%, #050505 52%, #000 100%);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.9);
}

.watch-panel::before,
.watch-panel::after {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 212px;
  width: 18%;
  z-index: 0;
  opacity: 0.72;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.075), transparent 2px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.075), transparent 2px),
    linear-gradient(180deg, #171719, #080809);
  background-size: 78px 100%, 100% 82px, auto;
}

.watch-panel::before {
  left: -3.5%;
  clip-path: polygon(0 0, 100% 16%, 100% 100%, 0 82%);
  transform: skewY(7deg);
}

.watch-panel::after {
  right: -3.5%;
  clip-path: polygon(0 16%, 100% 0, 100% 82%, 0 100%);
  transform: skewY(-7deg);
}

.screen-wrap {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 28px);
  padding: 0 26px 230px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: start;
  overflow: hidden;
}

.screen-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 11%;
  right: 11%;
  height: 150px;
  z-index: 0;
  pointer-events: none;
  clip-path: polygon(8% 0, 92% 0, 79% 100%, 21% 100%);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 0 2px, transparent 2px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.64) 0 2px, transparent 2px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  background-size: 118px 100%, 100% 36px, auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.28));
  opacity: 0.74;
}

.screen-wrap::after {
  content: "";
  position: fixed;
  left: -6%;
  right: -6%;
  bottom: -22px;
  height: 255px;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 16% 28% at 9% 100%, #b92731 0 42%, #48070d 72%, transparent 73%),
    radial-gradient(ellipse 19% 30% at 32% 100%, #b92731 0 42%, #48070d 72%, transparent 73%),
    radial-gradient(ellipse 19% 30% at 58% 100%, #b92731 0 42%, #48070d 72%, transparent 73%),
    radial-gradient(ellipse 18% 29% at 84% 100%, #b92731 0 42%, #48070d 72%, transparent 73%),
    radial-gradient(ellipse 10% 22% at 6% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 20% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 34% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 48% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 62% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 76% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 10% 22% at 90% 68%, #9d1d27 0 44%, #340407 76%, transparent 77%),
    radial-gradient(ellipse 7% 16% at 9% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 18% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 27% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 36% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 45% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 54% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 63% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 72% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 81% 38%, #7b161e 0 48%, #230304 78%, transparent 79%),
    radial-gradient(ellipse 7% 16% at 90% 38%, #7b161e 0 48%, #230304 78%, transparent 79%);
  filter: drop-shadow(0 -12px 20px rgba(0, 0, 0, 0.88));
}

.screen-status {
  position: relative;
  z-index: 5;
  width: min(1080px, 76%);
  margin: 92px auto 10px;
  padding: 0 2px;
}

.screen-status h2 {
  font-size: 22px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.quality-pill,
.playback-state,
.panel-title-row span {
  background: rgba(0, 0, 0, 0.56);
  border-color: rgba(255, 255, 255, 0.18);
}

.cinema-screen {
  z-index: 4;
  width: min(1080px, 76%);
  min-height: 0;
  margin: 0 auto;
  border: 10px solid #020202;
  border-radius: 2px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 34px rgba(255, 255, 255, 0.32),
    0 34px 95px rgba(0, 0, 0, 0.9);
}

.cinema-screen::before {
  content: "";
  position: absolute;
  inset: -18px -24px;
  z-index: -1;
  background: #000;
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.04);
}

.empty-screen {
  background: #f7f7f2;
  color: #151515;
}

.empty-screen span {
  color: #40444c;
}

.control-row {
  position: absolute;
  left: 50%;
  bottom: 168px;
  z-index: 6;
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.72);
}

.icon-button,
.control-button {
  background: rgba(255, 255, 255, 0.12);
}

.side-panel {
  position: absolute;
  top: 86px;
  right: 14px;
  bottom: 22px;
  z-index: 7;
  width: min(350px, 30vw);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(5, 6, 10, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 72px rgba(0, 0, 0, 0.62);
}

.panel-block {
  border-color: rgba(255, 255, 255, 0.1);
}

.room-card,
.seat,
.queue-item {
  background: rgba(255, 255, 255, 0.075);
}

@media (max-width: 1280px) {
  .cinema-screen,
  .screen-status {
    width: min(960px, 70%);
  }

  .side-panel {
    width: min(320px, 32vw);
  }
}

@media (max-width: 1120px) {
  .cinema-app {
    padding: 10px;
  }

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

  .rooms-panel {
    order: 2;
  }

  .watch-panel {
    min-height: 720px;
  }

  .screen-wrap {
    min-height: 720px;
    padding-bottom: 220px;
  }

  .cinema-screen,
  .screen-status {
    width: min(880px, 86%);
  }

  .side-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
  }

  .watch-panel,
  .screen-wrap {
    min-height: 620px;
  }

  .screen-wrap {
    padding: 0 10px 184px;
  }

  .screen-wrap::before {
    left: 2%;
    right: 2%;
    height: 96px;
  }

  .watch-panel::before,
  .watch-panel::after {
    display: none;
  }

  .screen-status {
    width: 94%;
    margin-top: 64px;
  }

  .cinema-screen {
    width: 94%;
    border-width: 6px;
  }

  .control-row {
    bottom: 130px;
    max-width: calc(100% - 20px);
    border-radius: 8px;
  }

  .side-panel {
    grid-template-columns: 1fr;
    margin: 10px;
  }
}

@media (min-width: 761px) and (max-width: 1400px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .watch-panel {
    order: 1;
    overflow: visible;
  }

  .rooms-panel {
    order: 2;
  }

  .cinema-screen,
  .screen-status {
    width: min(920px, 62vw);
  }

  .screen-status {
    margin-top: 42px;
  }

  .screen-wrap::before {
    height: 118px;
  }

  .control-row {
    bottom: 188px;
    padding: 6px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .control-button {
    min-height: 38px;
  }

  .side-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* PATCH_V1004_CHILLSCREEN_IMMERSIVE_THEATER */

html {
  background: #020207;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(1, 2, 9, 0.3) 0%, rgba(1, 2, 8, 0.08) 46%, rgba(2, 1, 8, 0.42) 100%),
    url("chillscreen-theater-bg.png?v=1") center center / cover fixed no-repeat,
    #03040a;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 2, 8, 0.58), transparent 18%, transparent 82%, rgba(1, 2, 8, 0.62)),
    radial-gradient(ellipse at 50% 35%, transparent 24%, rgba(0, 0, 6, 0.16) 68%, rgba(0, 0, 4, 0.54) 100%);
}

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

.theater-atmosphere::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: min(56vw, 1120px);
  height: 58vh;
  transform: translateX(-50%);
  clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(91, 220, 255, 0.08), transparent 62%);
  filter: blur(18px);
  opacity: 0.72;
}

.aisle-glow {
  position: absolute;
  bottom: -8vh;
  width: 4px;
  height: 50vh;
  background: linear-gradient(180deg, transparent, rgba(255, 177, 73, 0.82));
  box-shadow: 0 0 8px rgba(255, 174, 68, 0.9), 0 0 28px rgba(255, 88, 171, 0.48);
  opacity: 0.72;
}

.aisle-glow-left {
  left: 22%;
  transform: rotate(23deg);
  transform-origin: bottom;
}

.aisle-glow-right {
  right: 22%;
  transform: rotate(-23deg);
  transform-origin: bottom;
}

.cinema-app {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100dvh;
  padding: 14px;
  background: transparent;
}

.topbar {
  position: relative;
  inset: auto;
  z-index: 20;
  min-height: 74px;
  padding: 8px 14px;
  border: 1px solid rgba(116, 207, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(4, 7, 20, 0.88), rgba(8, 7, 25, 0.7), rgba(4, 7, 20, 0.88));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38), inset 0 -1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(125%);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #29d8ff, #ff4da6, transparent);
  box-shadow: 0 0 12px rgba(63, 211, 255, 0.66);
}

.brand {
  gap: 10px;
}

.brand-logo {
  width: 128px;
  height: 64px;
  border-radius: 6px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(40, 213, 255, 0.34));
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand small {
  color: #aebbd5;
  font-size: 11px;
}

.home-link,
.profile {
  border: 1px solid rgba(148, 198, 255, 0.22);
  border-radius: 7px;
  background: rgba(17, 22, 42, 0.76);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.home-link {
  padding: 10px 14px;
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: clamp(230px, 15vw, 286px) minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100dvh - 102px);
  margin-top: 14px;
}

.rooms-panel,
.side-panel {
  border: 1px solid rgba(112, 193, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 12, 29, 0.88), rgba(7, 6, 20, 0.76)),
    radial-gradient(circle at top, rgba(63, 194, 255, 0.1), transparent 50%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(24px) saturate(125%);
}

.rooms-panel {
  position: relative;
  z-index: 10;
  order: 0;
  display: flex;
  min-height: calc(100dvh - 116px);
  padding: 16px;
  overflow: hidden;
}

.panel-heading {
  display: block;
}

.panel-heading h1 {
  font-size: 23px;
}

.eyebrow {
  color: #66e7ff;
}

.room-list {
  gap: 10px;
}

.room-card {
  position: relative;
  min-height: 102px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(27, 33, 59, 0.92), rgba(12, 12, 28, 0.88));
}

.room-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(#2ce1ff, #ff4baf);
  opacity: 0.34;
}

.room-card:hover,
.room-card.active {
  transform: translateX(3px);
  border-color: rgba(63, 218, 255, 0.62);
  background: linear-gradient(145deg, rgba(19, 67, 88, 0.9), rgba(30, 14, 57, 0.9));
  box-shadow: 0 0 22px rgba(40, 213, 255, 0.13);
}

.room-card.active::before {
  opacity: 1;
  box-shadow: 0 0 12px #35dcff;
}

.capacity-note {
  margin-top: auto;
  border-color: rgba(255, 181, 75, 0.24);
  background: rgba(26, 16, 23, 0.72);
}

.watch-panel {
  position: relative;
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(290px, 19vw, 350px);
  gap: 14px;
  min-width: 0;
  min-height: calc(100dvh - 116px);
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.watch-panel::before,
.watch-panel::after,
.screen-wrap::after {
  display: none;
}

.screen-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: calc(100dvh - 116px);
  padding: clamp(8px, 1.4vh, 18px) 10px clamp(185px, 22vh, 270px);
  overflow: visible;
}

.screen-wrap::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 50%;
  z-index: -1;
  display: block;
  width: min(70vw, 1240px);
  height: min(58vh, 720px);
  transform: translateX(-50%);
  clip-path: none;
  background: radial-gradient(ellipse, rgba(124, 217, 255, 0.17), rgba(255, 60, 169, 0.05) 48%, transparent 72%);
  filter: blur(24px);
  opacity: 0.8;
}

.screen-status {
  position: relative;
  z-index: 6;
  width: min(1120px, 84%);
  margin: 0 auto 9px;
  padding: 7px 12px;
  border: 1px solid rgba(115, 196, 255, 0.16);
  border-radius: 7px;
  background: rgba(5, 8, 22, 0.66);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.screen-status h2 {
  font-size: clamp(18px, 1.3vw, 24px);
}

.quality-pill {
  color: #8cecff;
  border-color: rgba(77, 218, 255, 0.28);
  background: rgba(7, 19, 35, 0.8);
}

.cinema-screen {
  position: relative;
  z-index: 5;
  width: min(1120px, 84%);
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border: 5px solid #070911;
  border-radius: 5px;
  background: #070910;
  box-shadow:
    0 0 0 1px rgba(185, 231, 255, 0.42),
    0 0 18px rgba(40, 213, 255, 0.28),
    0 0 52px rgba(255, 58, 164, 0.12),
    0 34px 80px rgba(0, 0, 0, 0.72);
}

.cinema-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.065), transparent 18%, transparent 82%, rgba(104, 219, 255, 0.035));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.42);
}

/* PATCH_V1005_YOUTUBE_LAYER_VISIBILITY */

.empty-screen {
  color: #f8fbff;
  background:
    radial-gradient(circle at 50% 42%, rgba(48, 107, 166, 0.26), transparent 28%),
    linear-gradient(145deg, #090d19, #111124 48%, #080a13);
}

.empty-screen strong {
  font-size: clamp(20px, 2vw, 34px);
  text-shadow: 0 0 24px rgba(68, 213, 255, 0.22);
}

.empty-screen span {
  max-width: 620px;
  color: #acb7ce;
}

.control-row {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 7;
  transform: none;
  margin: 16px auto 0;
  padding: 7px;
  border: 1px solid rgba(114, 209, 255, 0.2);
  border-radius: 8px;
  background: rgba(5, 8, 21, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48), 0 0 24px rgba(48, 202, 255, 0.08);
  backdrop-filter: blur(18px);
}

.icon-button,
.control-button,
.text-button,
.video-form button {
  border-color: rgba(96, 215, 255, 0.26);
  background: linear-gradient(145deg, rgba(35, 53, 83, 0.94), rgba(24, 19, 53, 0.94));
}

.icon-button:hover,
.control-button:hover,
.text-button:hover,
.video-form button:hover {
  border-color: rgba(69, 227, 255, 0.64);
  background: linear-gradient(145deg, rgba(24, 110, 137, 0.96), rgba(80, 28, 105, 0.96));
  box-shadow: 0 0 18px rgba(51, 215, 255, 0.15);
}

.side-panel {
  position: relative;
  inset: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  height: calc(100dvh - 116px);
  overflow: auto;
}

.panel-block {
  padding: 16px;
  border-color: rgba(120, 193, 255, 0.12);
}

.panel-block h3 {
  font-size: 16px;
}

.seat-grid {
  gap: 8px;
}

.seat,
.queue-item {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(31, 34, 54, 0.9), rgba(16, 15, 31, 0.9));
}

.seat:not(.empty) {
  border-color: rgba(70, 225, 170, 0.3);
  box-shadow: inset 3px 0 rgba(62, 235, 181, 0.55);
}

.video-form input {
  border-color: rgba(112, 200, 255, 0.22);
  border-radius: 7px;
  background: rgba(3, 6, 17, 0.72);
}

.video-form input:focus {
  border-color: #42dcff;
  box-shadow: 0 0 0 3px rgba(66, 220, 255, 0.11);
}

.queue-block {
  flex: 1;
}

.queue-list {
  max-height: none;
}

@keyframes theater-screen-breathe {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(185, 231, 255, 0.38), 0 0 18px rgba(40, 213, 255, 0.22), 0 34px 80px rgba(0, 0, 0, 0.72);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 183, 226, 0.42), 0 0 26px rgba(40, 213, 255, 0.34), 0 0 58px rgba(255, 58, 164, 0.14), 0 34px 80px rgba(0, 0, 0, 0.72);
  }
}

.cinema-screen:has(.empty-screen:not(.hidden)) {
  animation: theater-screen-breathe 5s ease-in-out infinite;
}

@media (max-width: 1480px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .watch-panel {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .cinema-screen,
  .screen-status {
    width: min(920px, 92%);
  }
}

@media (max-width: 1180px) {
  body {
    background-position: center top;
  }

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

  .watch-panel {
    grid-template-columns: 1fr;
  }

  .screen-wrap {
    min-height: 720px;
    padding-bottom: 190px;
  }

  .rooms-panel {
    min-height: 0;
    order: 2;
  }

  .side-panel {
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background-size: auto 100vh;
    background-attachment: scroll;
  }

  .cinema-app {
    padding: 8px;
  }

  .topbar {
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 8px;
  }

  .brand {
    justify-self: end;
  }

  .brand-logo {
    width: 92px;
    height: 50px;
  }

  .brand > span,
  .profile {
    display: none;
  }

  .layout {
    min-height: 0;
    margin-top: 8px;
  }

  .watch-panel,
  .screen-wrap {
    min-height: 560px;
  }

  .screen-wrap {
    padding: 8px 0 150px;
  }

  .cinema-screen,
  .screen-status {
    width: 100%;
  }

  .screen-status {
    padding: 6px 8px;
  }

  .empty-screen {
    padding: 20px;
  }

  .empty-screen strong {
    font-size: 21px;
  }

  .empty-screen span {
    font-size: 12px;
  }

  .control-row {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .aisle-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-screen:has(.empty-screen:not(.hidden)) {
    animation: none;
  }
}

/* PATCH_V1006_CHILLSCREEN_FRONTEND_STABILITY */

html,
body {
  min-height: 100%;
  background-color: #02030a;
}

.cinema-app {
  min-height: 100dvh;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-right: max(18px, env(safe-area-inset-right));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left));
}

.auth-gate {
  padding-top: max(22px, env(safe-area-inset-top));
  padding-right: max(22px, env(safe-area-inset-right));
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  padding-left: max(22px, env(safe-area-inset-left));
}

.embed-notice {
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 760px) {
  .cinema-app {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
  }
}
