/* Global Styling */
body {
  background-color: #000000;
  color: white;
  font-family: Calibri, sans-serif;
}
 
/* Ensure all text elements use Calibri */
h1, h2, h3, h4, h5, h6, p, a, button, input, li, span {
  font-family: Calibri, sans-serif !important;
  font-size: 12px;
}

/* Container */
.container {
  background-color: #000000;
  max-width: 420px;
  margin: auto;
  border: none;
  border-color: #666;
}

/* Audio Player */
#audioPlayer {
  width: 80%;
  margin-top: 10px;
  background: transparent;
  display: none;
}

/* Player Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  
}

button {
  padding: 12px 15px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

button:hover {
  opacity: 0.8;
}

/* Play/Pause, Next, Previous Buttons */
#playPauseButton {
  background-color: #000000;
  color: white;
  width: 80px;
  border: none;
}

#previousButton, #nextButton {
  background-color: #000000;
  color: white;
  width: 80px;
  border: none;
}

/* Search Box */
#searchInput {
  padding: 12px;
  border: 1px solid #666;
  background-color: #222;
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  width: 70%; /* Adjust width as needed (50% of the container) */
  max-width: 300px; /* Prevents it from being too wide */
  margin: 10px auto; /* Centers it horizontally */
  display: block; /* Ensures it behaves like a block element */
}

/* Playlist Styling */
.playlist-container {
  max-height: 350px;
  overflow-y: auto;
  width: 100%;
  border-radius: 5px;
  margin-top: 15px;
}

#playlist {
  list-style: none;
  padding: 0;
  width: 100%;
}

#playlist li {
  padding: 12px;
  margin: 5px 0;
  background: #222;
  border-radius: 8px;
  transition: background 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

#playlist li:hover {
  background: #333;
}

#playlist li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

#playlist li a:hover {
  text-decoration: underline;
}

/* Favorite Icon */
.favorite-icon {
  cursor: pointer;
  font-size: 12px;
  padding: 5px;
}

/* Favorites Section */
.favorites-container {
  margin-top: 20px;
}

.favorites-container h5 {
  color: #ffffff;
  font-size: 12px;
}

#favoritesList li {
  padding: 12px;
  margin: 5px 0;
  background: #222;
  border-radius: 8px;
  transition: background 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* Current Song */
.current-song {
  background: #000000;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.current-song img {
  width: 80%;
  border-radius: 1px;
  max-height: 240px;
}

/* Progress Bar */
#progressBar {
  width: 80%;
  margin: 10px 0;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  background: #ffffff;
  outline: none;
  transition: 0.2s;
}

#progressBar:hover {
  background: #ffffff;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  /* Mobile & Tablet Tweaks */
  .controls {
    flex-direction: column;
    gap: 10px;
  }

  button {
    width: 100%;
    border: none;
  }

  .playlist-container {
    max-height: 300px;
  }

  #playlist li {
    font-size: 12px;
    flex-direction: column;
    padding: 10px;
    text-align: center;
  }

  .favorite-icon {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  #playlist li {
    font-size: 12px;
  }

  .controls button {
    font-size: 12px;
  }

  #progressBar {
    height: 4px;
  }
}

/* Ensure the playlist is scrollable but hides the default scrollbar */
#playlist {
  max-height: 400px; /* Adjust height as needed */
  overflow-y: auto; /* Enables vertical scrolling */
  scrollbar-width: none; /* Hides scrollbar in Firefox */
  -ms-overflow-style: none; /* Hides scrollbar in Internet Explorer/Edge */
}

/* Hide scrollbar in Chrome, Safari, and Edge */
#playlist::-webkit-scrollbar {
  display: none;
}

/* Playlist Container */
.playlist-container {
  max-height: 400px; /* Set a fixed height to prevent extra scrolling */
  overflow: hidden; /* Prevents unnecessary scrollbars */
}

/* Make favorited episode text white */
#favoritesList a {
  color: white !important; /* Force white text */
  text-decoration: none; /* Remove underline */
}

/* Change color when hovering over a favorite */
#favoritesList a:hover {
  color: #ddd; /* Light grey on hover */
}

/* Make all containers rounded */
.container, .current-song, .playlist-container, .favorites-container {
  border-radius: 12px; /* Adjust to your liking */
  overflow: hidden; /* Ensures content inside also follows rounded edges */
  background-color: #000000; /* Optional: Slightly different background */
  padding: 15px; /* Optional: Adds some spacing */
}

/* Apply Calibri Bold to the entire website */
body {
  font-family: Calibri, sans-serif;
  font-weight: bold;
}

/* Ensure all text elements use Calibri Bold */
h1, h2, h3, h4, h5, h6, p, a, button, input, li, span {
  font-family: Calibri, sans-serif !important;
  font-weight: bold !important;
}

/* Player Controls */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: nowrap; /* Ensures buttons stay next to each other */
  width: 100%;
}


button:hover {
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    width: 100%; /* Full width on smaller screens */
    padding: 10px;
  }

  .controls {
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }
/* 
  button {
    font-size: 12px;
    padding: 12px;
    min-width: 80px;
    border: none;
  } */

  #playlist li {
    font-size: 12px;
    flex-direction: row;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .controls {
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }

  /* button {
    font-size: 12px;
    padding: 10px;
    min-width: 70px;
    border: none;
  } */
}

.remove-favorite {
  background: transparent !important;
  border: none !important;
  font-size: 12px !important;
  cursor: pointer;
  display: block;
  text-align: right;
}

.favorite-icon {
  display: inline-block;
  margin-left: 10px; /* Adjust spacing if needed */
}

button {
  -webkit-appearance: none;
  appearance: none;
  font-family: Arial, sans-serif;
  font-weight: bold;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 12px 15px;
  min-width: 80px;
  min-height: 40px;
  background-color: #000 !important;
  color: #fff !important;
  transition: all 0.2s ease-in-out;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#airplayButton {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: white;
  margin-left: 10px;
}

#airplayButton:hover {
  color: #ffcc00;
}
