/* ==================== Unified Player Styles ==================== */
/* Phase 5: Persistent audio player across all zones */

/* OLD unified-player hidden - using v2 bottom-bar now */
.unified-player {
  display: none !important;
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 800px;
  background: linear-gradient(180deg, rgba(20, 15, 30, 0.98) 0%, rgba(10, 8, 18, 0.98) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px 16px 0 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 600;
  transition: bottom 0.3s ease;
  backdrop-filter: blur(20px);
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
}

.unified-player.visible {
  bottom: 80px; /* Above the zone navigation */
}

.unified-player.playing {
  border-color: var(--purple, #a855f7);
}

/* Track Info */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  max-width: 250px;
}

.player-artwork {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--void-light);
}

.player-meta {
  overflow: hidden;
}

.player-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn:hover {
  background: rgba(168, 85, 247, 0.3);
  transform: scale(1.05);
}

.player-btn.main {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--purple, #a855f7), #7c3aed);
  font-size: 16px;
}

.player-btn.main:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* Progress */
.player-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.player-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

.player-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.player-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple, #a855f7), var(--cyan, #00fff5));
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.player-progress:hover .progress-fill {
  background: linear-gradient(90deg, #c084fc, #22d3ee);
}

/* Actions */
.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-action-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: scale(1.05);
}

/* Volume */
.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-icon {
  font-size: 14px;
}

.player-volume input[type="range"] {
  width: 60px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
}

/* When player is visible, give card-space more bottom padding */
body.player-visible .card-space {
  padding-bottom: 180px !important;
}

/* Zone button flash animation */
.zone-btn.flash {
  animation: zone-flash 0.5s ease 2;
}

@keyframes zone-flash {
  0%, 100% { background: rgba(168, 85, 247, 0.1); }
  50% { background: rgba(168, 85, 247, 0.4); }
}

/* Responsive */
@media (max-width: 768px) {
  .unified-player {
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: wrap;
    bottom: -120px;
  }
  
  .unified-player.visible {
    bottom: 80px; /* Above the zone navigation */
  }
  
  .player-track-info {
    min-width: 140px;
    max-width: 180px;
  }
  
  .player-artwork {
    width: 40px;
    height: 40px;
  }
  
  .player-progress-wrap {
    order: 4;
    width: 100%;
    min-width: unset;
  }
  
  .player-actions {
    margin-left: auto;
  }
  
  .player-volume {
    display: none;
  }
}

@media (max-width: 480px) {
  .player-track-info {
    min-width: 100px;
    max-width: 140px;
  }
  
  .player-title {
    font-size: 12px;
  }
  
  .player-action-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}
