:root {
  --bg: #050507;
  --card: rgba(10, 10, 13, .91);
  --line: #25252a;
  --text: #f7f7f8;
  --muted: #92929b;
  --accent: #ff1717;
  --accent2: #ff3434;
  --danger: #e05252;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::selection { background: rgba(255, 23, 23, .35); }

.background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 20, 20, .13), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(255, 20, 20, .06), transparent 27%);
}
.background::before,
.background::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 30, 30, .7), transparent);
  transform: rotate(-43deg);
}
.background::before { top: 100px; left: -90px; }
.background::after { right: -90px; bottom: 130px; }

.container {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: auto;
  min-height: 100vh;
}

.topbar {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: block;
  width: 255px;
  height: 72px;
  overflow: hidden;
  text-decoration: none;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 14px rgba(255, 0, 0, .12));
}

.status {
  color: #aaaab2;
  font-size: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4bd98a;
  box-shadow: 0 0 12px rgba(75,217,138,.8);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
  padding: 72px 0 70px;
}

.pill {
  display: inline-block;
  border: 1px solid #4a2020;
  border-radius: 99px;
  padding: 6px 10px;
  color: #ff8b8b;
  background: rgba(255, 23, 23, .06);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1 {
  font-size: clamp(42px, 6vw, 70px);
  line-height: .98;
  letter-spacing: -0.055em;
  margin: 18px 0;
}
h1 span {
  color: var(--accent);
  text-shadow: 0 0 28px rgba(255, 23, 23, .18);
}

.hero-copy p {
  color: var(--muted);
  max-width: 530px;
  font-size: 16px;
  line-height: 1.65;
}

.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 25px 70px rgba(0,0,0,.42), 0 0 45px rgba(255,0,0,.035);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 17px;
  cursor: pointer;
  font-weight: 800;
}
.tab.active {
  color: white;
  box-shadow: inset 0 -2px var(--accent);
}

.panel { display: none; padding: 25px; }
.panel.active { display: block; }

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

input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #0b0b0e;
  color: white;
  padding: 0 14px;
  font-size: 15px;
}
input:focus {
  border-color: #a52a2a;
  box-shadow: 0 0 0 3px rgba(255,23,23,.10);
}

.code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.code-row input { text-transform: uppercase; }

button {
  font: inherit;
  cursor: pointer;
  transition: transform .15s, opacity .15s, background .15s, border-color .15s;
}
button:active { transform: scale(.98); }

.primary, .secondary, .danger {
  border-radius: 11px;
  height: 48px;
  font-weight: 800;
}
.primary {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 30px rgba(255, 23, 23, .16);
}
.primary:hover { background: #ff2d2d; }
.primary span { float: right; font-size: 19px; }

.secondary {
  padding: 0 14px;
  color: #eee;
  background: #151518;
  border: 1px solid var(--line);
}
.secondary:hover { border-color: #4b2525; }

.hint { color: #73737d; font-size: 11px; line-height: 1.5; margin: 12px 0 0; }

.room-panel { display: none; padding: 25px; border-top: 1px solid var(--line); }
.room-panel.show { display: block; }
.room-title { font-weight: 800; margin-bottom: 12px; }

.share-box {
  display: flex;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0b0b0e;
  margin-bottom: 16px;
}
.share-box span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 7px;
  color: #aaaab3;
  font-size: 12px;
}
.share-box button {
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #281414;
  color: white;
}
.share-box button:hover { background: #351717; }

.big-code {
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .18em;
  color: #ff6666;
  margin: 16px 0;
  text-shadow: 0 0 20px rgba(255, 30, 30, .16);
}
.waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
}
.loader {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e1bd54;
  box-shadow: 0 0 12px rgba(225,189,84,.7);
}
.danger {
  width: 100%;
  background: #211112;
  color: #e98b8b;
  border: 1px solid #432527;
}

.video-section { padding-bottom: 80px; }
.hidden { display: none !important; }
.video-header {
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ddd;
}
.video-header > div { display: flex; align-items: center; gap: 9px; }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef5555;
  box-shadow: 0 0 12px #ef5555;
}
.video-header button {
  background: #151518;
  color: #bbb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
}
.video-wrap {
  position: relative;
  width: 100%;
  min-height: 420px;
  background: #020203;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
video {
  width: 100%;
  max-height: 75vh;
  display: block;
  background: #000;
}
#videoPlaceholder { position: absolute; color: #666; }

footer {
  border-top: 1px solid #17171b;
  padding: 24px 0 32px;
  color: #55555e;
  font-size: 10px;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #eee;
  color: #111;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  transition: .25s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding: 45px 0; }
  .hero-copy { text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .card { width: min(100%, 500px); margin: auto; }
  .brand { width: 220px; }
  h1 { font-size: 49px; }
}
