:root {
  --bg-color: #121212;
  --primary-color: linear-gradient(45deg, #a993ff, #7b68ee, #d8bfd8, #dda0dd, #da70d6);
  --rainbow-gradient: linear-gradient(45deg, #a993ff, #7b68ee, #d8bfd8, #dda0dd, #da70d6);
  --card-color: #181818;
  --text-color: #FFFFFF;
  --text-secondary-color: #B3B3B3;
  --font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  padding-bottom: 120px;
}

.search-bar-wrap {
  width: 100%;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.search-bar {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid #333;
  font-size: 1rem;
  background: #282828;
  color: var(--text-color);
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-bar:focus {
  border-image: var(--primary-color) 1;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.playlist-tab-row {
  position: relative;
  display: flex;
  align-items: center;
  background: #282828;
  border-radius: 50px;
  padding: 6px;
  gap: 8px;
  margin-top: 20px;
}

.active-tab-highlighter {
  position: absolute;
  background: var(--rainbow-gradient);
  background-size: 200% 200%;
  border-radius: 50px;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  animation: rainbow-animation 4s ease infinite;
}

.playlist-tab {
  font-size: 1rem;
  padding: 8px 24px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary-color);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.playlist-tab.active {
  color: var(--text-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px 20px 30px 20px;
}

.playlist-content {
  display: grid;
  grid-template-columns: 1fr;
}

#playlist-nonstop-col, #playlist-houselak-col, #playlist-comingsoon-col {
  width: 100%;
  transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#playlist-comingsoon-col h2 {
    text-align: center;
    margin-top: 50px;
    font-size: 2rem;
    color: var(--text-secondary-color);
}

.playlist-hidden {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
  position: absolute;
}

#playlist-nonstop, #playlist-houselak {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.song-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid #282828;
  cursor: pointer;
  position: relative;
  animation: slide-in 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  opacity: 0;
}

@keyframes slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.song-card:hover {
  background: #282828;
  transform: translateY(-5px);
}

.song-card.playing {
  background: #282828;
  border-image: var(--primary-color) 1;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.song-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.play-btn-icon {
  font-size: 24px;
  background: var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: primary-color-anim 4s ease infinite;
  position: absolute;
  bottom: 16px;
  right: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.song-card:hover .play-btn-icon, .song-card.playing .play-btn-icon {
  opacity: 1;
  transform: translateY(0);
}

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1001;
}

.player-song-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-song-title {
  font-size: 1rem;
  font-weight: 600;
}

.player-main-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.player-btn {
  background: none;
  border: none;
  color: var(--text-secondary-color);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.player-btn:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

.player-btn.active {
  background: var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: primary-color-anim 4s ease infinite;
}

#play-pause-btn {
  font-size: 36px;
  color: var(--text-color);
}

.player-progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--text-secondary-color);
  font-size: 0.8rem;
}

.player-progress-bar {
  width: 100%;
  height: 5px;
  background: #444;
  border-radius: 3px;
  cursor: pointer;
}

.player-progress {
  height: 100%;
  background: var(--primary-color);
  background-size: 200% 200%;
  width: 0%;
  border-radius: 3px;
  animation: primary-color-anim 4s ease infinite;
}

.player-volume-section {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.volume-popup {
  position: absolute;
  bottom: 55px;
  right: 0;
  background: #282828;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.volume-popup.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 5px;
  background: #555;
  outline: none;
  border-radius: 3px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: #fff;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 5px #fff;
}

.rainbow-text2 {
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--rainbow-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: rainbow-animation 4s ease infinite;
}

@keyframes rainbow-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--card-color);
  color: var(--text-color);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid #282828;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 90%;
  max-width: 360px;
}

.popup.show .popup-content {
  transform: scale(1);
}

.popup button {
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--primary-color);
  background-size: 200% 200%;
  animation: primary-color-anim 4s ease infinite;
  color: var(--text-color);
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.popup button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

@keyframes primary-color-anim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.popup-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  background-size: 200% 200%;
  animation: primary-color-anim 4s ease infinite;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  margin: 15px 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.popup-link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

footer {
  padding: 0;
  color: var(--text-secondary-color);
  font-size: 0.7rem;
}
footer p {
  margin: 0;
  text-align: left;
}

/* --- INTRO SCREEN --- */

#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#intro-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-title {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  letter-spacing: 8px;
}

.intro-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn-up 0.8s forwards;
}

.intro-title span:nth-child(1) { animation-delay: 0.1s; }
.intro-title span:nth-child(2) { animation-delay: 0.2s; }
.intro-title span:nth-child(3) { animation-delay: 0.3s; }
.intro-title span:nth-child(4) { animation-delay: 0.4s; }
.intro-title span:nth-child(5) { animation-delay: 0.5s; }
.intro-title span:nth-child(6) { animation-delay: 0.6s; }
.intro-title span:nth-child(7) { animation-delay: 0.7s; }
/* Dots */
.intro-title span:nth-child(8),
.intro-title span:nth-child(9),
.intro-title span:nth-child(10) {
  animation: fadeIn-up 0.8s forwards, blink 1.2s infinite;
}
.intro-title span:nth-child(8) { animation-delay: 0.8s; }
.intro-title span:nth-child(9) { animation-delay: 0.9s; }
.intro-title span:nth-child(10) { animation-delay: 1.0s; }


@keyframes fadeIn-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.coin-popup-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1002;
}

.coin-popup {
  display: flex;
  align-items: center;
  width: auto;
  padding: 4px 8px;
  background-color: var(--card-color);
  border: 1px solid #282828;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 0.8rem;
}

.coin-popup-header {
  padding-right: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coin-popup-content {
  padding: 0 4px;
  text-align: center;
}

.info-btn-container {
  position: relative;
}

.info-btn {
  background: none;
  border: none;
  color: var(--text-secondary-color);
  font-size: 12px;
  cursor: pointer;
  margin-left: 5px;
  padding: 0;
  transition: transform 0.3s ease;
}

.info-btn:hover {
  transform: scale(1.2);
}

.info-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 280px;
  padding: 15px;
  background-color: #2D2D2D;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  z-index: 1003;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary-color);
}

.info-btn-container:hover .info-popup {
  display: block;
}

@media (max-width: 768px) {
  .player-bar {
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 15px;
  }
  .player-song-info {
      grid-row: 1;
      text-align: center;
  }
  .player-song-info footer p {
      text-align: center;
  }
  .player-main-controls {
      grid-row: 2;
  }
  .player-volume-section {
      position: absolute;
      top: 15px;
      right: 15px;
  }

  body {
    padding-bottom: 150px;
  }

  .search-bar-wrap, .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  #playlist-nonstop, #playlist-houselak {
    grid-template-columns: 1fr;
  }

}

/* Analytic Popup */
.analytic-icon {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  background-size: 200% 200%;
  animation: primary-color-anim 4s ease infinite;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1002;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.analytic-icon:hover {
  transform: scale(1.1);
}


.analytic-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1003;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.analytic-popup.show {
  opacity: 1;
  pointer-events: auto;
}

.analytic-popup.show .analytic-popup-content {
  transform: scale(1);
}

.analytic-popup-content {
  position: relative;
  width: 80%;
  height: 80%;
  max-width: 1200px;
  background: var(--card-color);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.analytic-popup-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.close-analytic-popup {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  background: white;
  color: black;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
