/* ============================================================================
   RAILBAN HI-FI MUSIC PLAYER PRO — Vector UI, Spectrum, Drag & Drop, Lyrics
   ============================================================================ */

/* Crisp Lucide-style inline SVG alignment */
.m-ico {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m-ico-lg { width: 18px; height: 18px; }
.m-ico-xl { width: 22px; height: 22px; }

/* Smart Disabled Controls when DETENIDO */
.control-btn.ctrl-disabled,
.music-controls .control-btn.ctrl-disabled {
  opacity: 0.4 !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
  cursor: not-allowed !important;
}

.music-controls .control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition: transform 0.16s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}
.music-controls .control-btn.play-pause-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Status pill dot */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Smooth Horizontal Volume Slider Panel */
.volume-pro-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.55);
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.volume-pro-panel.vol-warn {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.14);
}
.volume-pro-panel.vol-danger {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.vol-mute-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.vol-mute-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.4); color: #fff; }
.vol-mute-btn.muted { color: #ef4444; border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.14); }

.vol-slider-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 110px;
}
#music-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 66.6%, rgba(255,255,255,0.14) 66.6%);
  outline: none;
  cursor: pointer;
}
#music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.65);
  cursor: pointer;
  transition: transform 0.14s ease;
}
#music-volume-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.volume-pro-panel.vol-warn #music-volume-slider::-webkit-slider-thumb { border-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.75); }
.volume-pro-panel.vol-danger #music-volume-slider::-webkit-slider-thumb { border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.85); }

.vol-overdrive-badge {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.volume-pro-panel.vol-warn .vol-overdrive-badge {
  display: inline-flex;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.volume-pro-panel.vol-danger .vol-overdrive-badge {
  display: inline-flex;
  color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Queue Header — Clean Single Line Title + Meta */
.queue-header-bar {
  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;
  flex-wrap: wrap;
  gap: 10px;
}
.queue-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.queue-header-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}
.queue-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.queue-meta-inline #music-queue-count { color: #60a5fa; }
.queue-meta-inline #music-queue-time { color: #c084fc; }
.queue-meta-sep { opacity: 0.5; }

/* Live Search Autocomplete Dropdown */
.music-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.music-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: none;
}
.music-autocomplete-dropdown.open { display: block; animation: fadeIn 0.16s ease; }
.music-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.14s ease;
}
.music-ac-item:last-child { border-bottom: none; }
.music-ac-item:hover, .music-ac-item.selected { background: rgba(99, 102, 241, 0.18); }
.music-ac-thumb {
  width: 48px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
}
.music-ac-meta { flex: 1; min-width: 0; }
.music-ac-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-ac-author {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-ac-dur {
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Real-Time Frequency Spectrum Canvas */
.music-spectrum-box {
  width: 100%;
  height: 76px;
  margin-top: 10px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.88), rgba(4, 7, 16, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  position: relative;
}
#music-spectrum-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Drag & Drop Queue Rows + Quick Actions */
.queue-pro-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.queue-pro-row:hover { background: rgba(255, 255, 255, 0.065); border-color: rgba(99, 102, 241, 0.3); }
.queue-pro-row.is-current {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(168, 85, 247, 0.1));
  border-color: rgba(59, 130, 246, 0.45);
}
.queue-pro-row.dragging { opacity: 0.45; transform: scale(0.985); }
.queue-pro-row.drag-over { border-top: 2px solid #00f2fe; background: rgba(0, 242, 254, 0.08); }
.queue-drag-handle {
  color: #64748b;
  cursor: grab;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  flex-shrink: 0;
}
.queue-drag-handle:active { cursor: grabbing; }
.queue-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.queue-row-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.queue-row-btn:hover { background: rgba(59, 130, 246, 0.22); color: #fff; border-color: rgba(59, 130, 246, 0.45); }
.queue-row-btn.danger:hover { background: rgba(239, 68, 68, 0.22); color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); }

/* Smart Autoplay Suggestions Box */
.autoplay-suggestions-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: none;
}
.autoplay-suggestions-box.visible { display: block; }
.autoplay-suggestions-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.autoplay-sug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.15);
  margin-bottom: 6px;
}
.autoplay-sug-row img {
  width: 38px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Custom EQ Preset Chips */
.eq-custom-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(0, 242, 254, 0.4) !important;
}
.eq-chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-size: 0.75rem;
  line-height: 1;
}
.eq-chip-del:hover { background: rgba(239, 68, 68, 0.45); color: #fff; }

/* DSP Pitch/Speed & Crossfade Controls */
.dsp-pro-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.dsp-speed-wrap, .dsp-crossfade-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.crossfade-pill {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.crossfade-pill.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #fff;
}

/* Lyrics Side Modal */
#music-lyrics-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: flex-end;
}
#music-lyrics-modal.open { display: flex; }
.lyrics-drawer {
  width: min(460px, 96vw);
  height: 100vh;
  background: var(--glass-bg-elevated, rgba(12, 17, 29, 0.78));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.10), -20px 0 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  padding: 22px;
  animation: fadeIn 0.2s ease;
}
.lyrics-body {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 0.94rem;
  color: #e2e8f0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 14px;
}

/* Keyboard Shortcuts Legend Bar */
.music-shortcuts-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
  color: #94a3b8;
}
.music-shortcuts-bar kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: #f8fafc;
  margin-right: 4px;
}

@media (max-width: 640px) {
  .queue-header-title-row { flex-wrap: wrap; }
  .volume-pro-panel { padding: 8px 12px; }
  .music-shortcuts-bar { display: none; }
}

/* Music Server Card Role Badge (Admin / DJ / Miembro) */
.music-server-card {
  position: relative;
}
.music-role-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  z-index: 3;
  pointer-events: none;
}
.music-role-badge.role-admin {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}
.music-role-badge.role-dj {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.45);
}
.music-role-badge.role-member {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.32);
}
.btn.perm-locked,
.filter-chip.perm-locked {
  opacity: 0.4 !important;
  pointer-events: none !important;
  filter: grayscale(0.45);
}
