:root {
  --bg: #07080b;
  --bg-2: #0c1016;
  --panel: rgba(16, 20, 28, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef3fb;
  --muted: #8b93a7;
  --lime: #c6ff4a;
  --lime-dim: rgba(198, 255, 74, 0.14);
  --teal: #5eead4;
  --danger: #ff5c7a;
  --ok: #3ee0a0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(198, 255, 74, 0.08), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(94, 234, 212, 0.07), transparent 45%),
    var(--bg);
  color: var(--text);
  min-height: 100%;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 20%, transparent 75%);
  opacity: 0.5;
}

a { color: inherit; }
button, input, select { font-family: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 13px;
}
.mark {
  width: 28px;
  height: 28px;
  background: var(--lime);
  border-radius: 7px;
  box-shadow: 0 0 0 4px var(--lime-dim);
  position: relative;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 7px 6px 7px 8px;
  border: 2px solid #111;
  border-right: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  font-weight: 700;
}
.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 46ch;
  line-height: 1.6;
  margin: 0 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.panel-pad { padding: 22px; }

.cards {
  display: grid;
  gap: 12px;
}
.card-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  transition: 0.15s ease;
}
.card-link:hover {
  border-color: rgba(198, 255, 74, 0.45);
  background: var(--lime-dim);
}
.card-link b { display: block; font-size: 16px; margin-bottom: 4px; }
.card-link span { color: var(--muted); font-size: 13px; }
.go {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lime);
  color: #111;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}

.join-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.join-row input {
  flex: 1;
  background: #0a0d12;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-lime { background: var(--lime); color: #111; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }

.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 600;
  margin-bottom: 10px;
}

.live-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
}
@media (max-width: 980px) {
  .live-layout { grid-template-columns: 1fr; }
}

.stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #05060a;
}
.stage video, .watch-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
}
.hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
  border: 1px solid var(--line);
  font-size: 12px;
  font-family: var(--mono);
  pointer-events: auto;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.live { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label { font-size: 12px; color: var(--muted); }
.field select, .field input[type="text"] {
  background: #0a0d12;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}
.check input { margin-top: 3px; accent-color: var(--lime); }
.check b { display: block; font-size: 13px; }
.check span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }
.check.disabled { opacity: 0.45; pointer-events: none; }

.linkbox {
  display: flex;
  gap: 8px;
}
.linkbox input {
  flex: 1;
  background: #0a0d12;
  border: 1px solid var(--line);
  color: var(--lime);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}
.note.warn { color: #ffb020; }
.note.ok { color: var(--ok); }
.note.bad { color: var(--danger); }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.stat b { display: block; font-family: var(--mono); font-size: 14px; }
.stat span { color: var(--muted); font-size: 11px; }

.watch-body { min-height: 100%; display: flex; flex-direction: column; }
.watch-stage {
  flex: 1;
  position: relative;
  background: #000;
  min-height: 100vh;
}
.watch-stage video { min-height: 100vh; }
.watch-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.watch-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.unmute {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #11161f;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 20;
}
.toast.show { opacity: 1; }

/* Sala estilo Discord */
.room-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #1e1f22;
}
.room-app::before { display: none; }
.room-app .brand { margin: 4px 4px 18px; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: blur(10px);
}
.gate[hidden], html.has-name .gate { display: none; }
.gate-card { width: min(420px, calc(100% - 32px)); }

.sidebar {
  background: #111214;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.side-code {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
  background: #1e1f22;
}
.side-code input {
  width: 100%;
  background: #0a0d12;
  border: 1px solid var(--line);
  color: var(--lime);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
}
.btn-tiny { padding: 8px 10px; font-size: 12px; }
.side-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.member-list { display: grid; gap: 6px; overflow: auto; }
.member {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
}
.member.you { background: rgba(198, 255, 74, 0.08); }
.member.sharing { outline: 1px solid rgba(62, 224, 160, 0.45); }
.member b { display: block; font-size: 13px; }
.member b em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 11px; }
.member span { color: var(--muted); font-size: 11px; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #3e4147;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.member.sharing .avatar { background: #23a559; color: #fff; }

.stage-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #313338;
}
.tiles {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 20px;
  align-content: center;
  justify-content: center;
  min-height: 0;
}
.tile {
  position: relative;
  width: 210px;
  height: 148px;
  background: #1e1f22;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  flex: none;
  cursor: pointer;
}
.tile .face {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.tile video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.tile.live .face { opacity: 0; pointer-events: none; }
.tile:fullscreen,
.tile:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  border-radius: 0;
  background: #000;
}
.tile:fullscreen video,
.tile:-webkit-full-screen video,
video:fullscreen,
video:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain;
  background: #000;
  display: block !important;
  opacity: 1 !important;
}
.tile-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 12px;
  pointer-events: none;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #111214;
  border-top: 1px solid var(--line);
}
.icon-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #3e4147;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.icon-btn.share { background: #23a559; }
.icon-btn.share.live { background: #da373c; }
.icon-btn.hangup { background: #da373c; }
.icon-btn.hangup svg { transform: rotate(135deg); }
.icon-btn:hover { filter: brightness(1.08); }
.icon-btn.need { box-shadow: 0 0 0 3px rgba(198, 255, 74, 0.4); }
.ctrl-check {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.ctrl-check input { accent-color: var(--lime); }
.bar select {
  background: #1e1f22;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

.ctx {
  position: fixed;
  z-index: 50;
  min-width: 200px;
  background: #111214;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.ctx[hidden] { display: none; }
.ctx button, .ctx-vol {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.ctx button:hover { background: #3e4147; }
.ctx svg { width: 16px; height: 16px; flex: none; }
.ctx-vol { cursor: default; }
.ctx-vol input { width: 90px; accent-color: var(--lime); }

@media (max-width: 800px) {
  .room-app { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
}

