/* Reset et variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #374151;
  --border-light: #475569;
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 32px;
  height: 32px;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-link {
  background: none;
  border: 1px solid #CACACA;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-light);
}

.nav-link.active {
  color: var(--text);
  background: var(--primary);
}

/* Contrôles lecteur intégrés dans la navigation */
.player-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  max-width: 800px;
  height: 80px;
  background: var(--surface-light);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.current-playing {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.current-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.current-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 0.125rem;
}

.current-metadata {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metadata-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Barre de progression dans les contrôles */
.player-controls .audio-progress {
  width: 100%;
  margin-top: 0.125rem;
}

.player-controls .progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 0.125rem;
}

.player-controls .progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}

.player-controls .progress-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  color: var(--text-muted);
  line-height: 1;
}

.metadata-artist {
  font-weight: 500;
  color: var(--primary);
}

.metadata-title {
  color: var(--text);
}

.metadata-separator {
  color: var(--text-muted);
}

/* Styles spécifiques par genre musical */
.station-icon.electro,
.station-icon.electro-house,
.station-icon.dance-electro {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.station-icon.metal,
.station-icon.heavy-metal,
.station-icon.death-metal {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  color: #ff6b6b;
}

.station-icon.jazz,
.station-icon.jazz-smooth {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.station-icon.rock,
.station-icon.rock-pop,
.station-icon.rock-alternatif {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.station-icon.rap-rnb,
.station-icon.hip-hop {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.station-icon.pop-hits,
.station-icon.pop-rock,
.station-icon.vocal-pop {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.station-icon.eclectique {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffecd2 100%);
}

.station-icon.humour {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
}

.station-icon[class*="80s-90s"] {
  background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn {
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.control-btn.stop-btn {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.control-btn.stop-btn:hover {
  background: #dc2626;
}

.control-btn svg {
  width: 16px;
  height: 16px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-icon {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.volume-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 35px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.volume-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 30px;
}

/* Bouton de lecture dans les contrôles */
.control-btn.play-btn {
  background: var(--success);
}

.control-btn.play-btn:hover {
  background: #059669;
}

/* Styles pour les contrôles quand une vidéo est en cours */
.player-controls.video-playing {
  background: linear-gradient(135deg, var(--surface-light), rgba(37, 99, 235, 0.1));
  border-color: var(--primary);
}

.player-controls.video-playing .current-title {
  color: var(--primary);
}

.player-controls.video-playing .current-category::before {
  content: "📺 ";
}

/* Styles pour les contrôles quand YouTube est en cours */
.player-controls.youtube-playing {
  background: linear-gradient(135deg, var(--surface-light), rgba(239, 68, 68, 0.1));
  border-color: var(--danger);
}

.player-controls.youtube-playing .current-title {
  color: var(--danger);
}

.player-controls.youtube-playing .current-category::before {
  content: "📺 ";
}

/* Container principal */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
}

.filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .player-controls {
    order: 3;
    flex-basis: 100%;
    min-width: auto;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }

  .nav-brand h1 {
    display: none;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  .player-controls {
    padding: 0.75rem;
  }

  .current-title {
    font-size: 0.8125rem;
  }

  .current-metadata {
    font-size: 0.6875rem;
  }

  .metadata-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
  }

  .metadata-separator {
    display: none;
  }

  .current-category {
    font-size: 0.6875rem;
  }

  .volume-slider {
    width: 60px;
  }

  .main-container {
    padding: 1rem;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}