/* =========================================================
   MUSICVU — NEON BOOTH THEME
   Carregado DEPOIS do <style> do index.html: só sobrescreve
   aparência. Nenhum id/onclick/JS do painel foi alterado.
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #07051a;
  --ink-2: #0e0a2a;
  --ink-3: #161036;
  --magenta: #ff2ec4;
  --uv: #8a5cff;
  --amber: #ffc93c;

  /* variáveis originais do painel, remapeadas */
  --bg: var(--ink);
  --panel: rgba(16, 11, 42, 0.72);
  --panel-strong: rgba(18, 12, 48, 0.94);
  --panel-soft: rgba(138, 92, 255, 0.06);
  --border: rgba(138, 92, 255, 0.2);
  --border-strong: rgba(34, 232, 255, 0.38);
  --text: #ede9ff;
  --muted: #8c86b3;
  --cyan: #22e8ff;
  --blue: #8a5cff;
  --purple: #ff2ec4;
  --green: #3dffa8;
  --red: #ff4d6d;
  --yellow: #ffc93c;
  --shadow: 0 30px 90px rgba(4, 2, 18, 0.65);

  --beat: 0.4839s; /* 124 BPM */
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(138, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 46, 196, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(34, 232, 255, 0.12), transparent 60%),
    var(--ink);
}

/* piso de pista: grade em perspectiva no rodapé */
.grid-bg {
  opacity: 0.5;
  top: auto;
  height: 46vh;
  background-image:
    linear-gradient(rgba(138, 92, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 232, 255, 0.28) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  animation: nx-floor 6s linear infinite;
}

@keyframes nx-floor {
  to { background-position: 0 64px, 0 0; }
}

.glow.one { background: var(--uv); opacity: 0.28; }
.glow.two { background: var(--magenta); opacity: 0.2; }

.note {
  color: rgba(34, 232, 255, 0.18);
  text-shadow: 0 0 18px rgba(34, 232, 255, 0.35);
}

/* ---------- tipografia ---------- */

.brand-name,
.topbar h1,
.hero-copy h1,
.auth-form h2,
.panel-head h2,
.stat-value {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.brand-name {
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 46, 196, 0.35);
}

/* letreiro de neon: contorno + brilho */
.hero-copy h1 {
  font-weight: 900;
  line-height: 1.02;
  color: #ffe3f7;
  text-shadow: 0 0 6px rgba(255, 46, 196, 0.6), 0 0 18px rgba(255, 46, 196, 0.3);
  animation: nx-flicker 7s infinite;
}

.hero-copy h1 span {
  color: #dcfbff;
  -webkit-text-fill-color: #dcfbff;
  background: none;
  -webkit-background-clip: initial;
  text-shadow: 0 0 6px rgba(34, 232, 255, 0.55), 0 0 18px rgba(34, 232, 255, 0.28);
}

@keyframes nx-flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.55; }
  94% { opacity: 1; }
  96% { opacity: 0.7; }
}

.eyebrow {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(34, 232, 255, 0.55);
}

/* ---------- marca ---------- */

.brand-mark {
  background: radial-gradient(circle at 30% 30%, #2a1660, var(--ink-2));
  border: 1px solid rgba(164, 123, 255, 0.5);
  box-shadow: 0 0 12px rgba(255, 46, 196, 0.25), inset 0 0 10px rgba(138, 92, 255, 0.2);
  color: #ffd6f4;
}

/* ---------- ícones neon (injetados pelo neon-fx.js) ---------- */

.nx-ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px currentColor);
}

.btn .nx-ico,
.nav-item .nx-ico,
.room-tab-btn .nx-ico {
  margin-right: 0.45em;
}

.brand-mark .nx-ico { width: 60%; height: 60%; margin: 0; }
.brand-mark .nx-logo { width: 78%; height: 78%; filter: drop-shadow(0 0 4px rgba(255, 79, 207, 0.3)); }
.room-icon .nx-ico { width: 55%; height: 55%; }
.input-icon .nx-ico { width: 16px; height: 16px; }

/* ---------- campos ---------- */

input {
  background: rgba(7, 5, 26, 0.7) !important;
  border-color: rgba(138, 92, 255, 0.28) !important;
}

input:focus {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 3px rgba(34, 232, 255, 0.15), 0 0 22px rgba(34, 232, 255, 0.25) !important;
}

/* ---------- botões: tubos de neon ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--magenta), var(--uv));
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 46, 196, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(255, 46, 196, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(34, 232, 255, 0.06);
  border-color: rgba(34, 232, 255, 0.45);
  color: #c9fbff;
  box-shadow: inset 0 0 12px rgba(34, 232, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(34, 232, 255, 0.12);
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.35), inset 0 0 12px rgba(34, 232, 255, 0.2);
}

.btn-success {
  background: rgba(61, 255, 168, 0.1);
  border-color: rgba(61, 255, 168, 0.6);
  color: #c8ffe6;
  box-shadow: 0 0 14px rgba(61, 255, 168, 0.25);
}

.btn-danger {
  background: rgba(255, 77, 109, 0.08);
  border-color: rgba(255, 77, 109, 0.55);
  color: #ffd0d9;
}

.btn-danger:hover { box-shadow: 0 0 18px rgba(255, 77, 109, 0.45); }

.btn-purple {
  background: rgba(138, 92, 255, 0.14);
  border-color: rgba(138, 92, 255, 0.65);
  color: #e3d8ff;
  box-shadow: 0 0 14px rgba(138, 92, 255, 0.3);
}

/* ---------- estrutura ---------- */

.auth-shell,
.panel,
.sidebar {
  background: var(--panel);
  border-color: var(--border);
  backdrop-filter: blur(18px);
}

.auth-shell { box-shadow: var(--shadow), 0 0 0 1px rgba(255, 46, 196, 0.12); }

.nav-item {
  display: flex;
  align-items: center;
  border: 1px solid transparent;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 46, 196, 0.18), rgba(138, 92, 255, 0.06));
  border-color: rgba(255, 46, 196, 0.35);
  box-shadow: inset 3px 0 0 var(--magenta), 0 0 18px rgba(255, 46, 196, 0.18);
}

.online-card {
  border-color: rgba(61, 255, 168, 0.35);
  background: rgba(61, 255, 168, 0.06);
}

/* ---------- cards de status: medidores ---------- */

.stat-card {
  background: linear-gradient(160deg, rgba(22, 16, 54, 0.9), rgba(10, 7, 30, 0.9));
  border-color: var(--border);
  overflow: hidden;
}

.stat-icon {
  color: var(--cyan);
  background: rgba(34, 232, 255, 0.08);
  border: 1px solid rgba(34, 232, 255, 0.35);
  box-shadow: 0 0 16px rgba(34, 232, 255, 0.25);
}

.stat-card:nth-child(2) .stat-icon { color: var(--green); border-color: rgba(61, 255, 168, 0.4); background: rgba(61, 255, 168, 0.08); box-shadow: 0 0 16px rgba(61, 255, 168, 0.25); }
.stat-card:nth-child(3) .stat-icon { color: var(--magenta); border-color: rgba(255, 46, 196, 0.4); background: rgba(255, 46, 196, 0.08); box-shadow: 0 0 16px rgba(255, 46, 196, 0.25); }
.stat-card:nth-child(4) .stat-icon { color: var(--amber); border-color: rgba(255, 201, 60, 0.4); background: rgba(255, 201, 60, 0.08); box-shadow: 0 0 16px rgba(255, 201, 60, 0.25); }

.stat-value { font-weight: 900; }

/* barra de LEDs no rodapé de cada card */
.stat-card::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 10px, transparent 10px 14px);
  color: rgba(138, 92, 255, 0.35);
}

/* ---------- salas ---------- */

.room-card {
  background: rgba(14, 10, 42, 0.75);
  border-color: rgba(138, 92, 255, 0.2);
}

.room-card:hover { border-color: rgba(34, 232, 255, 0.45); }

.room-card.selected {
  border-color: var(--magenta);
  box-shadow: 0 0 0 1px rgba(255, 46, 196, 0.35), 0 0 30px rgba(255, 46, 196, 0.2);
}

.room-icon {
  color: var(--magenta);
  background: rgba(255, 46, 196, 0.08);
  border: 1px solid rgba(255, 46, 196, 0.4);
  box-shadow: 0 0 14px rgba(255, 46, 196, 0.25);
}

.status.on {
  color: var(--green);
  border-color: rgba(61, 255, 168, 0.5);
  text-shadow: 0 0 10px rgba(61, 255, 168, 0.6);
}

.meta-box { background: rgba(7, 5, 26, 0.55); border-color: rgba(138, 92, 255, 0.16); }

.room-tab-btn.active {
  color: #fff;
  border-color: rgba(34, 232, 255, 0.5);
  box-shadow: 0 0 16px rgba(34, 232, 255, 0.25), inset 0 -2px 0 var(--cyan);
}

.stream-box { border-color: rgba(34, 232, 255, 0.3); background: rgba(34, 232, 255, 0.05); }
.stream-url { color: #c9fbff; }

/* disco: vinil girando */
.selected-room .disc {
  background:
    radial-gradient(circle, var(--magenta) 0 14%, #12082e 15% 18%, transparent 19%),
    repeating-radial-gradient(circle, #1a1040 0 2px, #0b0720 2px 4px);
  box-shadow: 0 0 18px rgba(255, 46, 196, 0.35);
  animation: nx-spin 3s linear infinite;
  animation-play-state: paused;
}

@keyframes nx-spin { to { transform: rotate(360deg); } }

.toast.success { border-color: rgba(61, 255, 168, 0.5); box-shadow: 0 0 22px rgba(61, 255, 168, 0.3); }
.toast.error { border-color: rgba(255, 77, 109, 0.5); box-shadow: 0 0 22px rgba(255, 77, 109, 0.3); }

/* ---------- equalizador neon (injetado no sidebar e topbar) ---------- */

.nx-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
}

.nx-eq i {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(to top, var(--cyan), var(--uv) 60%, var(--magenta));
  box-shadow: 0 0 8px rgba(255, 46, 196, 0.5);
  transform-origin: bottom;
  transform: scaleY(0.18);
  transition: transform 0.6s ease;
}

.nx-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(138, 92, 255, 0.3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nx-live-badge b { font-weight: 800; }

/* =========================================================
   MODO AO VIVO — só pulsa quando alguma sala está ativa
   (body.nx-live é ligado pelo neon-fx.js lendo #stat-active)
========================================================= */

body.nx-live .nx-eq i { animation: nx-bar var(--beat) ease-out infinite; }
body.nx-live .nx-eq i:nth-child(2n) { animation-duration: calc(var(--beat) * 2); }
body.nx-live .nx-eq i:nth-child(3n) { animation-duration: calc(var(--beat) / 2); animation-delay: -0.1s; }
body.nx-live .nx-eq i:nth-child(5n) { animation-duration: calc(var(--beat) * 4); animation-delay: -0.3s; }

@keyframes nx-bar {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0.2); }
}

body.nx-live .nx-live-badge {
  color: #c8ffe6;
  border-color: rgba(61, 255, 168, 0.5);
  box-shadow: 0 0 18px rgba(61, 255, 168, 0.25);
}

body.nx-live .brand-mark,
body.nx-live .room-card .status.on,
body.nx-live .stat-card:nth-child(2) .stat-icon {
  animation: nx-kick var(--beat) ease-out infinite;
}

@keyframes nx-kick {
  0% { filter: brightness(1.55); transform: scale(1.06); }
  60%, 100% { filter: brightness(1); transform: scale(1); }
}

body.nx-live .stat-card:nth-child(2)::before {
  color: var(--green);
  animation: nx-leds calc(var(--beat) * 2) steps(6) infinite;
}

@keyframes nx-leds {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

body.nx-live .selected-room .disc { animation-play-state: running; }

/* ---------- acessibilidade ---------- */

@media (prefers-reduced-motion: reduce) {
  .grid-bg,
  .hero-copy h1,
  .note,
  body.nx-live .nx-eq i,
  body.nx-live .brand-mark,
  body.nx-live .room-card .status.on,
  body.nx-live .stat-card:nth-child(2) .stat-icon,
  body.nx-live .stat-card:nth-child(2)::before,
  .selected-room .disc {
    animation: none !important;
  }

  body.nx-live .nx-eq i { transform: scaleY(0.6); }
}

/* ---------- rádio de reserva da sala ---------- */

.radio-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(138, 92, 255, 0.3);
  background: rgba(138, 92, 255, 0.06);
}

.radio-box-head h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.radio-box-head p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.radio-box input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(138, 92, 255, 0.28);
  color: var(--text);
}

.radio-status {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.radio-status.on {
  color: var(--green);
}

/* ---------- permissões ---------- */

.perm-body { display: grid; gap: 16px; }

.perm-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(138, 92, 255, 0.22);
  background: rgba(7, 5, 26, 0.45);
}

.perm-commands { display: grid; gap: 10px; }

.perm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(138, 92, 255, 0.06);
}

.perm-info { display: grid; gap: 2px; }

.perm-info code {
  font-weight: 800;
  color: var(--cyan);
}

.perm-info span { font-size: 12px; color: var(--muted); }

.perm-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(138, 92, 255, 0.3);
  background: rgba(7, 5, 26, 0.7);
}

.perm-switch button {
  padding: 7px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 12px var(--font-body);
  cursor: pointer;
}

.perm-switch button.on {
  color: #fff;
  background: linear-gradient(90deg, var(--magenta), var(--uv));
  box-shadow: 0 0 10px rgba(255, 46, 196, 0.3);
}

.perm-switch button:focus-visible,
.mod-chip button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.perm-moderators { display: flex; flex-wrap: wrap; gap: 8px; }

.perm-moderators .empty { width: 100%; }

.mod-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 232, 255, 0.4);
  background: rgba(34, 232, 255, 0.06);
  color: #c9fbff;
  font-weight: 700;
  font-size: 13px;
}

.mod-chip button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 77, 109, 0.15);
  color: #ffd0d9;
  cursor: pointer;
}

.mod-chip button:hover { background: rgba(255, 77, 109, 0.35); }

/* ---------- slots do usuário ---------- */

.slot-info {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 232, 255, 0.28);
  background: rgba(34, 232, 255, 0.05);
  color: #c9fbff;
  font-size: 13px;
  font-weight: 700;
}

.slot-info.full {
  border-color: rgba(255, 201, 60, 0.45);
  background: rgba(255, 201, 60, 0.07);
  color: var(--amber);
}

#new-room-id:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
