/* ============================================================
   page-songs.css (Premium Music Player Theme)
   ============================================================ */
.songs-main {
  background-color: #000000;
  color: #ffffff;
  min-height: calc(100vh - 60px);
  padding: 0;
  display: flex;
}

/* New Grid Layout */
.songs-layout-new {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

.songs-header {
  text-align: center;
  margin-bottom: 60px;
}

.song-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.song-card {
  background: #121212;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 30px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.song-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(217, 70, 239, 0.2);
  border-color: rgba(217, 70, 239, 0.3);
}

.song-card .pl-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: #fff;
}

.song-card .pl-meta {
  font-size: 0.9rem;
  color: #a0a0b8;
}

/* Modal Architecture */
.player-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.player-modal[hidden] {
  display: none;
}

.player-modal-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
}

.player-modal-content {
  position: relative;
  width: 95%;
  max-width: 750px;
  height: 780px;
  max-height: 90vh;
  background: #0a0a0a;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 40px 100px rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
  0% { transform: translateY(100px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 24px; right: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255,255,255,0.2);
}

.modal-body-split {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

.modal-left-art {
  flex: 1;
  background: linear-gradient(135deg, #181824 0%, #000000 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.art-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ambient-disc {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #d946ef, #8b5cf6, #3b82f6, #d946ef);
  filter: blur(30px);
  opacity: 0.25;
  animation: spin 10s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.modal-left-art .np-info {
  text-align: center;
  z-index: 1;
}

/* Audio Waveform */
.audio-waveform {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 35px;
  justify-content: center;
}
.audio-waveform .bar {
  width: 3px;
  background: linear-gradient(180deg, #d946ef, #8b5cf6);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  border-radius: 2px;
  height: 6px;
  transition: height 0.2s ease;
}
.audio-waveform.playing .bar {
  animation: premiumEq 1s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
.audio-waveform.playing .bar:nth-child(1) { animation-duration: 0.6s; }
.audio-waveform.playing .bar:nth-child(2) { animation-duration: 0.8s; }
.audio-waveform.playing .bar:nth-child(3) { animation-duration: 0.5s; }
.audio-waveform.playing .bar:nth-child(4) { animation-duration: 0.9s; }
.audio-waveform.playing .bar:nth-child(5) { animation-duration: 0.7s; }
.audio-waveform.playing .bar:nth-child(6) { animation-duration: 0.85s; }
.audio-waveform.playing .bar:nth-child(7) { animation-duration: 0.65s; }

@keyframes premiumEq {
  0% { height: 4px; }
  100% { height: 100%; }
}

.np-pack {
  font-size: 0.85rem;
  background: linear-gradient(to right, #d946ef, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 16px 0;
}

.np-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  line-height: 1.2;
  color: #fff;
}

.title-romanization {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.np-genre {
  font-size: 1rem;
  color: #a0a0b8;
  margin: 0;
}

.modal-right-lyrics {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  background: #000;
}

.modal-footer-controls {
  padding: 20px 30px;
  background: #0c0c0c;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Custom Player */
.custom-player {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 12px 24px 12px 16px;
  backdrop-filter: blur(10px);
}

.play-btn {
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #d946ef;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.15), 0 0 10px rgba(139, 92, 246, 0.15);
}

.play-btn:hover {
  transform: scale(1.05);
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(217, 70, 239, 0.6);
  box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.25), 0 0 15px rgba(139, 92, 246, 0.25);
  color: #e879f9;
}

.progress-container {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d946ef, #8b5cf6);
  border-radius: 3px;
  pointer-events: none;
}

.time-display {
  font-size: 0.85rem;
  color: #a0a0b8;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
}

.time-sep { margin: 0 2px; opacity: 0.5; }

audio { display: none; }

/* Lyrics */
.lyrics-container {
  padding: 30px 40px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar for Lyrics */
.lyrics-container::-webkit-scrollbar {
  width: 6px;
}
.lyrics-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.lyrics-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.lyrics-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lyrics-lang-toggle {
  display: flex;
  gap: 6px;
  align-self: center;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 4px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 7px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover { color: rgba(255, 255, 255, 0.8); }

.lang-btn.is-active {
  background: linear-gradient(to right, #d946ef, #8b5cf6);
  color: #fff;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
}

.lyric-fallback { opacity: 0.55; font-style: italic; }

.lyrics-title {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 24px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lyrics-content {
  font-size: 1.45rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  white-space: pre-wrap;
  max-width: 800px;
  text-align: center;
  margin: auto;
}

/* Karaoke Sync Styles */
.lyric-line {
  transition: opacity 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
  opacity: 0.35;
  margin-bottom: 8px;
}
.lyric-line.active {
  opacity: 1;
  transform: scale(1.02);
  text-shadow: 0 0 12px rgba(217, 70, 239, 0.5), 0 0 24px rgba(139, 92, 246, 0.3);
}
/* Sub-lyrics (Translation) */
.lyric-translation {
  display: block;
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  line-height: 1.4;
  letter-spacing: 0.3px;
  text-shadow: none;
}

.lyric-romanization {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.lyrics-content strong {
  background: linear-gradient(to right, #d946ef, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
  padding: 0;
}

/* Upsell Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.modal-overlay[hidden] { display: none; }
.upsell-box {
  background: #14141a;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  text-align: center;
}
.upsell-box h3 { margin-top: 0; font-size: 2rem; color: #fff; }
.upsell-desc { color: #a0a0b8; margin: 16px 0 32px 0; font-size: 1.1rem; line-height: 1.5; }
.upsell-options {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
.upsell-card {
  flex: 1;
  background: #1a1a24;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.highlight-card {
  background: linear-gradient(145deg, #2a1a2a, #1a1a24);
  border: 1px solid rgba(255, 51, 102, 0.3);
}
.upsell-card h4 { margin: 0 0 12px 0; color: #fff; font-size: 1.2rem; }
.upsell-card p { font-size: 0.9rem; color: #8a8a9e; flex-grow: 1; }
.upsell-card .price { font-size: 1.5rem; font-weight: 800; margin: 16px 0; color: #fff; }
.upsell-card .btn { width: 100%; text-align: center; }

@media (max-width: 900px) {
  .songs-layout { flex-direction: column; }
  .playlist-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); max-height: 300px; }
  .now-playing-header { flex-direction: column; align-items: flex-start; gap: 24px; padding: 24px; }
  .np-title { font-size: 2rem; }
  .np-controls { width: 100%; }
  .lyrics-container { padding: 24px; }
  .lyrics-content { font-size: 1.2rem; }
  .upsell-options { flex-direction: column; }
}
