:root {
  color-scheme: dark;
  --bg: #07070d;
  --panel: rgba(18, 18, 31, 0.76);
  --panel-strong: rgba(29, 27, 50, 0.9);
  --text: #f7f3ff;
  --muted: #a7a0ba;
  --accent: #5035bb;
  --accent-2: #8b6dff;
  --danger: #e85d75;
  --line: rgba(255, 255, 255, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(80, 53, 187, 0.4), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(139, 109, 255, 0.18), transparent 32rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

input:focus {
  border-color: var(--accent-2);
}

.hidden {
  display: none !important;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 4rem 1.25rem;
  text-align: center;
}

.invite {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.invite__panel {
  width: min(100%, 28rem);
  padding: 1rem;
}

.invite__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.hero__eyebrow,
.muted {
  color: var(--muted);
}

.hero__lead {
  max-width: 42rem;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.pressure-title {
  position: relative;
  margin: 0;
  font-size: clamp(4rem, 16vw, 13rem);
  line-height: 0.85;
  letter-spacing: -0.1em;
  font-weight: 950;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-shadow: 0 0 42px rgba(80, 53, 187, 0.45);
  transition: letter-spacing 160ms ease, transform 160ms ease;
}

.pressure-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(139, 109, 255, 0.08);
  transform: translate(0.07em, 0.05em);
}

.pressure-title:hover {
  letter-spacing: -0.14em;
  transform: scaleX(1.04);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero__panel {
  width: min(100%, 34rem);
  margin-inline: auto;
  padding: 1rem;
  text-align: left;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tab--active {
  color: white;
  background: var(--panel-strong);
}

.form {
  display: grid;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.room {
  width: min(1180px, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem 0;
}

.room__header,
.room__actions,
.stage__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.room__header {
  margin-bottom: 1rem;
}

#room-code {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.18em;
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.button-danger {
  background: linear-gradient(135deg, #8f2036, var(--danger));
}

.room__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
}

.stage {
  position: relative;
  display: grid;
  min-height: 640px;
  padding: 1rem;
  overflow: hidden;
}

.stage video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: contain;
  border-radius: 1rem;
  background: #030306;
}

.stage__status {
  align-self: start;
  color: var(--muted);
  font-size: 0.9rem;
}

.stage__empty {
  display: grid;
  place-content: center;
  gap: 0.65rem;
  min-height: 520px;
  color: var(--muted);
  text-align: center;
}

.stage__empty strong {
  color: var(--text);
  font-size: 1.4rem;
}

.side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.side .panel {
  padding: 1rem;
}

.side h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.voice__controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.voice__controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.room-password {
  display: grid;
  gap: 0.6rem;
}

.room-password__actions {
  display: flex;
  gap: 0.5rem;
}

.participants {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.participants li {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
}

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

.chat {
  min-height: 420px;
}

.chat__messages {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  height: 310px;
  overflow: auto;
  padding-right: 0.25rem;
}

.message {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.message--system {
  color: var(--muted);
  background: rgba(80, 53, 187, 0.14);
}

.message small {
  color: var(--muted);
}

.chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: 28rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel-strong);
  color: var(--text);
}

@media (max-width: 920px) {
  .room__grid {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 420px;
  }

  .stage video,
  .stage__empty {
    min-height: 340px;
  }
}
