* {
  box-sizing: border-box
}

:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: #0d111a;
  --line: #263244;
  --cyan: #00d9ff;
  --purple: #7c4dff;
  --text: #eef5ff;
  --muted: #9aa8bc;
  --good: #3de6a3;
  --bad: #ff657a
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif
}

body {
  background-image: radial-gradient(ellipse at 80% 0%, #7c4dff1f, transparent 38%), radial-gradient(ellipse at 0% 15%, #00d9ff14, transparent 34%)
}

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

button,
input {
  font: inherit
}

.shell {
  width: min(1100px, calc(100% - 36px));
  margin: auto;
  padding: 24px 0 30px
}

.topbar,
.watch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700
}

.brand>span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.05
}

.brand b {
  color: var(--cyan)
}

.brand small {
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--muted);
  margin-top: 6px
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  color: var(--cyan);
  font-weight: 900;
  box-shadow: 0 0 20px #00d9ff20
}

.status-pill,
.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple)
}

.intro {
  max-width: 690px;
  padding: 54px 0 25px
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em
}

h1 {
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -.045em;
  line-height: 1.04;
  margin: 0 0 17px
}

h1 span {
  color: var(--cyan)
}

.muted {
  color: var(--muted);
  line-height: 1.6
}

.intro>.muted {
  max-width: 610px;
  font-size: 16px
}

.panel,
.preview-panel {
  background: linear-gradient(145deg, #0e1420f5, #0a0e16f5);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 65px #0005
}

.panel-heading,
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

h2 {
  font-size: 19px;
  margin: 0
}

.panel-heading .eyebrow {
  margin-bottom: 6px
}

.state {
  font-size: 10px;
  padding: 7px 10px
}

.state.live {
  color: var(--good);
  border-color: #3de6a355;
  background: #3de6a30c
}

.room-row,
.share-link-block {
  margin-top: 25px
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #c8d3e4;
  margin-bottom: 9px
}

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

input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #070a11;
  color: var(--text);
  padding: 13px 14px;
  outline: none
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px #00d9ff16
}

#room-code {
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: .04em
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s;
  white-space: nowrap
}

.button:hover:not(:disabled) {
  transform: translateY(-1px)
}

.button:disabled {
  opacity: .38;
  cursor: not-allowed
}

.primary {
  color: #031017;
  background: linear-gradient(110deg, var(--cyan), #71f0ff);
  box-shadow: 0 5px 25px #00d9ff1b
}

.secondary {
  background: #151c2a;
  color: var(--text);
  border-color: #303b4e
}

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

.actions .primary {
  min-width: 190px
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0
}

.message {
  border-radius: 10px;
  background: #111a29;
  border: 1px solid #24364b;
  padding: 13px 14px;
  color: #b9c8dd;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 21px
}

.message.success {
  border-color: #3de6a344;
  color: #a8f5d5
}

.message.error {
  border-color: #ff657a55;
  color: #ffb3bd
}

.preview-panel {
  margin-top: 18px
}

.preview-heading {
  margin-bottom: 14px
}

.preview-heading .muted {
  font-size: 12px
}

.video-stage {
  position: relative;
  aspect-ratio: 16/9;
  min-height: 220px;
  max-height: 65vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #020307;
  border: 1px solid #202b3b
}

.video-stage.empty {
  background: radial-gradient(ellipse at center, #121a29, #05070b 72%);
  border-style: dashed
}

.stage-video {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  text-align: center;
  padding: 24px
}

.empty-state .muted {
  font-size: 12px
}

.screen-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #00d9ff77;
  color: var(--cyan);
  border-radius: 15px;
  font-size: 25px;
  margin-bottom: 5px;
  box-shadow: 0 0 30px #00d9ff10
}

footer {
  font-size: 11px;
  color: #6f7c90;
  text-align: center;
  line-height: 1.5;
  padding: 23px 0 0
}

.hidden {
  display: none !important
}

.error-text {
  color: var(--bad) !important
}

.watch-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020307;
  background-image: none
}

.watch-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column
}

.watch-bar {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid #1a2433;
  background: #080b12
}

.brand.compact .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 12px
}

.brand.compact {
  font-size: 13px
}

.watch-controls {
  display: flex;
  align-items: center;
  gap: 10px
}

.button.small {
  font-size: 12px;
  padding: 8px 12px
}

.watch-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  background: #020307;
  display: grid;
  place-items: center;
  overflow: hidden
}

#remote-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020307
}

#remote-video.visible {
  display: block
}

.waiting-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 24px;
  max-width: 440px
}

.waiting-card h1 {
  font-size: clamp(22px, 4vw, 36px);
  letter-spacing: -.025em;
  margin: 7px 0 0
}

.waiting-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 10px
}

.pulse-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid #00d9ff55;
  color: var(--cyan);
  font-size: 25px;
  box-shadow: 0 0 32px #00d9ff16
}

.audio-button {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 4;
  background: var(--cyan);
  color: #031017;
  border: 0;
  border-radius: 10px;
  padding: 12px 15px;
  font-weight: 800;
  cursor: pointer
}

.watch-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 13px;
  color: #718097;
  font-size: 10px;
  background: #080b12;
  border-top: 1px solid #1a2433
}

@media(max-width:600px) {
  .shell {
    width: calc(100% - 22px);
    padding-top: 14px
  }

  .intro {
    padding-top: 38px
  }

  .panel,
  .preview-panel {
    padding: 17px
  }

  .panel-heading {
    align-items: flex-start
  }

  .room-code-wrap {
    flex-wrap: wrap
  }

  .room-code-wrap .button {
    flex: 1
  }

  .actions .button {
    flex: 1
  }

  .status-pill {
    font-size: 9px
  }

  .watch-bar {
    padding: 8px 10px
  }

  .watch-footer {
    font-size: 9px
  }

  .watch-controls {
    gap: 6px
  }

  .state {
    font-size: 9px;
    padding: 6px 7px
  }
}