/* renderer/style.css — IurockMusic: Layout 3/4 Catálogo + 1/4 Media/Playlist */

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

/* ── Variables de Diseño ────────────────────────────────────────────────── */
:root {
  --bg-dark:         #050811;
  --bg-panel:        #0a1122;
  --bg-card:         rgba(0, 102, 255, 0.04);
  --bg-card-hover:   rgba(0, 102, 255, 0.08);
  --border-color:    rgba(56, 189, 248, 0.15);

  --accent-purple:   #0055ff;  /* Trendy Electric Blue (Tesla Group) */
  --accent-magenta:  #00d4ff;  /* Trendy Sky Aqua */
  --accent-cyan:     #00f0ff;  /* Radiant Cyan */
  --accent-gold:     #f59e0b;  /* Coins & Credits */

  --text-primary:    #ffffff;
  --text-dim:        #94a3b8;
  --text-muted:      #475569;

  --glow-purple:     0 0 25px rgba(0, 85, 255, 0.45);
  --glow-magenta:    0 0 25px rgba(0, 212, 255, 0.45);
  --glow-cyan:       0 0 20px rgba(0, 240, 255, 0.35);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;

  --titlebar-h: 46px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset Básicos ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  user-select: none;
  -webkit-user-select: none;
}

/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-magenta); }

/* ── Barra Superior (Titlebar) ──────────────────────────────────────────── */
#titlebar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--titlebar-h);
  background: rgba(5, 8, 17, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  -webkit-app-region: drag;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-app-region: no-drag;
}
.iurock-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8)); }
.logo-text {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}
.logo-highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.badge-mode {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  -webkit-app-region: no-drag;
}
.credits-badge, .queue-badge, .btn-create-session, .btn-fullscreen-toggle {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 9999px !important;
}
.btn-fullscreen-toggle {
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.35), rgba(0, 212, 255, 0.35));
  border: 1px solid var(--accent-magenta);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-fullscreen-toggle:hover {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  box-shadow: var(--glow-magenta);
  transform: translateY(-1px);
}
.session-pin-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid var(--accent-gold);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
  cursor: default;
  user-select: none;
}
.session-pin-badge strong {
  color: var(--accent-gold);
  font-size: 13.5px;
  font-family: monospace, sans-serif;
  letter-spacing: 1px;
}
.credits-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
  cursor: default;
  user-select: none;
}
.queue-badge {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
}

/* ── Control de Volumen en Pantalla (Header) ──────────────────────────────── */
.header-volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
  max-width: 280px;
  min-width: 160px;
  padding: 0 12px;
  -webkit-app-region: no-drag;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scaleX(0.85); }
  to   { opacity: 1; transform: scaleX(1); }
}

.header-vol-icon {
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  user-select: none;
}

.header-vol-slider-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 20px;
}

.header-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  position: relative;
  z-index: 1;
  -webkit-app-region: no-drag;
  transition: height 0.15s ease;
}
.header-vol-slider:hover {
  height: 6px;
}

/* Thumb */
.header-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,240,255,0.6), 0 0 3px rgba(0,0,0,0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid rgba(255,255,255,0.2);
}
.header-vol-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 14px rgba(0,240,255,0.85), 0 0 5px rgba(0,0,0,0.9);
}
.header-vol-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* Firefox */
.header-vol-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,240,255,0.6);
  border: 2px solid rgba(255,255,255,0.2);
  transition: transform 0.15s ease;
}
.header-vol-slider::-moz-range-track {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  height: 4px;
}

.header-vol-pct {
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-cyan);
  min-width: 34px;
  text-align: right;
  letter-spacing: 0.5px;
  font-family: monospace, sans-serif;
  user-select: none;
}

.titlebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: no-drag;
}
.btn-tv {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--glow-purple);
  transition: all var(--transition);
}
.btn-tv:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.titlebar-actions button:not(.btn-tv) {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.titlebar-actions button:hover:not(.btn-tv) { background: rgba(255,255,255,0.08); color: #fff; }
.titlebar-actions .btn-close:hover { background: rgba(239, 68, 68, 0.25); color: #ef4444; }

/* ── Layout Principal: 3/4 (75%) Catálogo + 1/4 (25%) Media ─────────────── */
#iurock-app {
  display: flex;
  height: 100vh;
  padding-top: var(--titlebar-h);
}

/* 3/4 (75% ancho): Panel de Catálogo y Búsqueda */
#catalog-panel {
  width: 75%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-panel);
}

#search-container {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0,0,0,0.25);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.search-field-box {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search-magnifier {
  position: absolute;
  left: 16px;
  font-size: 18px;
  pointer-events: none;
  z-index: 2;
}
#search-input {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  padding: 0 44px 0 48px;
  background: rgba(255,255,255,0.06);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all var(--transition);
  cursor: pointer;
}
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15);
  background: rgba(255,255,255,0.09);
}

.btn-clear-search {
  position: absolute;
  right: 14px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  display: none;
  padding: 4px;
  z-index: 2;
}
.btn-clear-search.show { display: block; }

.btn-open-keyboard {
  width: 48px;
  height: 48px;
  min-width: 48px;
  box-sizing: border-box;
  padding: 0;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border: 1px solid var(--accent-cyan);
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--glow-purple);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}
.btn-open-keyboard:hover, .btn-open-keyboard:active {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  transform: scale(0.96);
  box-shadow: var(--glow-cyan);
}

.btn-next-song-top {
  height: 48px;
  min-width: 110px;
  box-sizing: border-box;
  padding: 0 14px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18) 0%, rgba(0, 85, 255, 0.28) 100%);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 12px;
  color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-next-song-top:hover, .btn-next-song-top:active {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  border-color: #fff;
  color: #fff;
  box-shadow: var(--glow-cyan);
  transform: scale(0.96);
}
.btn-next-song-top .next-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.btn-next-song-top .next-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.1;
  text-align: left;
}
.btn-next-song-top .next-line1 {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  opacity: 0.85;
}
.btn-next-song-top .next-line2 {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* Dropdown de Sugerencias de Autocompletar */
.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(14, 11, 26, 0.98);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(16px);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 3px;
}
.search-suggestions-dropdown.hidden {
  display: none !important;
}
.sugg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.sugg-item:hover, .sugg-item:active {
  background: rgba(0, 240, 255, 0.16);
  color: #38bdf8;
  padding-left: 18px;
}
.sugg-item .sugg-icon {
  font-size: 15px;
  opacity: 0.9;
}
.sugg-item .sugg-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sugg-item .sugg-type {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.sugg-item.sugg-artist .sugg-type {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Categorías Pill Bar con Contenedor Flexible */
.categories-bar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.categories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 14px;
  padding-bottom: 4px;
  flex: 1;
  min-width: 0;
}
.categories-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.cat-pill:hover, .cat-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}

.cat-pill.youtube-pill:hover, .cat-pill.youtube-pill.active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

/* Botón Siguiente Canción en Cápsula (Justificado a la derecha) */
.cat-pill-next {
  flex-shrink: 0;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18) 0%, rgba(0, 85, 255, 0.28) 100%);
  border: 1.5px solid var(--accent-cyan);
  color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  user-select: none;
  cursor: pointer;
}
.cat-pill-next:hover, .cat-pill-next:active {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  border-color: #fff;
  color: #fff;
  box-shadow: var(--glow-cyan);
  transform: scale(0.96);
}

/* Ocultar barras de scroll de mouse para experiencia Touch Kiosk pura */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Layout con Botonera Touch Lateral Kiosk */
.catalog-with-touch-nav {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  gap: 10px;
  padding: 16px 20px;
}

#catalog-area {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  touch-action: pan-y;
}

#touch-nav-bar {
  width: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  background: rgba(15, 10, 30, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
}

.touch-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
  padding: 10px 4px;
}

.touch-btn-top {
  background: linear-gradient(180deg, var(--accent-magenta) 0%, var(--accent-purple) 100%);
  border: 1px solid var(--accent-cyan);
  box-shadow: var(--glow-magenta);
}

.touch-btn-mid, .touch-btn-bot {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.14) 0%, rgba(0, 85, 255, 0.2) 100%);
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.touch-nav-btn:hover, .touch-nav-btn:active {
  transform: scale(0.95);
  border-color: #fff;
  box-shadow: var(--glow-cyan);
}

.touch-icon {
  font-size: 22px;
  line-height: 1;
}

.touch-label {
  font-size: 10px;
  font-weight: 900;
  margin-top: 5px;
  letter-spacing: 0.5px;
}

.catalog-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Barra de Abecedario Táctil Kiosk — 1 Sola Fila Horizontal Continua */
#alphabet-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 6px 2px 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(5, 8, 17, 0.85);
  overflow-x: auto;
  scrollbar-width: none;
}
#alphabet-bar::-webkit-scrollbar {
  display: none;
}

.alpha-btn {
  flex: 1 1 0;
  min-width: 22px;
  max-width: 44px;
  height: 38px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  user-select: none;
  padding: 0;
}

.alpha-btn:hover,
.alpha-btn:active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-cyan);
  transform: scale(0.92);
}

.alpha-btn.has-artists {
  color: #fff;
  border-color: rgba(0, 240, 255, 0.35);
  background: linear-gradient(180deg, rgba(0,240,255,0.1) 0%, rgba(0,85,255,0.15) 100%);
}

.alpha-btn.disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

.btn-logout-inside-modal {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.btn-logout-inside-modal:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

#results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

/* Card de Artista / Álbum de Navidrome */
.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
  scroll-margin-top: 80px;
}

@keyframes alphaCardPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.95), 0 0 25px rgba(0, 240, 255, 0.85);
    border-color: #00f0ff;
    transform: scale(1.04);
  }
  30% {
    box-shadow: 0 0 0 8px rgba(0, 212, 255, 0.85), 0 0 35px rgba(0, 212, 255, 0.95);
    border-color: #00d4ff;
    transform: scale(1.06);
  }
  60% {
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.9), 0 0 30px rgba(0, 240, 255, 0.85);
    border-color: #00f0ff;
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0), 0 0 0 transparent;
    border-color: var(--border-color);
    transform: scale(1);
  }
}

.alpha-highlight-pulse {
  animation: alphaCardPulse 0.8s ease-in-out 3 !important;
  z-index: 10 !important;
  position: relative !important;
}
.artist-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-magenta);
  transform: translateY(-3px);
  box-shadow: var(--glow-purple);
}
.artist-card:active {
  transform: scale(0.97);
  border-color: var(--accent-cyan);
}
.artist-cover-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: #111;
}
.artist-cover-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.artist-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.artist-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.artist-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artist-badge-house {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 2px;
}

/* Card de Canción de IurockMusic (Touch/Clic Directo) */
.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all var(--transition);
}
.song-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-magenta);
  transform: translateY(-3px);
  box-shadow: var(--glow-purple);
}
.song-card:active {
  transform: scale(0.97);
  border-color: var(--accent-cyan);
}

.song-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: #111;
}
.song-cover-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.song-duration-badge {
  position: absolute;
  bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.song-hover-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 85, 255, 0.75);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
  pointer-events: none;
}
.song-card:hover .song-hover-badge {
  opacity: 1;
}

.song-info {
  flex: 1;
  min-width: 0;
}
.song-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  line-height: 1.25;
}
.song-author {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 1/4 (25% ancho): Panel de Video, Playlist y QR */
#media-panel {
  width: 25%;
  min-width: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

/* Screen Box (Video Player 1/4) */
#screen-box {
  position: relative;
  width: 100%;
  height: 38%;
  background: #000;
  border-bottom: 2px solid rgba(0, 85, 255, 0.4);
  overflow: hidden;
  cursor: pointer;
  transform: translateZ(0);
  will-change: width, height;
}

/* Modo Pantalla Completa Automática por Inactividad (Kiosk Fullscreen) */
#screen-box.fullscreen-kiosk {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: translateZ(0);
  animation: expandFullscreen 0.25s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes expandFullscreen {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 1;
  }
}

#video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  transform: translateZ(0);
  backface-visibility: hidden;
  content-visibility: visible;
}

/* Idle Overlay */
#screen-idle-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 85, 255, 0.2) 0%, rgba(5,8,17,1) 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  transition: background 0.3s ease;
}

#screen-idle-overlay.with-bg-video {
  background: rgba(5, 8, 17, 0.55) !important;
}
.idle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 260px;
  padding: 16px;
}
.idle-content h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.idle-content p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.vinyl-disc-large {
  width: 165px; height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle, #111 0%, #222 30%, #111 31%, #333 70%, #050505 100%);
  border: 5px solid #333;
  box-shadow: 0 0 45px rgba(0,0,0,0.95), 0 0 25px rgba(0, 85, 255, 0.5);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.vinyl-disc-large.spinning {
  animation: spinVinyl 6s linear infinite;
}
@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#vinyl-cover-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.disc-label {
  position: relative;
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.9);
  border: 4px solid #000;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(0,0,0,0.9);
}

/* Banner de Titulo en el Video (Fijo Siempre Visible - Esquina Superior Izquierda) */
#video-overlay-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 75%, transparent 100%);
  opacity: 1;
  pointer-events: none;
  z-index: 4;
  contain: layout style;
}

/* Etiqueta del Negocio (Pegada en la Esquina Inferior Derecha - Tamaño Grande) */
.video-business-corner-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 6;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(135deg, rgba(8, 6, 20, 0.94), rgba(18, 12, 36, 0.94));
  border: 2px solid var(--accent-gold);
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
  transform: translateZ(0);
  text-align: right;
  contain: layout style;
}

.video-business-corner-badge .biz-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#screen-box.fullscreen-kiosk .video-business-corner-badge {
  bottom: 24px !important;
  right: 28px !important;
  padding: 10px 22px !important;
  border-radius: 12px !important;
  border: 2.5px solid var(--accent-gold) !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6) !important;
}

#screen-box.fullscreen-kiosk .video-business-corner-badge .biz-name {
  font-size: 22px !important;
  letter-spacing: 1.5px !important;
}

/* ── QR Flotante en Videos / Pantalla Completa (Esquina Inferior Izquierda) ── */
.video-fullscreen-qr-badge {
  display: none;
  position: absolute;
  bottom: 24px;
  left: 28px;
  z-index: 1000;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

#screen-box.fullscreen-kiosk .video-fullscreen-qr-badge,
#screen-box:fullscreen .video-fullscreen-qr-badge {
  display: flex !important;
}

.video-fullscreen-qr-badge:hover {
  transform: scale(1.05);
}

.video-qr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(14, 10, 32, 0.94), rgba(28, 20, 60, 0.94));
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(6, 182, 212, 0.45);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 10px 14px;
  user-select: none;
  animation: qrBadgeGlowPulse 2.8s infinite alternate ease-in-out;
}

@keyframes qrBadgeGlowPulse {
  0% {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 16px rgba(6, 182, 212, 0.35);
  }
  100% {
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.95), 0 0 32px rgba(6, 182, 212, 0.7);
  }
}

.video-qr-img-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.video-qr-img {
  width: 82px;
  height: 82px;
  display: block;
  image-rendering: pixelated;
}

.video-qr-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.video-qr-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #00f0ff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.85);
}

.video-qr-sub {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.video-qr-pin-pill {
  display: inline-block;
  align-self: flex-start;
  margin-top: 3px;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--accent-gold);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-gold);
  letter-spacing: 1px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.live-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-magenta);
  letter-spacing: 1px;
}
#video-title-overlay {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#video-author-overlay {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Control Bar & Tiempo Restante (No manipulable) */
#player-control-bar {
  padding: 10px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.time-status-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  pointer-events: none;
}

.progress-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
  border-radius: 4px;
  transition: width 0.25s linear;
}

.time-labels-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.time-remaining-tag {
  color: var(--accent-magenta);
  background: rgba(0, 212, 255, 0.14);
  border: 1px solid rgba(0, 212, 255, 0.35);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  font-weight: 800;
}

.playback-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.playing-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.disc-icon-mini {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #111 0%, #333 100%);
  border: 2px solid var(--accent-magenta);
  flex-shrink: 0;
}
.disc-icon-mini.spinning { animation: spinVinyl 3s linear infinite; }

.meta-texts { min-width: 0; }
#now-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#now-author {
  font-size: 11px;
  color: var(--text-dim);
}

.volume-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
#volume-bar {
  width: 50px; height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
}
#volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
}

/* Playlist + QR Code Section */
#playlist-and-qr-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
  min-height: 0;
  background: var(--bg-dark);
}

.playlist-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: 0;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.playlist-header h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}
.btn-clean-q {
  background: transparent;
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--accent-magenta);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-clean-q:hover { background: rgba(0,212,255,0.2); }

#queue-scroll-list {
  flex: 1;
  overflow-y: auto;
}
#queue-empty-msg {
  padding: 20px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.queue-num {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  min-width: 16px;
}
.queue-thumb {
  width: 40px; height: 26px;
  border-radius: 4px;
  object-fit: cover;
}
.queue-meta { flex: 1; min-width: 0; }
.queue-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-artist { font-size: 9.5px; color: var(--text-dim); }

.btn-remove-row {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  font-size: 11px;
}
.btn-remove-row:hover { color: var(--accent-magenta); }

/* QR Code Table Card */
.qr-table-card {
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.15), rgba(0, 212, 255, 0.15));
  border: 1.5px dashed rgba(0, 212, 255, 0.45);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0.2, 1), border-color 0.2s ease, background 0.2s ease;
}
.qr-table-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.25), rgba(0, 212, 255, 0.25));
  border-color: var(--accent-magenta);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.35);
}
.qr-table-card:active {
  transform: scale(0.98);
}
.qr-code-img-box {
  width: 70px; height: 70px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  pointer-events: none; /* Toda la tarjeta maneja el click */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qr-table-card:hover .qr-code-img-box {
  transform: scale(1.06);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}
.qr-code-img-box img {
  width: 100%; height: 100%;
  display: block;
}

.qr-text-info { min-width: 0; }
.qr-text-info h5 {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-magenta);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.qr-text-info p {
  font-size: 9.5px;
  color: var(--text-dim);
  line-height: 1.3;
  margin-bottom: 4px;
}
.qr-url-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Spinners y Toast */
.spinner-cyan, .spinner-magenta {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  animation: spinVinyl 0.8s linear infinite;
}
.spinner-cyan { border-top-color: var(--accent-cyan); }
.spinner-magenta { border-top-color: var(--accent-magenta); width: 36px; height: 36px; }

#search-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-dim);
  font-size: 12px;
}
#search-loading.show { display: flex; }

#screen-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,8,17,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10;
  display: none;
}
#screen-loading-overlay.show { display: flex; }

#toast {
  position: fixed;
  bottom: 25px; left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: rgba(14, 10, 32, 0.98);
  border: 1.5px solid var(--accent-magenta);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--glow-magenta);
  backdrop-filter: blur(20px);
  padding: 12px 26px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  z-index: 9999999 !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error {
  border-color: rgba(255, 60, 60, 0.9);
  color: #ff8080;
  background: rgba(30, 8, 15, 0.98);
  box-shadow: 0 0 35px rgba(255, 50, 50, 0.6), 0 15px 40px rgba(0,0,0,0.9);
}

/* ── Banner Flotante Superior Gigante para Inserción de Créditos ────────── */
.top-credit-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-140px);
  background: linear-gradient(135deg, rgba(20, 15, 45, 0.98), rgba(40, 25, 80, 0.98));
  border: 2.5px solid var(--accent-gold);
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.75), 0 20px 50px rgba(0, 0, 0, 0.9);
  border-radius: 18px;
  padding: 14px 34px;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  z-index: 9999999 !important;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 14px;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
}

.top-credit-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: bannerPulse 1s infinite alternate ease-in-out;
}

@keyframes bannerPulse {
  from { box-shadow: 0 0 35px rgba(245, 158, 11, 0.6), 0 15px 40px rgba(0,0,0,0.9); }
  to { box-shadow: 0 0 65px rgba(245, 158, 11, 0.95), 0 25px 60px rgba(0,0,0,0.95); }
}

.credit-banner-total {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.8);
  font-size: 16px;
}

.hidden {
  display: none !important;
}

.confirm-inline-alert {
  display: none;
  background: rgba(239, 68, 68, 0.22);
  border: 1.5px solid #ef4444;
  color: #ff9999;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  animation: alertShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.confirm-inline-alert.show {
  display: block !important;
}

@keyframes alertShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

@keyframes spinVinyl { to { transform: rotate(360deg); } }

/* ── Modal de Login ─────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 15, 0.95);
  backdrop-filter: blur(25px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-overlay.hidden { display: none; }

/* ── Modal Central de Nueva Canción (Bot / Navidrome) ────────────────────── */
.new-song-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.78);
  backdrop-filter: blur(16px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInPopup 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.new-song-popup-overlay.hidden { display: none !important; }

@keyframes fadeInPopup {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.new-song-popup-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, #130a2a 0%, #090614 100%);
  border: 2px solid var(--accent-magenta);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.3), 0 20px 60px rgba(0, 0, 0, 0.9);
  border-radius: 24px;
  padding: 24px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  user-select: none;
}

.popup-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.popup-close-x:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  border-color: #ff6b6b;
}

.popup-badge {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-purple));
  padding: 6px 18px;
  border-radius: 20px;
  width: fit-content;
  margin: 0 auto;
  box-shadow: var(--glow-magenta);
}

.popup-content-body {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: 16px;
  text-align: left;
}

.popup-cover-box {
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.4);
}
.popup-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-info-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popup-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.popup-artist {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-tag-house {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
}

.popup-actions-row {
  display: flex;
  gap: 10px;
}

.btn-popup-view {
  flex: 2;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 900;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--glow-cyan);
  transition: all var(--transition);
}
.btn-popup-view:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.btn-popup-dismiss {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-popup-dismiss:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #0a1122;
  border: 1px solid rgba(0, 85, 255, 0.3);
  box-shadow: 0 0 50px rgba(0, 85, 255, 0.25), 0 0 30px rgba(0, 212, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-brand { text-align: center; }
.login-logo-icon { font-size: 38px; display: block; margin-bottom: 8px; filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.9)); }
.login-brand h1 { font-size: 26px; font-weight: 900; color: #fff; letter-spacing: 1px; }
.login-brand h1 span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
  font-size: 11.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px;
}
.input-group input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: #fff; font-family: inherit; font-size: 14px;
  outline: none; transition: all var(--transition);
}
.input-group input:focus {
  border-color: var(--accent-magenta); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border: none; border-radius: var(--radius-md); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer; box-shadow: var(--glow-purple); transition: all var(--transition);
}
.btn-login:hover { filter: brightness(1.15); transform: translateY(-1px); }

.login-hint {
  text-align: center; font-size: 11.5px; color: var(--text-muted);
  border-top: 1px solid var(--border-color); padding-top: 16px;
}

.user-badge {
  font-size: 11.5px; font-weight: 800; color: #fff;
  background: rgba(0, 85, 255, 0.2); border: 1px solid rgba(0, 85, 255, 0.4);
  padding: 4px 10px; border-radius: 20px; display: flex; align-items: center; gap: 6px;
}
.btn-create-session {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 9999px !important;
  background: rgba(0, 85, 255, 0.18);
  border: 1px solid rgba(0, 85, 255, 0.45);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 0 12px rgba(0, 85, 255, 0.2);
}
.cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.cat-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-purple);
}

/* Navidrome Category Pill */
.navidrome-pill {
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.3), rgba(0, 240, 255, 0.3));
  border: 1px solid rgba(0, 240, 255, 0.5) !important;
  color: #fff !important;
  font-weight: 900 !important;
}
.navidrome-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan)) !important;
  box-shadow: var(--glow-cyan) !important;
}

/* Artist Card Tile Grid */
.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
}
.artist-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}
.artist-card:active {
  transform: scale(0.97);
}

.artist-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: #111;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.artist-card:hover .artist-cover-wrap {
  border-color: var(--accent-magenta);
  box-shadow: var(--glow-magenta);
}
.artist-cover-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}

.artist-info {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%;
}
.artist-name {
  font-size: 13.5px; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.artist-meta {
  font-size: 11px; color: var(--text-dim); font-weight: 700;
}
.artist-badge-house {
  font-size: 9px; font-weight: 800; background: rgba(0,240,255,0.15); color: var(--accent-cyan);
  border: 1px solid rgba(0,240,255,0.3); padding: 2px 8px; border-radius: 10px; margin-top: 4px; display: inline-block;
}
.artist-badge-yt {
  font-size: 9px; font-weight: 800; background: rgba(239, 68, 68, 0.18); color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.4); padding: 2px 8px; border-radius: 10px; margin-top: 4px; display: inline-block;
}

.artist-back-btn {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border: 1px solid var(--accent-cyan);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  margin-right: 14px;
  box-shadow: var(--glow-purple);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.artist-back-btn:hover {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  color: #fff;
  border-color: #fff;
  transform: scale(1.05);
  box-shadow: var(--glow-cyan);
}

.btn-create-session:hover {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: #fff;
  border-color: var(--accent-magenta);
  box-shadow: var(--glow-magenta);
  transform: translateY(-1px);
}
.btn-logout {
  background: none; border: none; cursor: pointer; font-size: 12px; padding: 2px;
}

.select-role {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: #fff; font-family: inherit; font-size: 14px;
  outline: none; transition: all var(--transition);
}
.select-role option { background: #0a1122; color: #fff; }

/* Modal de Gestión de Sesiones (Admin) */
.admin-manage-card {
  max-width: 540px !important;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.form-row-2 {
  display: flex; gap: 10px;
}
.form-row-2 .input-group { flex: 1; }

.users-section-divider {
  margin: 18px 0 10px 0;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  text-align: center;
}
.users-section-divider span {
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px; color: var(--accent-cyan);
}

.users-list-wrap {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px;
  max-height: 230px; overflow-y: auto; padding-right: 4px;
}

.user-item-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 10px 12px; gap: 8px;
}
.user-item-info {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1;
}
.user-item-name {
  font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-item-meta {
  font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px;
}
.user-role-badge {
  font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 4px; text-transform: uppercase;
}
.user-role-badge.admin { background: rgba(0,212,255,0.2); color: var(--accent-magenta); border: 1px solid rgba(0,212,255,0.4); }
.user-role-badge.client { background: rgba(0,240,255,0.2); color: var(--accent-cyan); border: 1px solid rgba(0,240,255,0.4); }

.user-item-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.btn-user-action {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-color);
  color: #fff; font-family: inherit; font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 8px; cursor: pointer; transition: all var(--transition);
}
.btn-user-action:hover { background: rgba(255,255,255,0.15); }
.btn-user-del:hover { background: rgba(239,68,68,0.25); color: #ef4444; border-color: #ef4444; }

.modal-footer-close { margin-top: 10px; }

.modal-actions-row {
  display: flex; gap: 10px; margin-top: 10px;
}
.btn-cancel {
  flex: 1; padding: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: var(--text-dim);
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-cancel:hover { background: rgba(255,255,255,0.12); color: #fff; }



/* Modal de Teclado Virtual Touch Kiosk */
.keyboard-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 12, 0.82);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyboard-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.keyboard-container {
  width: 94%;
  max-width: 1080px;
  background: rgba(18, 12, 38, 0.96);
  border: 2px solid var(--accent-cyan);
  border-radius: 24px;
  padding: 18px 22px;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.3), 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(40px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyboard-modal-overlay.show .keyboard-container {
  transform: translateY(0);
}

/* Header del Teclado con Pantalla de Previsualización */
.keyboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.keyboard-display-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(5, 8, 17, 0.9);
  border: 1px solid var(--accent-magenta);
  border-radius: 16px;
  padding: 8px 16px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}

.keyboard-display-icon {
  font-size: 20px;
  margin-right: 10px;
}

#keyboard-display-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.keyboard-action-sm {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ff6b6b;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.keyboard-action-sm:hover, .keyboard-action-sm:active {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.keyboard-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 18px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.keyboard-close-btn:hover, .keyboard-close-btn:active {
  background: var(--accent-magenta);
  border-color: transparent;
  box-shadow: var(--glow-magenta);
}

/* Grilla de Teclas */
.keyboard-keys-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.key-btn {
  flex: 1;
  min-width: 0;
  height: 52px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.key-btn:hover, .key-btn:active {
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  border-color: #fff;
  box-shadow: var(--glow-cyan);
  transform: scale(0.93);
}

/* Teclas Especiales */
.key-backspace {
  flex: 1.8;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ff8888;
  font-size: 14px;
}
.key-backspace:hover, .key-backspace:active {
  background: var(--accent-magenta);
  color: #fff;
}

/* Barra de Sugerencias en el Teclado Táctil */
.keyboard-suggestions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  min-height: 44px;
  scrollbar-width: none;
}
.keyboard-suggestions-bar::-webkit-scrollbar {
  display: none;
}
.keyboard-sugg-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(0, 240, 255, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.keyboard-sugg-chip:hover, .keyboard-sugg-chip:active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.35), rgba(168, 85, 247, 0.45));
  border-color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.7);
  transform: scale(0.96);
  color: #fff;
}
.keyboard-sugg-chip.chip-artist {
  border-color: rgba(52, 211, 153, 0.8);
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.key-space {
  flex: 3;
  font-size: 15px;
  background: rgba(0, 85, 255, 0.2);
  border-color: rgba(0, 85, 255, 0.5);
}

.key-search-music {
  flex: 2.8;
  background: linear-gradient(135deg, #059669, #0891b2);
  border-color: #34d399;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}
.key-search-music:hover, .key-search-music:active {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.6);
  transform: scale(0.95);
}

.key-search-yt {
  flex: 2.4;
  background: linear-gradient(135deg, #b91c1c, #7e22ce);
  border-color: #f87171;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.35);
}
.key-search-yt:hover, .key-search-yt:active {
  background: linear-gradient(135deg, #dc2626, #9333ea);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.6);
  transform: scale(0.95);
}
/* Error de Login */
.login-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ff8a8a;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  animation: shakeError 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  margin-bottom: 4px;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADAPTACIÓN RESPONSIVA Y FLUIDA PARA TABLETS (IPAD / ANDROID) Y CELULARES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablets Landscape & Portrait (768px - 1024px) ────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --titlebar-h: 46px;
  }

  #iurock-app {
    padding-top: 46px;
  }

  #media-panel {
    width: 32%;
    min-width: 250px;
  }

  .catalog-with-touch-nav {
    padding: 10px 12px;
    gap: 8px;
  }

  #results-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 8px;
  }

  .artist-card, .song-card {
    padding: 6px;
    border-radius: 10px;
    gap: 4px;
  }

  .artist-name, .song-title {
    font-size: 11.5px;
  }

  .artist-meta, .song-author {
    font-size: 10px;
  }

  #touch-nav-bar {
    width: 56px;
    padding: 6px 3px;
    gap: 8px;
    border-radius: 12px;
  }

  .touch-icon {
    font-size: 18px;
  }

  .touch-label {
    font-size: 8.5px;
    margin-top: 3px;
  }

  .categories-bar {
    padding-top: 8px;
    gap: 6px;
  }

  .cat-pill {
    font-size: 11px;
    padding: 6px 12px;
  }

  .vinyl-disc-large {
    width: 120px;
    height: 120px;
  }

  .disc-label {
    width: 40px;
    height: 40px;
    font-size: 9px;
  }

  .alpha-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-radius: 8px;
  }

  .credits-badge, .queue-badge, .btn-fullscreen-toggle {
    font-size: 10px;
    padding: 4px 10px;
  }
}

/* ── Tablets Pequeñas & Pantallas Medianas (600px - 768px) ─────────────────── */
@media (max-width: 768px) {
  #media-panel {
    width: 36%;
    min-width: 220px;
  }

  #results-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
  }

  #touch-nav-bar {
    width: 48px;
    padding: 4px 2px;
  }

  .touch-label {
    display: none;
  }

  .vinyl-disc-large {
    width: 95px;
    height: 95px;
  }

  #vinyl-track-title {
    font-size: 12px;
  }

  #vinyl-track-subtitle {
    font-size: 9.5px;
  }
}

/* ── Teléfonos Celulares (Android / iPhone: < 600px) ───────────────────────── */
@media (max-width: 600px) {
  :root {
    --titlebar-h: 42px;
  }

  #titlebar {
    padding: 0 8px;
  }

  .logo-text {
    font-size: 14px;
  }

  .logo-icon {
    font-size: 16px;
  }

  .badge-mode {
    display: none;
  }

  .credits-badge {
    display: none;
  }

  .queue-badge, .btn-fullscreen-toggle {
    font-size: 9px;
    padding: 3px 8px;
  }

  #iurock-app {
    flex-direction: column;
    height: 100vh;
    padding-top: 42px;
    overflow: hidden;
  }

  /* Catálogo ocupa la parte superior con scroll táctil completo */
  #catalog-panel {
    flex: 1;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .catalog-with-touch-nav {
    padding: 6px;
    gap: 0;
    flex: 1;
    overflow: hidden;
  }

  /* En celulares se oculta la botonera lateral para dar el 100% de ancho al catálogo */
  #touch-nav-bar {
    display: none !important;
  }

  #search-container {
    padding: 6px 8px 2px;
  }

  #search-input {
    padding: 7px 30px 7px 32px;
    font-size: 12px;
    height: 34px;
  }

  .search-magnifier {
    left: 10px;
    font-size: 13px;
  }

  .categories-bar {
    padding-top: 6px;
    padding-bottom: 2px;
    gap: 5px;
  }

  .cat-pill {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 14px;
  }

  #results-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 6px;
  }

  .artist-card, .song-card {
    padding: 5px;
    border-radius: 8px;
    gap: 3px;
  }

  .artist-name, .song-title {
    font-size: 10.5px;
    font-weight: 700;
  }

  .artist-meta, .song-author {
    font-size: 9px;
  }

  .artist-badge-house {
    font-size: 8px;
    padding: 1px 4px;
  }

  #alphabet-bar {
    gap: 3px;
    padding: 3px 0 6px;
  }

  .alpha-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 6px;
  }

  /* Panel de Media en Celulares como reproductor inferior interactivo */
  #media-panel {
    width: 100%;
    min-width: 100%;
    height: 210px;
    border-left: none;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
    z-index: 50;
  }

  #screen-box {
    height: 105px;
  }

  .idle-content {
    gap: 4px;
  }

  .vinyl-disc-large {
    width: 65px;
    height: 65px;
    border-width: 3px;
  }

  .disc-label {
    width: 22px;
    height: 22px;
    font-size: 7px;
  }

  #vinyl-track-title {
    font-size: 11px;
  }

  #vinyl-track-subtitle {
    font-size: 8.5px;
  }

  #player-control-bar {
    padding: 4px 8px;
    gap: 4px;
  }

  .seek-container {
    font-size: 9px;
    gap: 4px;
  }

  #seek-bar {
    height: 3px;
  }

  #now-playing-box {
    padding: 2px 8px 4px;
  }

  #now-title {
    font-size: 11px;
  }

  #now-author {
    font-size: 9.5px;
  }

  .playlist-header {
    padding: 3px 8px;
  }

  .playlist-title {
    font-size: 9.5px;
  }

  .queue-item {
    padding: 4px 6px;
    gap: 6px;
  }

  .queue-thumb {
    width: 28px;
    height: 28px;
  }

  .queue-title {
    font-size: 10.5px;
  }

  .queue-author {
    font-size: 9px;
  }

  /* Teclado Virtual Móvil */
  .virtual-touch-keyboard {
    height: 210px;
    padding: 6px 8px;
  }

  .keyboard-top-bar {
    margin-bottom: 4px;
  }

  .key-btn {
    height: 36px;
    font-size: 14px;
    border-radius: 8px;
  }

  .key-backspace {
    font-size: 11px;
  }

  .key-search {
    font-size: 12px;
  }
}

/* ── ⚙️ Modal de Configuración (Teclas, Créditos y Ajustes) ─────────────── */
.btn-open-settings {
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.25), rgba(0, 240, 255, 0.25));
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.btn-open-settings:hover {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.settings-card {
  max-width: 660px !important;
  width: 95vw !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
  background: rgba(14, 10, 32, 0.96) !important;
  border: 1px solid rgba(0, 85, 255, 0.4) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--glow-purple) !important;
  padding: 24px 26px !important;
  overflow: hidden;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.settings-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.settings-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: #fff;
  box-shadow: var(--glow-magenta);
}

.settings-tab-pane {
  display: none;
  overflow-y: auto;
  max-height: calc(90vh - 230px);
  padding-right: 4px;
}

.settings-tab-pane.active {
  display: block;
  animation: fadeInPane 0.25s ease-out;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-pane-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.5;
  background: rgba(0, 240, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 12px;
  border-radius: 4px;
}

/* Grilla de Teclas */
.keybinds-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  transition: all var(--transition);
}

.keybind-row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 85, 255, 0.4);
}

.keybind-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.keybind-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.keybind-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.keybind-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: monospace, sans-serif;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 6px;
  min-width: 48px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-assign-key {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 110px;
  text-align: center;
}

.btn-assign-key:hover {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  border-color: transparent;
  box-shadow: var(--glow-magenta);
}

.btn-assign-key.capturing {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #fff !important;
  border-color: #f59e0b !important;
  animation: pulseCapturing 1s infinite alternate;
  font-weight: 800;
}

@keyframes pulseCapturing {
  from { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
  to { transform: scale(1.04); box-shadow: 0 0 25px rgba(239, 68, 68, 0.8); }
}

.tab-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* ── Tab Créditos ── */
.credits-setting-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.credits-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toggle-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.toggle-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toggle Switch Switcher */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-color: var(--accent-cyan);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

.free-credits-status {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 0.5px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
}

.free-credits-status.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.credits-balance-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.balance-title {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.balance-counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.balance-number {
  font-size: 38px;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.balance-unit {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.balance-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.btn-credit-adjust {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-credit-adjust:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-credit-adjust.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.balance-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Sección de Monederos (Hoppers) ─────────────────────────────────────── */
.hoppers-section-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  text-align: center;
  padding: 14px 0 8px;
  border-top: 1px solid rgba(245,158,11,0.2);
  margin-top: 14px;
}

.hoppers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.hopper-card {
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.hopper-card:hover {
  transform: none;
}

/* Colores de acento por monedero */
.hopper-card-1 {
  background: rgba(0,240,255,0.06);
  border: 1.5px solid rgba(0,240,255,0.35);
  box-shadow: 0 0 14px rgba(0,240,255,0.08);
}
.hopper-card-1:hover { box-shadow: 0 0 22px rgba(0,240,255,0.18); }

.hopper-card-2 {
  background: rgba(245,158,11,0.06);
  border: 1.5px solid rgba(245,158,11,0.35);
  box-shadow: 0 0 14px rgba(245,158,11,0.08);
}
.hopper-card-2:hover { box-shadow: 0 0 22px rgba(245,158,11,0.18); }

.hopper-card-3 {
  background: rgba(251,146,60,0.06);
  border: 1.5px solid rgba(251,146,60,0.35);
  box-shadow: 0 0 14px rgba(251,146,60,0.08);
}
.hopper-card-3:hover { box-shadow: 0 0 22px rgba(251,146,60,0.18); }

.hopper-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.hopper-icon-wrap {
  font-size: 20px;
  flex-shrink: 0;
}

.hopper-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hopper-num {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.hopper-name-input {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.hopper-name-input:focus { border-color: var(--accent-cyan); }

.hopper-key-badge {
  font-size: 9.5px;
  font-weight: 900;
  background: rgba(0,240,255,0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.hopper-key-inactive {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-muted);
}

.hopper-card-body {
  padding: 0 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hopper-credits-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.hopper-credits-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
}

.hopper-credits-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.hopper-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.hopper-step-btn:hover {
  background: rgba(0,240,255,0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.hopper-step-btn:active { transform: scale(0.92); }

.hopper-credits-input {
  width: 48px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(0,240,255,0.4);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-size: 15px;
  font-weight: 900;
  padding: 3px 4px;
  outline: none;
}
.hopper-credits-input::-webkit-inner-spin-button,
.hopper-credits-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.hopper-example {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}
.hopper-example strong {
  color: var(--accent-cyan);
  font-weight: 900;
}

/* ── Pricing Grid (Tarifas por Tipo de Canción) ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.pricing-col {
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(0,240,255,0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.pricing-col:hover { box-shadow: 0 0 20px rgba(0,240,255,0.10); }

.pricing-col-yt {
  border-color: rgba(239,68,68,0.18);
}
.pricing-col-yt:hover { box-shadow: 0 0 20px rgba(239,68,68,0.12); }

.pricing-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pricing-col-icon {
  font-size: 22px;
  line-height: 1;
}

.pricing-col-title {
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pricing-col-yt .pricing-col-title { color: #f87171; }

.pricing-col-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.pricing-rows {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pricing-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 52px;
}

.pricing-tier-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pricing-dot-normal { background: #6ee7b7; box-shadow: 0 0 5px rgba(110,231,183,0.5); }
.pricing-dot-vip    { background: var(--accent-gold); box-shadow: 0 0 5px rgba(245,158,11,0.5); }
.pricing-dot-plus   { background: #f87171; box-shadow: 0 0 5px rgba(248,113,113,0.5); }

.pricing-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pricing-input {
  width: 60px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(0,240,255,0.35);
  border-radius: 8px;
  color: var(--accent-cyan);
  font-size: 14px;
  font-weight: 900;
  padding: 4px 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pricing-col-yt .pricing-input {
  border-color: rgba(239,68,68,0.35);
  color: #f87171;
}
.pricing-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0,240,255,0.25);
}
.pricing-col-yt .pricing-input:focus {
  border-color: #f87171;
  box-shadow: 0 0 8px rgba(248,113,113,0.25);
}
.pricing-input::-webkit-inner-spin-button,
.pricing-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pricing-unit {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Tab Ajustes Generales ── */
.general-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-item-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
}

.setting-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-item-icon {
  font-size: 22px;
}

.setting-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.setting-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 🎵 Overlay Rectangular de Confirmación de Canción (Créditos / VIP / PLUS) ── */
.song-confirm-card {
  max-width: 580px !important;
  width: 92vw !important;
  background: rgba(13, 9, 30, 0.97) !important;
  border: 1.5px solid rgba(0, 240, 255, 0.4) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 240, 255, 0.25) !important;
  border-radius: 18px !important;
  padding: 22px 24px !important;
  animation: confirmPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmPop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.song-confirm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.song-confirm-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.confirm-credits-display {
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.confirm-credits-val {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

.song-confirm-body {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.confirm-cover-box {
  width: 105px;
  height: 105px;
  min-width: 105px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.confirm-details-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.confirm-artist-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.confirm-title-label {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.confirm-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.confirm-duration-pill, .confirm-type-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.confirm-type-pill {
  background: rgba(0, 85, 255, 0.2);
  color: #c084fc;
  border: 1px solid rgba(0, 85, 255, 0.3);
}

/* 4 Botones de Acción: AGREGAR, VIP, PLUS, CANCELAR */
.song-confirm-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.btn-action-add, .btn-action-vip, .btn-action-plus, .btn-action-cancel {
  border: none;
  font-family: inherit;
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all var(--transition);
  color: #fff;
  text-align: center;
}

.btn-action-icon {
  font-size: 20px;
}

.btn-action-name {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.btn-action-cost {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
}

/* Estilos por botón */
.btn-action-add {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-action-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.6);
}

.btn-action-vip {
  background: linear-gradient(135deg, #0055ff, #00d4ff);
  box-shadow: 0 4px 15px rgba(192, 38, 211, 0.35);
}
.btn-action-vip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192, 38, 211, 0.7);
}

.btn-action-plus {
  background: linear-gradient(135deg, #ea580c, #e11d48);
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}
.btn-action-plus:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.75);
}

.btn-action-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
}
.btn-action-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: translateY(-2px);
}

.confirm-footer-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

/* ── Badges de Prioridad en la Lista de Espera / Queue (PLUS / VIP / NORMAL) ── */
.tier-pill {
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.2;
}

.tier-pill.tier-plus {
  background: linear-gradient(135deg, #ea580c, #e11d48);
  color: #fff;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: pulsePlus 2s infinite ease-in-out;
}

@keyframes pulsePlus {
  0%, 100% { box-shadow: 0 0 8px rgba(234, 88, 12, 0.4); }
  50% { box-shadow: 0 0 16px rgba(225, 29, 72, 0.7); }
}

.tier-pill.tier-vip {
  background: linear-gradient(135deg, #0055ff, #00d4ff);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 85, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tier-pill.tier-normal {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── Modal PINPAD de Seguridad ─────────────────────────────────────────── */
.pin-card {
  max-width: 360px !important;
  padding: 24px 20px !important;
  text-align: center;
  border: 1.5px solid rgba(0, 240, 255, 0.45) !important;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 240, 255, 0.25) !important;
  background: rgba(14, 10, 28, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  border-radius: 16px !important;
}

.pin-header {
  margin-bottom: 18px;
}

.pin-icon-wrap {
  font-size: 32px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
}

.pin-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}

.pin-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

.pin-dots-display {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 16px 0 12px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--accent-cyan);
  border-color: #fff;
  box-shadow: 0 0 12px var(--accent-cyan), 0 0 20px rgba(0, 240, 255, 0.8);
  transform: scale(1.15);
}

.pin-error-msg {
  color: #ff4d4d;
  font-size: 12px;
  font-weight: 800;
  min-height: 20px;
  margin-bottom: 8px;
  animation: shakePin 0.4s ease;
}

.pin-error-msg.hidden {
  visibility: hidden;
}

@keyframes shakePin {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.pinpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.pin-btn {
  height: 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.1s ease;
}

.pin-btn:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transform: scale(1.04);
}

.pin-btn:active {
  transform: scale(0.94);
  background: var(--accent-cyan);
  color: #000;
}

.pin-btn-cancel {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}
.pin-btn-cancel:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.pin-btn-backspace {
  font-size: 18px;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}
.pin-btn-backspace:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* ── Toast / Modal Dorado Central Gigante para Crédito Gratis ── */
.free-credit-gold-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.free-credit-gold-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.free-credit-gold-card {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: radial-gradient(circle at 50% 20%, rgba(254, 240, 138, 0.22) 0%, rgba(26, 18, 5, 0.96) 100%), #140e04;
  border: 2.5px solid #f59e0b;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.5), 0 0 100px rgba(217, 119, 6, 0.3), inset 0 0 30px rgba(245, 158, 11, 0.2);
  transform: scale(0.7);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.free-credit-gold-overlay.show .free-credit-gold-card {
  transform: scale(1);
  animation: goldPulse 1.8s infinite ease-in-out;
}

@keyframes goldPulse {
  0%, 100% {
    box-shadow: 0 0 45px rgba(245, 158, 11, 0.55), 0 0 80px rgba(217, 119, 6, 0.35), inset 0 0 25px rgba(245, 158, 11, 0.2);
    border-color: #fbbf24;
  }
  50% {
    box-shadow: 0 0 70px rgba(245, 158, 11, 0.85), 0 0 120px rgba(245, 158, 11, 0.55), inset 0 0 45px rgba(251, 191, 36, 0.35);
    border-color: #fef08a;
  }
}

.gold-icon-wrap {
  font-size: 52px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.8));
  animation: goldBounce 1s infinite alternate ease-in-out;
}

@keyframes goldBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.08); }
}

.gold-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 0%, #fef08a 30%, #f59e0b 70%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  filter: drop-shadow(0 2px 12px rgba(245, 158, 11, 0.6));
}

.gold-subtitle {
  font-size: 14.5px;
  font-weight: 700;
  color: #fef3c7;
  margin: 0 0 22px 0;
  line-height: 1.4;
}

.gold-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1.5px solid #fbbf24;
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gold-total-badge strong {
  color: #fef08a;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   MODO DISPOSITIVO: PANTALLA PRINCIPAL (TV) VS CONSOLA DE BARRA
   ══════════════════════════════════════════════════════════════════════════════ */

/* Pill en la cabecera (Header) */
.device-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.12);
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  user-select: none;
}
.device-role-pill:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.4);
  transform: translateY(-1px);
}
body.mode-bar-console .device-role-pill {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}
body.mode-bar-console .device-role-pill:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

/* Selector en Modal de Ajustes (Reproducción y Fondos) */
.device-role-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}
@media (max-width: 820px) {
  .device-role-btn-group {
    grid-template-columns: 1fr;
  }
}
.btn-device-role-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 13px 15px;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
}
.btn-device-role-opt:hover {
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.08);
}
.btn-device-role-opt.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(15, 23, 42, 0.9));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}
.btn-device-role-opt#btn-device-mode-auto.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.9));
  border-color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}
.btn-device-role-opt#btn-device-mode-auto.active .role-opt-badge {
  color: #34d399;
}
body.mode-bar-console .btn-device-role-opt#btn-device-mode-bar.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.9));
  border-color: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.3);
}
.role-opt-badge {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #00f0ff;
}
body.mode-bar-console .btn-device-role-opt#btn-device-mode-bar .role-opt-badge {
  color: #fbbf24;
}
.role-opt-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ── Desactivación de Media y Controles Locales en Modo Consola de Barra ── */
body.mode-bar-console #video-player,
body.mode-bar-console #audio-player,
body.mode-bar-console #screen-idle-overlay,
body.mode-bar-console #screen-loading-overlay,
body.mode-bar-console #video-overlay-banner,
body.mode-bar-console #video-business-corner-badge,
body.mode-bar-console #video-fullscreen-qr-badge,
body.mode-bar-console #player-control-bar {
  display: none !important;
}

/* Transformación de Screen Box en Panel de Barra */
body.mode-bar-console #screen-box {
  background: linear-gradient(180deg, rgba(20, 16, 42, 0.95) 0%, rgba(10, 8, 24, 0.98) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 12px 14px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  flex-shrink: 0 !important;
  border-radius: 16px !important;
  margin: 10px 10px 4px 10px !important;
}

/* Panel Bar Console Deck */
.bar-console-deck {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}
body.mode-bar-console .bar-console-deck {
  display: flex;
}

.bar-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}
.bar-deck-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-deck-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulse 1.5s infinite;
}
.bar-deck-badge-text {
  font-size: 11.5px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.8px;
}
.btn-bar-to-main {
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-bar-to-main:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Card: Sonando en TV */
.bar-tv-status-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.bar-tv-live-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 900;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}
.live-dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.2s infinite;
}
.bar-tv-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bar-tv-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}
.bar-tv-meta {
  flex: 1;
  min-width: 0;
}
.bar-tv-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-tv-artist {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.bar-tv-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Card: Código QR Grande para Barra */
.bar-qr-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(0, 0, 0, 0.5));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  margin-top: auto;
}
.bar-qr-box {
  background: #fff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bar-qr-img {
  width: 76px;
  height: 76px;
  display: block;
  image-rendering: pixelated;
}
.bar-qr-meta {
  flex: 1;
  min-width: 0;
}
.bar-qr-title {
  font-size: 12px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.5px;
}
.bar-qr-sub {
  font-size: 10.5px;
  color: #cbd5e1;
  margin: 3px 0 6px;
  line-height: 1.25;
}
.bar-qr-pin-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef08a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

