/* ═══════════════════════════════════════════
   RETROVAULT MOD PLAYER — CSS
   ═══════════════════════════════════════════ */

/* ═══ PLAYER PAGE LAYOUT ═══ */
.rv-player-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 140px;
}

.rv-status {
  text-align: center;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 18px;
  transition: opacity 0.5s;
}
.rv-status.error { color: var(--pink); }
.rv-status.ready { color: var(--green); }

/* ═══ VISUALIZER CONTAINER ═══ */
.rv-viz-container {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.rv-viz-container.playing {
  border-color: var(--purple);
  box-shadow: var(--glow-purple);
}

#rv-viz-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 8px;
}

.rv-viz-overlay {
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.4s;
  background: rgba(0, 0, 0, 0.3);
}

.rv-viz-overlay.hidden { opacity: 0; pointer-events: none; }

.rv-viz-idle {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ═══ VIZ MODE BUTTONS ═══ */
.rv-viz-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.rv-viz-btn {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
}

.rv-viz-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.rv-viz-btn.active {
  border-color: var(--purple);
  background: rgba(139, 45, 255, 0.15);
  color: var(--purple);
  box-shadow: 0 0 10px rgba(139, 45, 255, 0.2);
}

.rv-auto-btn {
  font-size: 14px;
  padding: 4px 10px;
  margin-left: 4px;
}

.rv-auto-btn.active {
  animation: autoSpin 2s linear infinite;
}

@keyframes autoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══ NOW PLAYING ═══ */
.rv-now-playing {
  text-align: center;
  margin-bottom: 16px;
}

.rv-track-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 2.5vw, 20px);
  color: var(--purple);
  letter-spacing: 2px;
  margin-bottom: 4px;
  min-height: 24px;
}

.rv-track-meta {
  font-size: 12px;
  color: var(--text-muted);
  min-height: 18px;
}

/* ═══ PROGRESS BAR ═══ */
.rv-progress-container {
  margin-bottom: 20px;
  cursor: pointer;
  padding: 4px 0;
}

.rv-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.rv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s linear;
}

.rv-progress-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ═══ CONTROLS ═══ */
.rv-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.rv-ctrl-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-ctrl-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: var(--glow-purple);
}

.rv-ctrl-btn.rv-play {
  width: 64px;
  height: 64px;
  border: 2px solid var(--purple);
  color: var(--purple);
  font-size: 24px;
}

.rv-ctrl-btn.rv-play:hover {
  background: rgba(139, 45, 255, 0.15);
  transform: scale(1.05);
}

.rv-ctrl-btn.rv-play.active {
  background: rgba(139, 45, 255, 0.2);
  box-shadow: 0 0 25px rgba(139, 45, 255, 0.4);
}

/* ═══ VOLUME ═══ */
.rv-volume-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.rv-volume-icon {
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.rv-volume-icon:hover { color: var(--purple); }

.rv-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  outline: none;
}

.rv-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 45, 255, 0.5);
}

.rv-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  border: none;
}

/* ═══ PLAYLIST ═══ */
.rv-playlist {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.rv-playlist-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rv-playlist-header h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  margin: 0;
}

.rv-pl-count {
  font-size: 11px;
  color: var(--text-muted);
}

.rv-pl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(26, 37, 64, 0.5);
}

.rv-pl-item:last-child { border-bottom: none; }
.rv-pl-item:hover { background: rgba(139, 45, 255, 0.06); }

.rv-pl-item.active {
  background: rgba(139, 45, 255, 0.1);
  border-left: 3px solid var(--purple);
}

.rv-pl-item.active .rv-pl-title { color: var(--purple); }

.rv-pl-num {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-muted);
  width: 24px;
  text-align: right;
}

.rv-pl-playing {
  display: none;
  color: var(--purple);
  font-size: 14px;
  width: 24px;
  text-align: right;
}

.rv-pl-item.active .rv-pl-num { display: none; }
.rv-pl-item.active .rv-pl-playing { display: block; }

.rv-pl-info { flex: 1; min-width: 0; }

.rv-pl-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-pl-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.rv-pl-format {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(139, 45, 255, 0.1);
  color: var(--purple);
  border: 1px solid rgba(139, 45, 255, 0.2);
  flex-shrink: 0;
}

/* ═══ FIXED PLAYER BAR ═══ */
.rv-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(6, 8, 16, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rv-player-bar.visible { transform: translateY(0); }

.rv-bar-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  width: 0%;
  transition: width 0.3s linear;
}

.rv-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.rv-bar-viz {
  width: 72px;
  height: 36px;
  border-radius: 4px;
  flex-shrink: 0;
}

.rv-bar-info {
  flex: 1;
  min-width: 0;
}

.rv-bar-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-bar-artist {
  font-size: 10px;
  color: var(--text-muted);
}

.rv-bar-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.rv-bar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-bar-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.rv-bar-btn.rv-bar-play {
  width: 44px;
  height: 44px;
  border-color: var(--purple);
  color: var(--purple);
  font-size: 18px;
}

/* Body padding when player bar is visible */
body.rv-player-open {
  padding-bottom: 70px;
}

/* ═══ RESPONSIVE ═══ */

/* Tablet */
@media (max-width: 768px) {
  .rv-player-page { padding: 24px 16px 130px; }
  #rv-viz-canvas { height: 180px; }
  .rv-viz-btn { font-size: 8px; padding: 5px 10px; }
  .rv-ctrl-btn.rv-play { width: 56px; height: 56px; font-size: 22px; }
  .rv-ctrl-btn { width: 42px; height: 42px; font-size: 16px; }
}

/* Phone */
@media (max-width: 480px) {
  .rv-player-page { padding: 16px 12px 120px; }
  #rv-viz-canvas { height: 140px; }

  .rv-viz-controls { gap: 4px; }
  .rv-viz-btn { font-size: 7px; padding: 4px 8px; letter-spacing: 1px; }
  .rv-auto-btn { font-size: 12px; padding: 3px 8px; }

  .rv-track-title { font-size: 14px; letter-spacing: 1px; }
  .rv-controls { gap: 12px; }
  .rv-ctrl-btn.rv-play { width: 52px; height: 52px; font-size: 20px; }
  .rv-ctrl-btn { width: 38px; height: 38px; font-size: 14px; }
  .rv-volume-slider { width: 120px; }

  .rv-pl-item { padding: 10px 14px; gap: 10px; }
  .rv-pl-title { font-size: 11px; }
  .rv-pl-format { font-size: 8px; padding: 2px 6px; }

  /* Bar */
  .rv-bar-viz { display: none; }
  .rv-bar-title { font-size: 10px; }
  .rv-bar-btn { width: 32px; height: 32px; font-size: 12px; }
  .rv-bar-btn.rv-bar-play { width: 40px; height: 40px; font-size: 16px; }
  .rv-player-bar { padding: 6px 12px; }
}
