/* ============================================
   MUSIC PLAYER - CHANSON ANNIVERSAIRE
   Dedicated styles for birthday songs page
   ============================================ */

/* Hero Banner Section */
.hero-banner {
  position: relative;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgb(128 156 247 / 85%) 0%, rgba(139, 92, 246, 0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem;
  color: white;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Search Filter */
.search-filter-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  padding-left: 3rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: white;
  color: #1f2937;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.category-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Song List */
.songs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.song-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--category-color, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.song-item:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.song-item:hover::before {
  opacity: 1;
}

.song-item.playing {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.08), white);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.song-item.playing::before {
  opacity: 1;
}

.song-item.hidden {
  display: none;
}

/* Album Art */
.song-album {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.song-album .album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-album .album-icon {
  width: 28px;
  height: 28px;
  color: #6366f1;
}

/* Now Playing Animation */
.song-item.playing .song-album::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Play Button */
.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  position: relative;
  z-index: 1;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn svg {
  width: 16px;
  height: 16px;
}

/* Ripple Effect - Ondes concentriques */
.song-item.playing .play-btn::before,
.song-item.playing .play-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.6);
  transform: translate(-50%, -50%);
  animation: ripple 2s ease-out infinite;
  z-index: -1;
}

.song-item.playing .play-btn::after {
  animation-delay: 1s;
}

@keyframes ripple {
  0% {
    width: 100%;
    height: 100%;
    opacity: 1;
  }
  100% {
    width: 180%;
    height: 180%;
    opacity: 0;
    border-width: 1px;
  }
}

/* Song Info */
.song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.song-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.song-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.style-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--category-color, #e0e7ff);
  color: #1f2937;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Song Actions */
.song-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.song-duration {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.song-duration svg {
  width: 13px;
  height: 13px;
}

.download-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f3f4f6;
  color: #6b7280;
}

.download-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
  transform: translateY(-2px);
}

.download-btn svg {
  width: 16px;
  height: 16px;
}

/* Category Colors */
.song-item[data-category="Pop, Dance & Électro"] {
  --category-color: #fde68a;
}

.song-item[data-category="Années 70-80-90"] {
  --category-color: #fde047;
}

.song-item[data-category="Chansons pour Enfants"] {
  --category-color: #bbf7d0;
}

.song-item[data-category="Rock & Métal"] {
  --category-color: #fecaca;
}

.song-item[data-category="Latino, Tropical & World"] {
  --category-color: #fed7aa;
}

.song-item[data-category="Jazz, Soul & Lounge"] {
  --category-color: #ddd6fe;
}

.song-item[data-category="Acoustique & Instrumental"] {
  --category-color: #bfdbfe;
}

/* License Modal Customization */
.license-modal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.license-modal .modal-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

.license-modal .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}

.license-modal .btn-close {
  filter: brightness(0) invert(1);
}

.license-modal .modal-body {
  background-color: white;
  border-radius: 0 0 16px 16px;
}

.license-info {
  padding: 1.5rem 0;
}

.license-field {
  margin-top: 1.5rem;
}

.license-field label {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
  display: block;
}

.copy-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.attribution-text {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1f2937;
  background: #f9fafb;
  margin: 0;
}

.attribution-text a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

.attribution-text a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.copy-btn {
  padding: 0.75rem 1.5rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: #4f46e5;
  transform: translateY(-2px);
}

.copy-btn.copied {
  background: #10b981;
}

.license-footer-btns {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-download-primary {
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-download-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Empty State */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.no-results svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-results.hidden {
  display: none;
}

/* Lyrics Button */
.lyrics-btn {
  font-size: 0.875rem;
  padding: 0.1rem 0.5rem;
  border-radius: 5px;
  font-weight: 400;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
  transition: all 0.3s ease;
}

.lyrics-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

/* Lyrics Modal */
#lyricsModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#lyricsModal .modal-header {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

#lyricsModal .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}

#lyricsModal .btn-close {
  filter: brightness(0) invert(1);
}

#lyricsModal .modal-body {
  padding: 2rem;
  background-color: white;
}

.lyrics-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1f2937;
}

.lyrics-content p {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .category-filters {
    justify-content: center;
  }

  .song-item {
    gap: 0.625rem;
  }

  .song-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .song-title {
    font-size: 0.9rem;
  }

  .song-actions {
    gap: 0.5rem;
  }

  .copy-wrapper {
    flex-direction: column;
  }

  .copy-btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .hero-banner {
    min-height: 250px;
  }

  .hero-content {
    padding: 2rem 1.5rem;
  }

  .category-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .song-item {
    padding: 0.625rem 0.75rem;
  }

  .song-album {
    width: 48px;
    height: 48px;
  }

  .song-album .album-icon {
    width: 24px;
    height: 24px;
  }

  .play-btn {
    width: 36px;
    height: 36px;
  }

  .play-btn svg {
    width: 14px;
    height: 14px;
  }

  .download-btn {
    width: 32px;
    height: 32px;
  }

  .download-btn svg {
    width: 14px;
    height: 14px;
  }

  .song-duration {
    font-size: 0.75rem;
  }

  .song-duration svg {
    width: 12px;
    height: 12px;
  }

  .style-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}
