

body {
    font-family: sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    transition: 0.4s;
  }
  
  .container {
    padding: 20px;
    padding-bottom: 100px;
  }
  
  h1 {
    margin-bottom: 20px;
  }
  
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
  }
  
  .card {
    text-align: center;
    cursor: pointer;
  }
  
  .card img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s;
  }
  
  .card:hover img {
    transform: scale(1.05);
  }
  
  .card p {
    margin-top: 8px;
    font-size: 14px;
  }
  .search-container {
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.4s;
  }
  
  #searchInput {
    width: 100%;
    max-width: 500px; /* ogranicza szerokość na dużych ekranach */
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
  }
  
  #searchResults {
    margin-top: 20px;
  }
  .custom-player {
    position: fixed;
    transition: 0.4s;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }
  


#currentSongTitle {
  width: 150px;            
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  font-weight: bold;
  font-size: 18px;
  height: 24px;
}

#currentSongTitle span {
  display: inline-block;
  position: relative;
  left: 0;
  cursor: default;
  animation-play-state: paused;
}


@keyframes marquee-pingpong {
  0%   { left: 0; }
  30%  { left: 0; } 
  60%  { left: calc(100% - var(--text-width)); } 
  80%  { left: calc(100% - var(--text-width)); } 
  100% { left: 0; } 
}






  .controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  #loopBtn {
  background-color: #007bff;
  transition: color 0.3s;
}

#loopBtn.active {
  background-color: #004a99; /* ciemniejszy niebieski */
}

  #shuffleBtn {
  background-color: #007bff;
  transition: color 0.3s;
}

#shuffleBtn.active {
  background-color: #004a99; /* ciemniejszy niebieski */
}
  .custom-player button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px;
    width: 38px;
    border-radius: 50%;
    font-size: 16px;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .custom-player button:hover {
    background: #0056b3;
  }
  

  
  #currentSongTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
  

  .time-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  color: #333;
  padding: 0 10px;
  box-sizing: border-box;
  user-select: none;
  margin-top: 4px;
}



.song-title-container {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
}

#currentSongAlbum {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  text-align: left;
}

.song-text {
  display: flex;
  flex-direction: column;
  justify-content: left;
  text-align: left;
}

#currentSongTitle {
  font-weight: bold;
  font-size: 16px;
  line-height: 1.2;
  text-align: left;
  max-width: 400px;
}

#currentSongAutor {
  font-size: 14px;
  color: #333;
  transition: 0.4s;
}











.seekBar-wrapper {
  position: relative;
  height: 12px;
  border-radius: 5px;
  background: #ddd;
}

#seekBarFill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: #007bff;
  border-radius: 5px;
  transition: width 0.3s linear;
  pointer-events: none; /* żeby kliknięcia przechodziły do inputa */
  z-index: 1;
}

#seekBar {
  position: relative;
  width: 100%;
  min-width: 10%;
  height: 12px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

/* Ukrycie thumb */
#seekBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

#seekBar::-moz-range-thumb {
  width: 0;
  height: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}




body.dark-theme {
  background-color: #121212;
  color: #e0e0e0;
  transition: 0.4s;
}



body.dark-theme #currentSongAutor {
  color: #b1b1b1;
  transition: 0.4s;
}

.buttons-row {
  padding-top: 10px;
  min-width: 210px;
  }
body.dark-theme .custom-player {
  background: #222; 
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.8); 
  color: #eee; 
  transition: 0.4s;
}


body.dark-theme .search-container {
    padding: 20px;
    background: #222;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.4s;
  }

#currentSongAlbum{
  width: 60px;
  height: 60px;
}


@media (max-width: 600px) {
#currentSongTitle {
  width: 450px;            
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  font-weight: bold;
  font-size: 18px;
  height: 24px;
}

  .custom-player {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }


  .seekBar-wrapper {
    order: -1; 
    width: 100%;
  }


  .controls > button, #currentTime {
    flex: none;
  }

  .controls {
    flex-wrap: nowrap;
  }


  .buttons-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }
}




