/**
 * NGN Player Styles
 *
 * Fixed bottom player with dark theme, responsive controls,
 * and queue panel support
 */

/* Player Container */
.ngn-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  border-top: 1px solid #444;
  display: grid;
  grid-template-columns: 180px 1fr 200px 100px;
  gap: 20px;
  align-items: center;
  min-height: 70px;
}

.ngn-player.playing {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a3e 100%);
}

/* Track Info Section */
.ngn-player-track-info {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ngn-player-artwork {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ngn-player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.ngn-player-title {
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

.ngn-player-artist {
  font-size: 10px;
  color: #FF5F1F;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}

/* Controls Section */
.ngn-player-controls {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.ngn-btn {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 18px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.ngn-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ngn-btn.active {
  color: #4CAF50;
}

.ngn-btn-primary {
  background: #4CAF50;
  color: #fff;
  width: 44px;
  height: 44px;
  font-size: 20px;
  padding: 0;
}

.ngn-btn-primary:hover {
  background: #45a049;
  color: #fff;
}

.ngn-btn-shuffle,
.ngn-btn-repeat {
  font-size: 16px;
}

.ngn-btn-repeat.repeat-one::before {
  content: '1';
  position: absolute;
  font-size: 10px;
  font-weight: bold;
  top: 2px;
  right: 2px;
  background: #4CAF50;
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress Section */
.ngn-player-progress {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

.ngn-player-time-current,
.ngn-player-time-total {
  font-size: 11px;
  color: #999;
  min-width: 35px;
}

.ngn-player-seek {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ngn-player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ngn-player-seek::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.ngn-player-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.ngn-player-seek::-moz-range-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.ngn-player-seek::-moz-range-track {
  background: transparent;
  border: none;
}

/* Volume Control */
.ngn-player-volume {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 140px;
}

.ngn-btn-mute {
  flex-shrink: 0;
  font-size: 18px;
}

.ngn-btn-mute.muted {
  color: #FF6B6B;
}

.ngn-player-volume-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ngn-player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: #aaa;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ngn-player-volume-slider::-webkit-slider-thumb:hover {
  background: #fff;
  transform: scale(1.2);
}

.ngn-player-volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #aaa;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.ngn-player-volume-slider::-moz-range-thumb:hover {
  background: #fff;
  transform: scale(1.2);
}

.ngn-player-volume-slider::-moz-range-track {
  background: transparent;
  border: none;
}

/* Right Section - Queue Button */
.ngn-player-right {
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.ngn-btn-queue {
  position: relative;
}

.ngn-queue-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #4CAF50;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Queue Panel */
.ngn-player-queue-panel {
  position: fixed;
  bottom: 70px;
  right: 0;
  width: 350px;
  max-height: calc(100vh - 70px - 20px);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-left: 1px solid #444;
  border-top: 1px solid #444;
  box-shadow: -2px -2px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 999;
  border-radius: 8px 0 0 0;
}

.ngn-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #444;
  flex-shrink: 0;
}

.ngn-queue-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ngn-btn-close-queue {
  font-size: 24px;
  padding: 0;
  width: 32px;
  height: 32px;
}

.ngn-queue-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ngn-queue-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-size: 14px;
}

.ngn-queue-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  border-left: 3px solid transparent;
}

.ngn-queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ngn-queue-item.current {
  background: rgba(76, 175, 80, 0.15);
  border-left-color: #4CAF50;
}

.ngn-queue-item-index {
  font-size: 12px;
  color: #888;
  min-width: 25px;
  text-align: center;
  font-weight: 600;
}

.ngn-queue-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ngn-queue-item-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ngn-queue-item-artist {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ngn-btn-remove-queue {
  flex-shrink: 0;
  font-size: 16px;
  padding: 4px;
  color: #999;
}

.ngn-btn-remove-queue:hover {
  color: #FF6B6B;
}

/* Scrollbar Styling */
.ngn-queue-items::-webkit-scrollbar {
  width: 6px;
}

.ngn-queue-items::-webkit-scrollbar-track {
  background: transparent;
}

.ngn-queue-items::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.ngn-queue-items::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ngn-player {
    grid-template-columns: 150px 1fr 80px;
    gap: 15px;
    padding: 10px 16px;
  }

  .ngn-player-progress {
    display: none;
  }

  .ngn-player-right {
    justify-content: center;
  }

  .ngn-player-queue-panel {
    width: 100%;
    right: 0;
    bottom: 70px;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .ngn-player {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 12px;
    min-height: auto;
  }

  .ngn-player-track-info {
    order: 1;
  }

  .ngn-player-controls {
    order: 2;
    gap: 8px;
  }

  .ngn-player-progress {
    display: flex;
    order: 3;
    width: 100%;
  }

  .ngn-player-volume {
    display: none;
  }

  .ngn-player-right {
    order: 4;
    justify-content: flex-end;
  }

  .ngn-player-artwork {
    width: 45px;
    height: 45px;
  }

  .ngn-btn-primary {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .ngn-player-queue-panel {
    width: 100%;
    bottom: auto;
    top: 0;
    height: calc(100vh - 70px);
    border-radius: 0;
    border-left: none;
    border-top: none;
  }
}

/* Shredder Mixer Panel */
.ngn-shredder-panel {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 95, 31, 0.2);
  z-index: 998;
  padding: 24px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ngn-shredder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.ngn-shredder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ngn-stem-control {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ngn-stem-control label {
  display: block;
  font-[JetBrains Mono] !important;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #888;
}

.ngn-stem-viz {
  width: 100%;
  height: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.ngn-stem-fader {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  outline: none;
  margin-bottom: 20px;
}

.ngn-stem-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #FF5F1F;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 95, 31, 0.5);
}

.ngn-stem-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.ngn-stem-btns button {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

  .ngn-stem-btns button.active {
    background: #FF5F1F;
    color: #fff;
    border-color: #FF5F1F;
  }
@media (max-width: 768px) {
  .ngn-shredder-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Accessibility */
.ngn-btn:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}

.ngn-player-seek:focus,
.ngn-player-volume-slider:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .ngn-player,
  .ngn-player-queue-panel {
    display: none !important;
  }
}
