:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0c0c0c;
  --surface-2: #151515;
  --line: rgba(255, 204, 0, 0.18);
  --text: #f8f5ed;
  --muted: #c9c5bd;
  --yellow: #ffcc00;
  --yellow-soft: #f1c300;
  --smoke: #1f1f1f;
  --danger: #e45757;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 204, 0, 0.14), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(255, 244, 214, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255, 204, 0, 0.06), transparent 38%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.hidden {
  display: none !important;
}

.entry {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
}

.brand-card,
.entry-form,
.video-tile,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(255, 204, 0, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(12, 12, 12, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-card {
  padding: 34px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #050505;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 18px 48px rgba(255, 204, 0, 0.24);
}

.brand-mark.small {
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  font-family: Georgia, serif;
  font-size: clamp(58px, 8vw, 92px);
  line-height: 0.9;
}

h2 {
  font-family: Georgia, serif;
  font-size: 34px;
}

h3 {
  font-size: 15px;
}

.lead {
  max-width: 390px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.brand-note {
  width: fit-content;
  margin-top: 12px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--yellow);
  background: rgba(255, 204, 0, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.entry-form {
  padding: 30px;
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  padding: 0 15px;
}

input:focus {
  border-color: rgba(255, 204, 0, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.13);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: var(--yellow);
  color: #050505;
  font-weight: 900;
  cursor: pointer;
}

.room {
  width: 100%;
  display: grid;
  gap: 18px;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.room-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.82);
  color: var(--muted);
  padding: 10px 14px;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.status-pill[data-state="ready"] span {
  background: var(--yellow);
}

.status-pill[data-state="error"] span {
  background: var(--danger);
}

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

.video-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

.local video {
  transform: scaleX(-1);
}

.empty-video {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.caption-bubble {
  position: absolute;
  left: 50%;
  bottom: 56px;
  width: min(88%, 620px);
  transform: translateX(-50%);
  margin: 0;
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.84);
  color: var(--text);
  padding: 10px 14px;
  text-align: center;
  font-weight: 800;
  line-height: 1.35;
  backdrop-filter: blur(14px);
}

.avatar {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #050505;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 900;
}

.tile-name {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.78);
  padding: 8px 12px;
  font-weight: 900;
}

.side-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  padding: 18px;
}

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

#participantList {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.share-row input {
  min-width: 0;
  min-height: 44px;
  font-size: 13px;
}

.share-row button {
  min-height: 44px;
  padding: 0 14px;
}

.chat-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.chat-messages {
  min-height: 190px;
  max-height: 34vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.chat-empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.chat-message {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.58);
  padding: 10px 11px;
}

.chat-message.own {
  border-color: rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.1);
}

.chat-author {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}

.chat-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.chat-form input {
  min-width: 0;
  min-height: 44px;
}

.chat-form button {
  min-height: 44px;
}

.controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.control {
  min-width: 118px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.control[aria-pressed="true"] {
  border-color: rgba(255, 204, 0, 0.65);
  background: rgba(255, 204, 0, 0.18);
  color: var(--yellow);
}

.control.danger {
  background: var(--danger);
  color: #ffffff;
}

.translation-control {
  min-height: 50px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 12px;
}

.translation-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.translation-control select {
  max-width: 134px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

@media (max-width: 900px) {
  .entry,
  .room-layout {
    grid-template-columns: 1fr;
  }

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

  .room-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
