/* public/skin-video.css
 *
 * Layout "Video" -- la app con el look de los videos promo de PerreoAI: fondo con degradado del mes, titulos grandes con
 * degradado, tarjetas de cristal, botones en pildora, ecualizador abajo. Es OPCIONAL: solo aplica cuando <html> tiene
 * data-layout="video" (Configuracion -> Diseño). Los colores NO se definen aca: salen de las variables del tema del mes
 * (season.css) o del skin base, asi que en cada temporada cambia solo.
 *
 * Reglas de oro: 1) no se esconde NADA en PC ni en modo avanzado (todas las herramientas siguen disponibles);
 * 2) lo "simplificado" (pildoras grandes que reemplazan casillas) vive solo en celular + modo facil (html.is-big.is-easy),
 * y maneja los controles de siempre en vez de duplicarlos. Todo va con prefijo html[data-layout="video"] para no tocar los otros skins.
 */

html[data-layout="video"] {
  --sv-glass-a: rgba(255, 255, 255, .11);
  --sv-glass-b: rgba(255, 255, 255, .04);
  --sv-line: rgba(255, 255, 255, .15);
  --sv-head: linear-gradient(90deg, var(--accent-2), var(--accent-3) 55%, var(--accent));
  --sv-cta: linear-gradient(90deg, var(--accent), var(--accent-2));
  --sv-radius: 28px;
}

/* ---------- fondo ---------- */
html[data-layout="video"] body {
  background:
    radial-gradient(900px 700px at 22% 8%, rgba(var(--accent-rgb) / .22), transparent 70%),
    radial-gradient(900px 800px at 80% 70%, rgba(var(--accent-2-rgb) / .20), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--bg)) 0%, var(--bg) 52%, color-mix(in srgb, var(--accent-2) 12%, var(--bg)) 100%);
  background-attachment: fixed;
}

/* ---------- tarjetas de cristal ---------- */
html[data-layout="video"] .panel {
  background: linear-gradient(160deg, var(--sv-glass-a), var(--sv-glass-b));
  border: 1.5px solid var(--sv-line);
  border-radius: var(--sv-radius);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .34);
}
html[data-layout="video"] .tune-panel,
html[data-layout="video"] .hum-card,
html[data-layout="video"] .singstyle-box {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
}
html[data-layout="video"] .tune-panel > summary { font-weight: 700; }

/* ---------- titulos grandes con degradado ---------- */
html[data-layout="video"] .panel > h2,
html[data-layout="video"] .form-panel > h2,
html[data-layout="video"] .studio-panel > h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.08;
  letter-spacing: -.5px;
  border: 0;
  padding-left: 0;
  background: var(--sv-head);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
html[data-layout="video"] .panel > h2::before { display: none; }
html[data-layout="video"] .panel > h2 .sec-num { opacity: .9; }

/* ---------- botones en pildora ---------- */
html[data-layout="video"] .cta-btn,
html[data-layout="video"] .idea-create-btn {
  border: 0;
  border-radius: 999px;
  background: var(--sv-cta);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  padding: 18px 30px;
  box-shadow: 0 18px 50px rgba(var(--accent-rgb) / .42);
}
html[data-layout="video"] .btn-secondary,
html[data-layout="video"] .more-opts-btn,
html[data-layout="video"] .idea-write-btn {
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1.5px solid rgba(255, 255, 255, .20);
  color: var(--text);
  font-weight: 700;
}
html[data-layout="video"] input[type="text"],
html[data-layout="video"] input[type="number"],
html[data-layout="video"] input[type="search"],
html[data-layout="video"] select,
html[data-layout="video"] textarea {
  background: rgba(255, 255, 255, .07);
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  font-size: 16px;
}

/* ---------- ecualizador de abajo (lo arma skin-video.js) ---------- */
#svEq { display: none; }
html[data-layout="video"] #svEq {
  display: flex;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 96px;
  align-items: flex-end;
  gap: 6px;
  padding: 0 10px;
  opacity: .20;
  pointer-events: none;
  z-index: 0;
}
html[data-layout="video"] #svEq i {
  flex: 1;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent-3), var(--accent));
  height: var(--h, 40%);
  animation: sv-eq 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.09s);
  transform-origin: bottom;
}
@keyframes sv-eq { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { html[data-layout="video"] #svEq i { animation: none; } }
html[data-layout="video"] main, html[data-layout="video"] header { position: relative; z-index: 1; }

/* ---------- barra de segmentos (como en el video) ---------- */
.sv-seg { display: none; }
html[data-layout="video"] .sv-seg { display: block; margin: 6px 0 14px; }
html[data-layout="video"] .sv-seg-lab { font-weight: 700; font-size: 13px; letter-spacing: 4px; color: var(--accent-3); margin: 0 0 10px; }
html[data-layout="video"] .sv-seg-bar { position: relative; display: flex; gap: 4px; height: 64px; }
html[data-layout="video"] .sv-seg-blk {
  position: relative;
  flex: var(--w, 1) 1 0;
  min-width: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #1a0f08;
  overflow: hidden; white-space: nowrap;
  background: var(--c, var(--accent));
}
html[data-layout="video"] .sv-seg-blk small { position: absolute; bottom: 3px; font-weight: 700; font-size: 10px; opacity: .75; }
html[data-layout="video"] .sv-seg-blk.is-inst { background: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 6px, rgba(255,255,255,.05) 6px 12px); color: var(--text); border: 1.5px dashed rgba(255,255,255,.3); }
html[data-layout="video"] .sv-seg-keys { display: flex; gap: 4px; margin-top: 8px; }
html[data-layout="video"] .sv-seg-key {
  flex: var(--w, 1) 1 0; min-width: 0; text-align: center;
  padding: 8px 4px; border-radius: 999px; font-weight: 800; font-size: 14px;
  background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.2);
}
html[data-layout="video"] .sv-seg-key.is-change { background: var(--sv-cta); border-color: transparent; color: #fff; }
html[data-layout="video"] .sv-seg-empty { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- instrumentos si / no en pildoras (como en el video) ---------- */
.sv-inst { display: none; }
html[data-layout="video"] .sv-inst { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 14px; }
html[data-layout="video"] .sv-pill {
  appearance: none; font: inherit; cursor: pointer; text-align: center;
  padding: 16px 8px; border-radius: 22px; font-weight: 800; font-size: 17px; color: var(--text);
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.2);
  transition: transform .15s ease;
}
html[data-layout="video"] .sv-pill:active { transform: scale(.96); }
html[data-layout="video"] .sv-pill.is-in { background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); border-color: rgba(255,255,255,.3); color: #fff; }
html[data-layout="video"] .sv-pill.is-out { background: rgba(255,255,255,.05); border: 1.5px dashed rgba(255,255,255,.28); color: var(--muted); text-decoration: line-through; }
/* en celular + modo facil las casillas de siempre se esconden (los pills las manejan); en PC / avanzado se ven todas */
html[data-layout="video"].is-big.is-easy .sv-has-pills .instrument-columns { display: none; }

/* ---------- stems en filas de colores ---------- */
html[data-layout="video"] .stems-item {
  position: relative;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.13);
  border-radius: 20px;
  padding: 14px 16px;
  overflow: hidden;
}
html[data-layout="video"] .stems-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--sv-stem, var(--accent));
}
html[data-layout="video"] .stems-list > :nth-child(4n+1) { --sv-stem: var(--accent-2); }
html[data-layout="video"] .stems-list > :nth-child(4n+2) { --sv-stem: var(--accent); }
html[data-layout="video"] .stems-list > :nth-child(4n+3) { --sv-stem: var(--accent-3); }
html[data-layout="video"] .stems-list > :nth-child(4n+4) { --sv-stem: #9bb04a; }
html[data-layout="video"] .stems-item-h { font-weight: 800; color: var(--sv-stem, var(--text)); }

/* ---------- Beat Maker y DJ ---------- */
html[data-layout="video"] .bmp-pad,
html[data-layout="video"] .dj-pad {
  border-radius: 22px;
  background: rgba(255,255,255,.09);
  border: 1.5px solid rgba(255,255,255,.16);
}
html[data-layout="video"] .bmp-pad.active, html[data-layout="video"] .bmp-pad.is-on, html[data-layout="video"] .dj-pad.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 34px rgba(var(--accent-rgb) / .55);
}
html[data-layout="video"] .dj-platter-disc {
  background: radial-gradient(circle, #222 0 18%, #0d0d12 19% 60%, #1b1b22 61% 100%);
  border: 4px solid rgba(255,255,255,.16);
}
html[data-layout="video"] .dj-deck {
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1.5px solid var(--sv-line);
  border-radius: 28px;
}

/* ---------- barra de pestanas de abajo, como pildoras ---------- */
html[data-layout="video"] .tab-bar:not(.subtab-bar) {
  background: rgba(20, 12, 8, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--sv-line);
}
html[data-layout="video"] .tab-btn.active {
  background: var(--sv-cta);
  color: #fff;
  box-shadow: 0 10px 28px rgba(var(--accent-rgb) / .45);
}

/* ---------- celular: todo mas grande y tactil ---------- */
@media (max-width: 640px) {
  html[data-layout="video"] .panel { padding: 22px 16px; border-radius: 30px; }
  html[data-layout="video"] .cta-btn { width: 100%; }
  html[data-layout="video"] .btn-secondary { padding: 14px 18px; font-size: 16px; }
}

/* ---------- filas de segmentos / tramos mas compactas (la barra de colores de arriba es la vista principal) ---------- */
html[data-layout="video"] .segment-row {
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 14px;
}
html[data-layout="video"] .segment-row-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html[data-layout="video"] .segment-row-grid label { font-size: 13px; color: var(--muted); }
html[data-layout="video"] .segment-row-grid input,
html[data-layout="video"] .segment-row-grid select { padding: 10px 12px; }
html[data-layout="video"] .segment-row-remove { border-radius: 999px; }

/* ---------- DJ en el celular: los dos platos uno al lado del otro, chiquitos (como en el video); tocas uno y salen sus ajustes ---------- */
html[data-layout="video"].is-big .dj-decks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 10px; margin: 8px 0 6px; }
html[data-layout="video"].is-big .dj-deck { display: contents; }
html[data-layout="video"].is-big .dj-deck > h3 {
  grid-row: 1; justify-self: center; margin: 0; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; font-size: 16px; font-weight: 800;
  background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.2);
  -webkit-tap-highlight-color: transparent;
}
html[data-layout="video"].is-big .dj-deck > h3::after { content: ' ⚙'; opacity: .75; }
html[data-layout="video"].is-big .dj-deck.sv-open > h3 { background: var(--sv-cta); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(var(--accent-rgb) / .45); }
html[data-layout="video"].is-big .dj-deck[data-deck="a"] > h3, html[data-layout="video"].is-big .dj-deck[data-deck="a"] > .dj-platter { grid-column: 1; }
html[data-layout="video"].is-big .dj-deck[data-deck="b"] > h3, html[data-layout="video"].is-big .dj-deck[data-deck="b"] > .dj-platter { grid-column: 2; }
html[data-layout="video"].is-big .dj-deck > .dj-platter { grid-row: 2; width: 100%; max-width: 170px; margin: 0 auto; }
html[data-layout="video"].is-big .dj-deck.sv-open > .dj-platter { box-shadow: 0 0 0 2px var(--accent-3), 0 0 30px rgba(var(--accent-rgb) / .5), inset 0 0 30px rgba(0,0,0,.6); }
html[data-layout="video"].is-big .dj-deck > :not(h3):not(.dj-platter) { grid-column: 1 / -1; }
html[data-layout="video"].is-big .dj-deck:not(.sv-open) > :not(h3):not(.dj-platter) { display: none !important; }
html[data-layout="video"].is-big .dj-platter-label { font-size: .62rem; }
html[data-layout="video"].is-big .dj-deck.sv-open > :not(h3):not(.dj-platter) { animation: sv-in .4s cubic-bezier(.2,.9,.3,1.2) both; }

/* ---------- Beat Maker (pads): los pads grandes arriba como en el video, y los ajustes ocultos hasta que toques ---------- */
html[data-layout="video"] #beatMakerSection.bmp-on .bmp-view { display: none; } /* en Pads el cambio a "Completo" va en ⚙ Ajustes; en Completo el cambio se ve para poder volver */
html[data-layout="video"] .bmp-body { display: flex; flex-direction: column; }
html[data-layout="video"] .bmp-grid { order: 1; gap: 12px; margin: 6px auto 12px; max-width: none; width: 100%; }
html[data-layout="video"] .sv-bmbar { order: 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 12px; }
html[data-layout="video"] .bmp-transport { order: 3; }
html[data-layout="video"] .bmp-body > [data-sv] { order: 4; }
html[data-layout="video"] .bmp-note { order: 9; }
html[data-layout="video"] .bmp-pad {
  border-radius: 24px; border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.09);
  box-shadow: none; transition: transform .12s ease, box-shadow .12s ease;
}
html[data-layout="video"] .bmp-pad.on { color: #fff; border-color: rgba(255,255,255,.3); }
html[data-layout="video"] .bmp-grid > :nth-child(4n+1).on { background: var(--accent-2); box-shadow: 0 0 30px rgba(var(--accent-2-rgb) / .55); }
html[data-layout="video"] .bmp-grid > :nth-child(4n+2).on { background: #9bb04a; box-shadow: 0 0 30px rgba(155,176,74,.5); }
html[data-layout="video"] .bmp-grid > :nth-child(4n+3).on { background: var(--accent-3); color: #1a0f08; box-shadow: 0 0 30px rgba(var(--accent-3-rgb) / .55); }
html[data-layout="video"] .bmp-grid > :nth-child(4n+4).on { background: var(--accent); box-shadow: 0 0 30px rgba(var(--accent-rgb) / .55); }
html[data-layout="video"] .bmp-pad.on.head, html[data-layout="video"] .bmp-pad.hit { transform: scale(1.06); filter: brightness(1.15); }
html[data-layout="video"] .bmp-pad.head { outline: 3px solid #fff; outline-offset: 0; }
html[data-layout="video"] .bmp-play { border-radius: 999px; background: var(--sv-cta); color: #fff; border: 0; font-weight: 800; font-size: 18px; padding: 14px 28px; box-shadow: 0 14px 40px rgba(var(--accent-rgb) / .4); }
html[data-layout="video"] .sv-bmpill { appearance: none; font: inherit; cursor: pointer; padding: 11px 18px; border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--text); background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.2); }
html[data-layout="video"] .sv-bmpill.is-on { background: var(--sv-cta); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(var(--accent-rgb) / .4); }
/* ajustes: solo el grupo elegido se ve (no se toca nada, solo se muestra/oculta) */
html[data-layout="video"] .bmp-body:not([data-sv-open="ritmo"]) [data-sv="ritmo"],
html[data-layout="video"] .bmp-body:not([data-sv-open="inst"]) [data-sv="inst"],
html[data-layout="video"] .bmp-body:not([data-sv-open="aj"]) [data-sv="aj"] { display: none !important; }
html[data-layout="video"] .bmp-body[data-sv-open] [data-sv] { animation: sv-in .35s cubic-bezier(.2,.9,.3,1.2) both; }
html[data-layout="video"] .bmp-chip { background: rgba(255,255,255,.09); border: 1.5px solid rgba(255,255,255,.2); }
html[data-layout="video"] .bmp-chip.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
html[data-layout="video"] .sv-bmbar { flex-wrap: nowrap; gap: 6px; }
html[data-layout="video"] .sv-bmpill { padding: 10px 12px; font-size: 14px; white-space: nowrap; }

/* Celular: el boton ? de ayuda se iba encima del ▶ flotante (ambos a la derecha). La ayuda pasa a la izquierda y mas pequena. */
html[data-layout="video"].is-big .howto-fab { right: auto; left: 12px; bottom: 156px; z-index: 9990; }
html[data-layout="video"].is-big .bm-float-play { right: 14px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
html[data-layout="video"].is-big #beatMakerSection.bmp-on ~ .bm-float-play,
html[data-layout="video"].is-big.sv-scene-on .howto-fab { opacity: .8; }
