/* Monk Tela — tema Dracula */
:root {
  --bg: #282a36;
  --bg-dark: #1e1f29;
  --bg-darker: #191a21;
  --line: #44475a;
  --fg: #f8f8f2;
  --muted: #6272a4;
  --cyan: #8be9fd;
  --green: #50fa7b;
  --orange: #ffb86c;
  --pink: #ff79c6;
  --purple: #bd93f9;
  --red: #ff5555;
  --yellow: #f1fa8c;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg-darker); color: var(--fg); }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--pink); }

/* ---------- Topo ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--bg-dark); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 12px var(--purple); }
.brand small { color: var(--muted); font-weight: 500; }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.user img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--purple); }
.user a { color: var(--muted); font-size: 13px; }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; }
h1 { font-size: 26px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* ---------- Cards e botões ---------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--bg-darker);
  background: var(--purple); transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.live { background: var(--red); color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--purple); }
.btn.green { background: var(--green); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .3px;
  background: var(--line); color: var(--fg);
}
.badge.live { background: var(--red); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Lobby ---------- */
.lobby-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.live-card { display: flex; flex-direction: column; gap: 14px; color: var(--fg); transition: border-color .15s, transform .15s; }
.live-card:hover { border-color: var(--purple); transform: translateY(-2px); color: var(--fg); }
.live-card .who { display: flex; align-items: center; gap: 12px; }
.live-card img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--red); }
.live-card .name { font-weight: 700; font-size: 16px; }
.live-card .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 8px; }

/* ---------- Transmitir ---------- */
.studio { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  flex: 1 1 auto; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-dark); color: var(--fg); font: inherit; font-size: 14px; cursor: pointer;
}
.seg button:hover:not(:disabled) { border-color: var(--purple); }
.seg button.on { background: var(--purple); border-color: var(--purple); color: var(--bg-darker); font-weight: 700; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.hint.warn { color: var(--orange); }

.stage {
  position: relative; background: #000; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage .placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; }
.stage .placeholder .big { font-size: 46px; }
.stage .overlay { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; }

.statusbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.stats { display: flex; gap: 16px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.stats b { color: var(--fg); }
.share { display: flex; gap: 8px; margin-top: 14px; }
.share input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-dark); color: var(--cyan); font: inherit; font-size: 14px;
}

/* ---------- Assistir ---------- */
.player { position: relative; }
.player .stage { aspect-ratio: auto; height: calc(100vh - 220px); min-height: 280px; }
.controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.controls .spacer { flex: 1; }
.controls select, .controls input[type=range] { accent-color: var(--purple); }
.controls select {
  background: var(--bg-dark); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 14px;
}
.streamer { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.streamer img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--red); }
.unmute {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--pink); color: var(--bg-darker);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg); border: 1px solid var(--purple); color: var(--fg);
  padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--red); }

/* ---------- Negado ---------- */
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.center .card { max-width: 440px; text-align: center; padding: 36px 28px; }
.center .big { font-size: 48px; }

.hidden { display: none !important; }
