/* DJ-MUSIC — estilos comunes
   Oscuro de discoteca, neón y mucho movimiento. Público de 14 a 50 años:
   divertido sin ser infantil, legible a oscuras y con el pulgar. */

:root {
  --bg: #0a0613;
  --bg2: #140a26;
  --panel: rgba(255, 255, 255, .06);
  --panel2: rgba(255, 255, 255, .1);
  --borde: rgba(255, 255, 255, .12);
  --texto: #f6f2ff;
  --suave: #b9add6;
  --tenue: #7d7199;

  --c1: #ff2bd6;      /* fucsia */
  --c2: #00e5ff;      /* cian */
  --c3: #c6ff00;      /* lima */
  --c4: #ffb800;      /* ámbar */
  --c5: #8b5cff;      /* violeta */
  --ok: #2bff88;
  --mal: #ff4d6d;

  --grad: linear-gradient(120deg, var(--c1), var(--c5) 50%, var(--c2));
  --radio: 18px;
  --radio-s: 12px;
  --sombra: 0 10px 40px rgba(0, 0, 0, .45);
  --neon: 0 0 24px color-mix(in srgb, var(--c1) 55%, transparent);

  --f-titulo: 'Unbounded', 'Outfit', system-ui, sans-serif;
  --f-texto: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--c2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-titulo); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- fondo vivo ---------- */
.fondo-vivo {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg2), var(--bg) 70%);
}
.fondo-vivo i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: flotar 18s ease-in-out infinite alternate;
}
.fondo-vivo i:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--c1); left: -14vmax; top: -10vmax; }
.fondo-vivo i:nth-child(2) { width: 40vmax; height: 40vmax; background: var(--c2); right: -16vmax; top: 20vh; animation-delay: -6s; opacity: .4; }
.fondo-vivo i:nth-child(3) { width: 34vmax; height: 34vmax; background: var(--c5); left: 20vw; bottom: -18vmax; animation-delay: -11s; opacity: .45; }
.fondo-vivo::after {
  /* grano fino para que el degradado no se vea "de plantilla" */
  content: ''; position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.fondo-vivo.sunset i:nth-child(1) { background: #ff5e3a; }
.fondo-vivo.sunset i:nth-child(2) { background: #ffb800; }
.fondo-vivo.sunset i:nth-child(3) { background: #ff2b7a; }
.fondo-vivo.galaxia i:nth-child(1) { background: #3a1cff; }
.fondo-vivo.galaxia i:nth-child(2) { background: #00e5ff; }
.fondo-vivo.galaxia i:nth-child(3) { background: #b000ff; }
.fondo-vivo.minimal i { opacity: .18; }
@keyframes flotar {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.12); }
  100% { transform: translate(-4vw, 8vh) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ---------- piezas ---------- */
.envoltorio { width: min(1120px, 100% - 32px); margin-inline: auto; }
.estrecho { width: min(560px, 100% - 32px); margin-inline: auto; }

.tarjeta {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  background: var(--panel2); color: var(--texto);
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primario { background: var(--grad); background-size: 200% 100%; color: #fff; box-shadow: var(--neon); animation: brillo 6s linear infinite; }
.btn.lima { background: var(--c3); color: #10140a; }
.btn.borde { background: transparent; border: 1.5px solid var(--borde); }
.btn.peligro { background: color-mix(in srgb, var(--mal) 22%, transparent); color: #ffc2cd; }
.btn.chico { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn.grande { min-height: 60px; padding: 0 30px; font-size: 1.15rem; }
.btn.ancho { width: 100%; }
@keyframes brillo { to { background-position: 200% 0; } }

.icono-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-grid; place-items: center; background: var(--panel2); font-size: 1.15rem;
}

label { display: block; font-weight: 600; font-size: .92rem; color: var(--suave); margin: 0 0 6px; }
.campo { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  background: rgba(0, 0, 0, .35); border: 1.5px solid var(--borde); border-radius: var(--radio-s);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--c2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c2) 22%, transparent); }
input[type=color] { width: 54px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; }

.fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fila > .crece { flex: 1 1 200px; }
.rejilla-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: var(--panel2); border: 1.5px solid transparent; font-size: .9rem; font-weight: 600;
  cursor: pointer; user-select: none; transition: all .15s;
}
.chip[aria-pressed=true] { background: color-mix(in srgb, var(--c1) 25%, transparent); border-color: var(--c1); }
.chip.veto[aria-pressed=true] { background: color-mix(in srgb, var(--mal) 25%, transparent); border-color: var(--mal); text-decoration: line-through; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.interruptor input { appearance: none; width: 52px; height: 30px; border-radius: 99px; background: var(--panel2); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.interruptor input::after { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; }
.interruptor input:checked { background: var(--c1); }
.interruptor input:checked::after { transform: translateX(22px); }
.interruptor span { color: var(--texto); font-weight: 600; }
.interruptor small { display: block; color: var(--tenue); font-weight: 400; }

.etiqueta { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--panel2); letter-spacing: .02em; }
.etiqueta.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.etiqueta.aviso { background: color-mix(in srgb, var(--c4) 20%, transparent); color: var(--c4); }
.etiqueta.mal { background: color-mix(in srgb, var(--mal) 20%, transparent); color: #ff9aae; }
.etiqueta.info { background: color-mix(in srgb, var(--c2) 18%, transparent); color: var(--c2); }

.texto-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.suave { color: var(--suave); }
.tenue { color: var(--tenue); }

/* ---------- avisos flotantes ---------- */
#avisos { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(440px, 100% - 32px); pointer-events: none; }
.aviso {
  padding: 14px 18px; border-radius: 14px; background: #1d1233; border: 1px solid var(--borde);
  box-shadow: var(--sombra); font-weight: 600; animation: entrar .3s ease;
}
.aviso.ok { border-color: var(--ok); }
.aviso.mal { border-color: var(--mal); }
@keyframes entrar { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- ventana modal ---------- */
dialog {
  border: 1px solid var(--borde); border-radius: 22px; padding: 0; color: var(--texto);
  background: #150c27; width: min(620px, 100% - 24px); max-height: calc(100dvh - 24px);
  box-shadow: var(--sombra);
}
dialog::backdrop { background: rgba(4, 2, 10, .7); backdrop-filter: blur(4px); }
dialog .cuerpo { padding: 22px; overflow: auto; max-height: calc(100dvh - 120px); }
dialog .cabeza { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
dialog .pie { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; flex-wrap: wrap; }

/* ---------- selector de idioma ---------- */
.idioma { display: inline-flex; border-radius: 99px; background: var(--panel); border: 1px solid var(--borde); padding: 3px; }
.idioma button { border: 0; background: none; padding: 6px 11px; border-radius: 99px; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--suave); }
.idioma button[aria-pressed=true] { background: var(--panel2); color: var(--texto); }

/* ---------- marca ---------- */
.logo-app { font-family: var(--f-titulo); font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texto); }
.logo-app .disco { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c1)); position: relative; animation: girar 4s linear infinite; }
.logo-app .disco::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--bg); }
@keyframes girar { to { transform: rotate(360deg); } }

.cargando { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--panel2); border-top-color: var(--c1); animation: girar .8s linear infinite; }

.vacio { text-align: center; padding: 40px 16px; color: var(--suave); }
.vacio .grande { font-size: 3rem; margin-bottom: 8px; }

/* confeti */
.confeti { position: fixed; top: -10px; width: 10px; height: 16px; z-index: 2000; pointer-events: none; animation: caer linear forwards; }
@keyframes caer { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
