html,
body {
  background-image: url(space7.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
  margin: 0;
  height: 100%;
}

.container {
  position: relative;
  height: 100vh;
  z-index: 1;
}

#map {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: fixed !important;
}

#coords {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 100000;
}

#playlist-panel {
  position: absolute;
  top: 20px;
  left: -320px;
  width: 300px;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  overflow: hidden;
}

#playlist-panel.open {
  left: 20px;
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: #d0d0d7;
  font-family: fantasy;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-close {
  cursor: pointer;
  font-size: 18px;
}

.playlist-close:hover {
  color: #2374ff;
}

#playlistItems {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-item:hover {
  background: rgba(35, 116, 255, 0.2);
}

.playlist-item.playlist-active {
  background: rgba(35, 116, 255, 0.35);
}

.playlist-flag {
  color: #8899aa;
  font-family: monospace;
  font-size: 11px;
  text-transform: uppercase;
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.playlist-track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.playlist-track-name {
  color: #d0d0d7;
  font-family: fantasy;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-artist-name {
  color: #8899aa;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 1000;
}

#player-nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  width: 100%;
}

#player-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

#player-controls.active {
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.track_counter {
  color: #d0d0d7;
  font-family: monospace;
  font-size: 13px;
  text-align: right;
  padding: 4px 10px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.button.shuffle-active {
  background-color: #00c853;
  opacity: 1;
}

.button.shuffle-active:hover {
  background-color: #00a844;
}

.slider_container {
  width: 581px;
  padding: 10px;
  display: none;
}

.seek_slider {
  width: 100%; 
  height: 10px; 
  -webkit-appearance: none; 
  appearance: none; 
  border-radius: 5px; 
  background: #ccc; 
  outline: none; 
  opacity: 0.6; 
  -webkit-transition: .2s; 
  transition: opacity .2s; 
}

.seek_slider::-webkit-slider-thumb {
  -webkit-appearance: none; 
  appearance: none; 
  width: 25px; 
  height: 25px; 
  border-radius: 50%; 
  background: #2374ff; 
  cursor: pointer; 
}

.seek_slider::-moz-range-thumb {
  width: 30px; 
  height: 30px; 
  border-radius: 50%; 
  background: #2374ff; 
  cursor: pointer; 
  box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
  rgba(0, 0, 0, 0.418) 0px -36px 30px 0px inset,
  rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px,
  rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px,
  rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}


.time_display {
  color: #d0d0d7;
  font-family: monospace;
  font-size: 13px;
  text-align: right;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.seek_row {
  display: flex;
  align-items: center;
}

.seek-icon {
  color: #d0d0d7;
  font-size: 18px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: none;
  width: 75px;
  height: 75px;
  background-color: #2374ff;
  color: #d0d0d7;
  opacity: 0.7;
  margin: 8px 4px;
  padding: 0;
  cursor: pointer; 
  box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
    rgba(0, 0, 0, 0.418) 0px -36px 30px 0px inset,
    rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px,
    rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px,
    rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}

.button i {
  font-size: 24px;
  color: #d0d0d7;
}

.button:hover {
  background-color: #005cc8;
  opacity: 1;
}

.button:active {
  background-color: #005cc8;
  box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
  rgba(0, 0, 0, 0.418) 0px -36px 30px 0px inset,
  rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px,
  rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px,
  rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
  transform: translateY(2px);
}

.button.playing {
  animation: pulse-glow 3.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(35, 116, 255, 0.4),
      rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
      rgba(0, 0, 0, 0.418) 0px -36px 30px 0px inset;
    opacity: 0.7;
  }
  50% {
    box-shadow: 0 0 15px rgba(35, 116, 255, 0.6),
      0 0 30px rgba(35, 116, 255, 0.2),
      rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
      rgba(0, 0, 0, 0.418) 0px -36px 30px 0px inset;
    opacity: 0.9;
  }
}

.volume_container {
  display: flex;
  align-items: center;
  width: 581px;
  padding: 10px;
}

.volume-icon {
  color: #d0d0d7;
  font-size: 18px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
  cursor: pointer;
}

.volume-icon:hover {
  color: #2374ff;
}

.volume_slider {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 5px;
  background: #ccc;
  outline: none;
  opacity: 0.6;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.volume_slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2374ff;
  cursor: pointer;
}

.volume_slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2374ff;
  cursor: pointer;
}

.pitch_container {
  display: none;
  align-items: center;
  width: 581px;
  padding: 10px;
}

.pitch-icon {
  color: #d0d0d7;
  font-size: 18px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
  cursor: pointer;
}

.pitch-icon:hover {
  color: #2374ff;
}

.pitch_slider {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 5px;
  background: #ccc;
  outline: none;
  opacity: 0.6;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.pitch_slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2374ff;
  cursor: pointer;
}

.pitch_slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2374ff;
  cursor: pointer;
}

.pitch_display {
  color: #d0d0d7;
  font-family: monospace;
  font-size: 13px;
  margin-left: 10px;
  width: 35px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.marker-popup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  font-family: fantasy;
}

.popup-artist-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.popup-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.popup-track {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-artist {
  font-size: 12px;
  color: #444;
}

.popup-country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(35, 116, 255, 0.7);
  padding: 2px 8px;
  border-radius: 10px;
  width: fit-content;
  margin-top: 2px;
}

.popup-flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

@media (max-width: 768px) {
  #playlist-panel {
    width: 250px;
    max-height: 60vh;
  }

  #playlist-panel.open {
    left: 10px;
  }

  #buttons {
    align-items: center;
    top: 10px;
    left: 10px;
    right: 10px;
  }

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

  #player-nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .button {
    width: 50px;
    height: 50px;
    margin: 4px 2px;
  }

  .button i {
    font-size: 18px;
  }

  .track_counter {
    text-align: center;
  }

  .slider_container,
  .volume_container,
  .pitch_container {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .button {
    width: 40px;
    height: 40px;
    margin: 3px 2px;
  }

  .button i {
    font-size: 13px;
  }

  .popup-artist-img {
    width: 50px;
    height: 50px;
  }

  .track_counter {
    font-size: 11px;
  }
}