@charset "utf-8";

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,600;0,700;1,300;1,800&display=swap");
@import url("bootstrap.min.css");

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom right, #111827 0%, #374151 50%, #111827 100%);
  color: #fff;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000 0%, #111 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  animation: fadeInUp 0.8s ease;
}

.loading-artwork {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
}

.loading-artwork-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 15px;
}

.loading-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  animation: shimmer 2s infinite;
}

.loading-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.loading-subtitle {
  font-size: 16px;
  color: #ccc;
  margin-bottom: 30px;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, #fff 0%, #ccc 100%);
  border-radius: 2px;
  animation: loadingProgress 2s ease-in-out infinite;
}

/* Skeleton Loading Animations */
.song-skeleton,
.artist-skeleton,
.history-song-skeleton,
.history-artist-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  display: inline-block;
  width: 100%;
  height: 1em;
}

.artist-skeleton {
  width: 70%;
}

.history-song-skeleton {
  width: 80%;
}

.history-artist-skeleton {
  width: 60%;
}

/* Artwork Loading */
.loading-artwork-main {
  position: relative;
}

.artwork-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-artwork-main.loading .artwork-loading-spinner {
  opacity: 1;
}

/* Button Loading */
.btn-play {
  position: relative;
  overflow: hidden;
}

.btn-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-play.loading .btn-loading-spinner {
  opacity: 1;
}

.btn-play.loading i,
.btn-play.loading span {
  opacity: 0;
}

/* Lyrics Loading */
.lyrics-loading-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  opacity: 0;
}

.lyrics.loading .lyrics-loading-dot {
  opacity: 1;
}

.lyrics-loading {
  padding: 20px 0;
}

.lyrics-skeleton-line {
  height: 16px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.lyrics-skeleton-line.short {
  width: 60%;
}

/* History Cover Loading */
.cover-historic {
  position: relative;
}

.cover-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cover-historic.loading .cover-loading-spinner {
  opacity: 1;
}

/* Lyrics overlay — slate theme (matches body / history modal) */

body:has(.player-container.lyrics-open),
body:has(.player-container.history-open) {
  overflow: hidden;
}

.lyrics-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.32s;
}

.lyrics-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.lyrics-panel-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  line-height: 1;
  color: #e5e7eb;
  cursor: pointer;
  padding: 0;
  border-radius: 0 var(--lyrics-modal-radius, 16px) 0 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 5;
  box-sizing: border-box;
}

.lyrics-panel-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.lyrics-panel-close:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.7);
  outline-offset: -2px;
}

.lyrics-panel-content {
  --lyrics-modal-radius: 16px;
  display: flex;
  width: 100%;
  max-width: 960px;
  max-height: min(85vh, 720px);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98) 0%, rgba(30, 41, 59, 0.99) 45%, rgba(17, 24, 39, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--lyrics-modal-radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(18px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.lyrics-panel.is-open .lyrics-panel-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .lyrics-panel,
  .history-panel {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .lyrics-panel-content,
  .history-panel-content {
    transition-duration: 0.01ms !important;
  }
}

/* History overlay — same shell, motion, and slate card as lyrics */
.history-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.32s;
}

.history-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.history-panel-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  line-height: 1;
  color: #e5e7eb;
  cursor: pointer;
  padding: 0;
  border-radius: 0 var(--lyrics-modal-radius, 16px) 0 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 5;
  box-sizing: border-box;
}

.history-panel-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.history-panel-close:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.7);
  outline-offset: -2px;
}

.history-panel-content {
  --lyrics-modal-radius: 16px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  min-height: 0;
  max-height: min(85vh, 720px);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98) 0%, rgba(30, 41, 59, 0.99) 45%, rgba(17, 24, 39, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--lyrics-modal-radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(18px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.history-panel.is-open .history-panel-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.history-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 52px 24px 24px;
}

.history-panel-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 18px;
  font-family: "Poppins", sans-serif;
}

.history-panel .history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  margin: 0;
}

.history-panel .history-list::-webkit-scrollbar {
  width: 8px;
}

.history-panel .history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.history-panel .history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.history-panel .history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.history-panel .history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 0;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.history-panel .history-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.history-panel .cover-historic {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(15, 23, 42, 0.6);
}

.history-panel .cover-historic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.history-panel .music-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.history-panel .music-info .song {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 6px;
  text-transform: none;
  color: #f9fafb;
  line-height: 1.35;
  font-family: "Poppins", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-panel .music-info .artist {
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: none;
  line-height: 1.3;
  font-family: "Poppins", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-panel .music-info .played-time {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 8px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.02em;
}

.history-panel .streaming-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.history-panel .streaming-btn {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

.history-panel .streaming-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.history-panel .lyrics-btn {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.history-panel .lyrics-btn:hover {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

.history-panel .no-history,
.history-panel .history-error {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-family: "Poppins", sans-serif;
}

.history-panel .no-history p,
.history-panel .history-error p {
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.55;
}

.history-panel .history-error p {
  color: #f87171;
}

@media (max-width: 1024px) {
  .history-panel {
    padding: 20px 16px;
  }

  .history-panel-content {
    max-width: 100%;
    max-height: min(88vh, 680px);
  }
}

@media (max-width: 768px) {
  .history-panel {
    padding: 12px;
    align-items: stretch;
  }

  .history-panel-content {
    --lyrics-modal-radius: 14px;
    max-height: min(92vh, 800px);
    border-radius: var(--lyrics-modal-radius);
  }

  .history-panel-body {
    padding: 48px 18px 20px;
  }

  .history-panel-close {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    border-radius: 0 var(--lyrics-modal-radius) 0 10px;
  }

  .history-panel .cover-historic {
    width: 56px;
    height: 56px;
  }
}

.lyrics-artwork-section {
  flex: 0 0 38%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.lyrics-artwork {
  width: min(240px, 70vw);
  height: min(240px, 70vw);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lyrics-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lyrics-song-info {
  text-align: center;
  width: 100%;
  padding: 0 8px;
}

.lyrics-song-info h3 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: #f9fafb;
  line-height: 1.3;
  font-family: "Poppins", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lyrics-song-info p {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #94a3b8;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  line-height: 1.4;
}

.lyrics-text-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 32px 32px;
  overflow: hidden;
}

.lyrics-text-section .lyrics-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 16px;
  font-family: "Poppins", sans-serif;
}

.lyrics-text {
  flex: 1;
  overflow-y: auto;
  line-height: 1.85;
  font-size: clamp(0.95rem, 1.8vw, 1.0625rem);
  color: #e5e7eb;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  padding-right: 8px;
  max-width: 42em;
}

.lyrics-text.lyrics-text--message {
  color: #94a3b8;
  font-style: italic;
  line-height: 1.65;
}

.lyrics-text::-webkit-scrollbar {
  width: 8px;
}

.lyrics-text::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.lyrics-text::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.lyrics-text::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lyrics-text p {
  margin: 0 0 1em;
}

.lyrics-text p:last-child {
  margin-bottom: 0;
}

.lyrics-text.loading {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.lyrics-footer {
  flex-shrink: 0;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 42em;
}

.lyrics-footer[hidden] {
  display: none !important;
}

.lyrics-footer .lyrics-writers,
.lyrics-footer .lyrics-attribution {
  margin: 0;
  font-size: clamp(0.75rem, 1.4vw, 0.8125rem);
  line-height: 1.55;
  color: #94a3b8;
  font-family: "Poppins", sans-serif;
}

.lyrics-footer .lyrics-writers {
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.lyrics-footer .lyrics-writers:empty,
.lyrics-footer .lyrics-attribution:empty {
  display: none;
}

.lyrics-panel .lyrics-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.lyrics-panel .lyrics-skeleton-line {
  height: 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  width: 100%;
}

.lyrics-panel .lyrics-skeleton-line.short {
  width: 72%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .lyrics-panel {
    padding: 20px 16px;
  }

  .lyrics-panel-content {
    max-width: 100%;
    max-height: min(88vh, 680px);
  }

  .lyrics-artwork-section {
    flex: 0 0 34%;
    padding: 24px 20px;
  }
}

@media (max-width: 768px) {
  .lyrics-panel {
    padding: 12px;
    align-items: stretch;
  }

  .lyrics-panel-content {
    --lyrics-modal-radius: 14px;
    flex-direction: column;
    max-height: min(92vh, 800px);
    border-radius: var(--lyrics-modal-radius);
  }

  .lyrics-artwork-section {
    flex: 0 0 auto;
    max-width: none;
    padding: 24px 20px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .lyrics-artwork {
    width: 160px;
    height: 160px;
    margin-bottom: 16px;
  }

  .lyrics-text-section {
    flex: 1;
    min-height: 0;
    padding: 20px 20px 24px;
  }

  .lyrics-text {
    max-width: none;
    font-size: 1rem;
  }

  .lyrics-footer {
    max-width: none;
  }

  .lyrics-panel-close {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    border-radius: 0 var(--lyrics-modal-radius) 0 10px;
  }
}

@media (max-width: 480px) {
  .lyrics-artwork {
    width: 140px;
    height: 140px;
  }

  .lyrics-text {
    font-size: 0.9375rem;
    line-height: 1.75;
  }
}

.cover-site {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(to bottom right, #0f172a 0%, #1e1b4b 40%, #111827 100%);
  z-index: 1;
}

/* Web Audio spectrum (behind blurred art, above lava blobs) */
.player-ambient-viz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.cover-site.viz-active .player-ambient-viz {
  opacity: 0.42;
}

.cover-site:not(.viz-active) .player-ambient-viz {
  opacity: 0;
}

/* Lava-lamp style slow blobs */
.player-backdrop-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.backdrop-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  -webkit-filter: blur(72px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.backdrop-blob--1 {
  width: min(85vw, 720px);
  height: min(85vw, 720px);
  left: -18%;
  top: -12%;
  background: radial-gradient(
    circle at 35% 40%,
    rgba(56, 189, 248, 0.55) 0%,
    rgba(99, 102, 241, 0.35) 45%,
    transparent 68%
  );
  animation: backdropBlobDrift1 22s ease-in-out infinite alternate;
}

.backdrop-blob--2 {
  width: min(75vw, 640px);
  height: min(75vw, 640px);
  right: -22%;
  top: 8%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(244, 114, 182, 0.45) 0%,
    rgba(168, 85, 247, 0.35) 50%,
    transparent 70%
  );
  animation: backdropBlobDrift2 26s ease-in-out infinite alternate;
}

.backdrop-blob--3 {
  width: min(90vw, 780px);
  height: min(90vw, 780px);
  left: 5%;
  bottom: -35%;
  background: radial-gradient(
    circle at 45% 35%,
    rgba(34, 211, 238, 0.4) 0%,
    rgba(59, 130, 246, 0.3) 55%,
    transparent 72%
  );
  animation: backdropBlobDrift3 30s ease-in-out infinite alternate;
}

.backdrop-blob--4 {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  right: 10%;
  bottom: 5%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(251, 191, 36, 0.22) 0%,
    rgba(249, 115, 22, 0.28) 45%,
    transparent 65%
  );
  animation: backdropBlobDrift4 18s ease-in-out infinite alternate;
}

@keyframes backdropBlobDrift1 {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate(12%, 14%) scale(1.12) rotate(8deg);
  }
}

@keyframes backdropBlobDrift2 {
  0% {
    transform: translate(0, 0) scale(1.05) rotate(0deg);
  }
  100% {
    transform: translate(-10%, 18%) scale(1.08) rotate(-6deg);
  }
}

@keyframes backdropBlobDrift3 {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate(-8%, -12%) scale(1.15) rotate(5deg);
  }
}

@keyframes backdropBlobDrift4 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(16%, -10%) scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop-blob {
    animation: none !important;
    opacity: 0.35;
  }
}

.bg-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.62) 0%, rgba(30, 27, 75, 0.45) 50%, rgba(17, 24, 39, 0.72) 100%);
  z-index: 2;
}

.bg-mask::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23374151" fill-opacity="0.1"%3E%3Ccircle cx="30" cy="30" r="1"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.3;
  z-index: 1;
}

main {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1100px;
  padding: 30px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

.container {
  width: 100%;
}

/* Spotify-style Player Interface */
.player-interface {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

/* Left Side: Artwork */
.player-left {
  flex-shrink: 0;
}

.main-artwork {
  width: 450px;
  height: 450px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.main-artwork:hover {
  transform: scale(1.02);
}

/* Same grid cell as cover — stacks above artwork (see-through + text-shadow) */
.main-artwork .watermark {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  pointer-events: none;
}

/* Stream beacon upper-left on cover (same slot station name had) */
.main-artwork .stream-status-beacon {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 3;
  margin: 0.85rem 0 0 0.85rem;
  margin-bottom: 0;
  max-width: calc(100% - 1.7rem);
  flex-wrap: wrap;
}

/* Station name in right column (was beacon slot): see-through + blurred text-shadow */
.song-info .current-station {
  margin: 0 0 18px 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  font-size: clamp(1.1875rem, 3.125vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  text-align: left;
  max-width: 100%;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.75),
    0 0 4px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.35),
    0 0 18px rgba(255, 255, 255, 0.2);
}

.song-info .current-station .artist-skeleton {
  max-width: 12.5rem;
  height: 1.25rem;
  margin-left: 0;
  display: block;
  -webkit-text-fill-color: unset;
  text-shadow: none;
}

#currentCoverArt {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  z-index: 0;
  background: url("../images/cover.png") no-repeat center;
  background-size: cover;
  transition: background-image 1s ease;
}

/* Right Side: Song Info and Controls */
.player-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

/* Song Information */
.song-info {
  margin-bottom: 40px;
  text-align: left;
}

/* Stream on-air / offline beacon */
.stream-status-beacon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}

.stream-status-beacon__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25);
}

.stream-status-beacon--unknown .stream-status-beacon__dot {
  animation: stream-beacon-pulse-muted 2s ease-in-out infinite;
}

.stream-status-beacon--online {
  color: rgba(187, 247, 208, 0.95);
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.stream-status-beacon--online .stream-status-beacon__dot {
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.65);
  animation: stream-beacon-pulse-green 1.6s ease-in-out infinite;
}

.stream-status-beacon--offline {
  color: rgba(254, 202, 202, 0.95);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.12);
}

.stream-status-beacon--offline .stream-status-beacon__dot {
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.55);
  animation: stream-beacon-pulse-red 1.4s ease-in-out infinite;
}

@keyframes stream-beacon-pulse-green {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }
}

@keyframes stream-beacon-pulse-red {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(248, 113, 113, 0);
  }
}

@keyframes stream-beacon-pulse-muted {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .stream-status-beacon__dot,
  .stream-status-beacon--unknown .stream-status-beacon__dot {
    animation: none !important;
  }
}

.current-song {
  font-size: 48px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 15px 0;
  letter-spacing: 1px;
  line-height: 1.2;
  /* Line clamp for 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-artist {
  font-size: 24px;
  font-weight: 400;
  color: #ccc;
  margin: 0;
  text-transform: capitalize;
  line-height: 1.2;
  /* Line clamp for 1 line */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player Controls */
.player-controls {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
}

.btn-play {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  border: none;
  color: #000;
  padding: 18px 45px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  justify-content: center;
  height: 60px;
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

.btn-play:active {
  transform: translateY(0);
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 400px;
}

.volume-icon {
  font-size: 22px;
  color: #ccc;
}

.volume-slide {
  flex: 1;
}

.volume-indicator {
  font-size: 16px;
  color: #ccc;
  min-width: 55px;
  text-align: right;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Range Input Styling */
input[type="range"] {
  -webkit-appearance: none;
  background: transparent;
  width: 100%;
  height: 7px;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 7px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 7px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Modal Styling */
.modal-content {
  background-color: rgba(0, 0, 0, 0.95);
  color: #fff;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content .btn-primary {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  color: #000;
  border: none;
  border-radius: 25px;
  font-weight: 600;
}

.close {
  color: #fff;
  opacity: 0.8;
}

.close:hover {
  color: #fff;
  opacity: 1;
}

/* Streaming Service Buttons */
.streaming-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.streaming-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.streaming-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: #fff;
}

.lyrics-btn {
  background: rgba(138, 43, 226, 0.8) !important;
  border-color: rgba(138, 43, 226, 0.5) !important;
}

.lyrics-btn:hover {
  background: rgba(138, 43, 226, 1) !important;
  border-color: rgba(138, 43, 226, 0.8) !important;
}

.streaming-btn.apple-music {
  background: linear-gradient(135deg, #fc3c44 0%, #000 100%);
  border-color: #fc3c44;
}

.streaming-btn.apple-music:hover {
  background: linear-gradient(135deg, #ff5a62 0%, #333 100%);
  color: #fff;
}

.streaming-btn.spotify {
  background: linear-gradient(135deg, #1db954 0%, #191414 100%);
  border-color: #1db954;
}

.streaming-btn.spotify:hover {
  background: linear-gradient(135deg, #1ed760 0%, #333 100%);
  color: #fff;
}

.streaming-btn.youtube {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  border-color: #ff0000;
}

.streaming-btn.youtube:hover {
  background: linear-gradient(135deg, #ff3333 0%, #ff0000 100%);
  color: #fff;
}

/* Modal backdrop for better contrast */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Bootstrap lyrics modal — same slate theme as player */
#modalLyrics .modal-dialog {
  max-width: 560px;
}

#modalLyrics .modal-content {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98) 0%, rgba(30, 41, 59, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

#modalLyrics .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
}

#modalLyrics .modal-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f9fafb;
}

#modalLyrics .modal-body {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #e5e7eb;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

#modalLyrics .modal-body .lyrics-skeleton-line {
  height: 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 12px;
}

#modalLyrics .close {
  color: #94a3b8;
  text-shadow: none;
  opacity: 1;
  font-size: 1.5rem;
  line-height: 1;
}

#modalLyrics .close:hover {
  color: #f9fafb;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    max-width: 100%;
    padding: 15px;
  }

  .player-interface {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .player-right {
    align-items: center;
  }

  .song-info {
    text-align: center;
    margin-bottom: 30px;
  }

  .main-artwork .stream-status-beacon {
    margin: 0.65rem 0 0 0.65rem;
    margin-bottom: 0;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .player-controls {
    align-items: center;
    width: 100%;
  }

  .main-artwork {
    width: 280px;
    height: 280px;
  }

  .song-info .current-station {
    font-size: clamp(1.025rem, 4vw, 1.3125rem);
    margin-bottom: 16px;
  }

  .current-song {
    font-size: 28px;
  }

  .current-artist {
    font-size: 18px;
  }

  .action-buttons {
    justify-content: center;
    width: 100%;
  }

  .btn-secondary {
    flex: 1;
    justify-content: center;
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .main-artwork {
    width: 250px;
    height: 250px;
  }

  .main-artwork .stream-status-beacon {
    margin: 0.5rem 0 0 0.5rem;
    margin-bottom: 0;
  }

  .song-info .current-station {
    font-size: clamp(0.925rem, 4.375vw, 1.15rem);
  }

  .current-song {
    font-size: 24px;
  }

  .current-artist {
    font-size: 16px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn-secondary {
    max-width: none;
  }
}

/* Loading Animations */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes loadingProgress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Classes */
.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.flipInY {
  animation-name: flipInY;
}

.bounceInLeft {
  animation-name: bounceInLeft;
}

.slideInRight {
  animation-name: slideInRight;
}

@keyframes flipInY {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotateY(-20deg);
  }
  60% {
    transform: perspective(400px) rotateY(10deg);
  }
  80% {
    transform: perspective(400px) rotateY(-5deg);
  }
  to {
    transform: perspective(400px);
    opacity: 1;
  }
}

@keyframes bounceInLeft {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1.0);
  }
  0% {
    opacity: 0;
    transform: translate3d(-3000px, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(25px, 0, 0);
  }
  75% {
    transform: translate3d(-10px, 0, 0);
  }
  90% {
    transform: translate3d(5px, 0, 0);
  }
  to {
    transform: none;
  }
}

@keyframes slideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}
