/* General Styles */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #111;
  color: #fff;
}

/* Hide the Offset */
#offset {
  display: none;
}

/* Header Styles */
.header {
  background-color: #00aaff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  height: 40px;
  filter: invert(1);
}

.location {
  font-size: 14px;
  color: #fff;
  margin-left: auto;
  margin-right: 20px;
}

.give-now-button {
  background-color: #222;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

/* Data Section */
.data-section {
  margin-top: 60px;
  background-color: #121212;
  padding: 10px;
  border-radius: 10px;
}

/* Layout for Station, Listeners, and Live Sections */
.data-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Ensure that each section takes an equal amount of space */
.data-section.station,
.data-section.listeners,
.data-section.live {
  flex: 1;
  min-width: 250px;
  max-width: calc(33.333% - 20px); /* Adjusted for better responsiveness */
}

/* Now Playing Section */
.now-playing {
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #00aaff;
  max-width: 1062px;
  height: 670px;
  margin: 0 auto;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.now-playing-info {
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: absolute;
  bottom: 20px; /* Position from bottom */
  left: 20px; /* Position from left */
  width: calc(100% - 40px); /* Adjust width to fit within the container */
  box-sizing: border-box;
}

.artist-image {
  height: 150px;
  width: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}

.song-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.song-title {
  font-size: 24px;
  margin: 0;
}

.artist-name,
.album-name {
  margin: 5px 0;
  color: #aaa;
}

/* Controls Container */
.controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 100px;
}

.mute-button,
.play-button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

#playPauseButton {
  background-color: #fff;
  color: #00aaff;
  border: none;
  padding: 20px 20px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

/* Hide the Audio Player Controls */
#audioPlayer {
  display: none;
}

/* Station Selection Section */
.station-selection {
  margin-top: 20px;
}

#stationButtonsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Playing Next Section */
.playing-next {
  margin-top: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1062px;
  height: auto; /* Adjust height automatically based on content */
  margin: 0 auto; /* Center the section horizontally */
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.playing-next-info {
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column; /* Change to column for vertical alignment */
  align-items: center;
  width: 100%; /* Ensure full width */
  box-sizing: border-box;
  background-color: #222; /* Ensure background color matches */
}

#next-art {
  max-width: 100px;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto 10px; /* Center horizontally */
}

#next-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#next-title {
  font-size: 24px;
  margin: 0;
}

#next-artist,
#next-album {
  margin: 5px 0;
  color: #aaa;
}

/* Song History Section */
.song-history {
  margin-top: 20px;
  white-space: nowrap;
  overflow-x: auto;
  padding: 10px;
}

.song-history-item {
  display: inline-block;
  margin-right: 15px;
  text-align: center;
}

.song-history-item img {
  max-width: 100px;
  height: auto;
  border-radius: 10px;
}

/* Stations and Last Played Sections */
.stations, .last-played {
  padding: 20px;
}

.stations h2, .last-played h2 {
  margin-bottom: 10px;
}

.stations-grid, .last-played-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.stations-grid img, .last-played-grid img {
  height: 80px;
  width: 80px;
  border-radius: 10px;
}

.track {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.track-title {
  margin: 5px 0 0 0;
  font-weight: bold;
}

.track-artist {
  margin: 0;
  color: #aaa;
}

/* Footer Styles */
footer {
  background: #363b3f;
  padding-bottom: 20px;
}

footer p {
  font-size: 12px;
  color: #fff;
  text-align: center;
  padding-top: 20px;
}

footer ul {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  padding-left: 0;
  list-style: none;
}

footer li {
  display: inline-block;
  margin: 4px;
}

footer li a {
  display: block;
  text-decoration: none;
  border-bottom: none;
  padding: 10px;
  border-radius: 3px;
  transition: all 0.3s ease-in, all 1s ease;
  background: #444749;
}

footer .facebook:hover {
  background-color: #365397;
}

footer .twitter:hover {
  background-color: #00a9f1;
}

footer .youtube:hover {
  background-color: #ff3333;
}

footer .instagram:hover {
  background-color: #396d9a;
}

footer .linkedin:hover {
  background-color: #006db3;
}

footer .tiktok:hover {
  background-color: #EE1D52;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header {
    flex-direction: row; /* Keep the same as desktop */
    align-items: center;
    justify-content: space-between;
  }

  .header-content {
    flex-direction: row; /* Keep the same as desktop */
    align-items: center;
    width: 100%;
  }

  .logo {
    margin-bottom: 0; /* Keep the same as desktop */
  }

  .location {
    margin: 10px 0;
  }

  .data-container {
    flex-direction: column;
    align-items: center;
  }

  .data-section.station,
  .data-section.listeners,
  .data-section.live {
    max-width: 100%;
    min-width: 100%;
  }

  .now-playing {
    max-width: 100%;
    height: auto;
  }

  .now-playing-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 10px;
  }

  .artist-image {
    height: 100px;
    width: 100px;
  }

  .controls {
    flex-direction: column;
    gap: 5px;
    bottom: 10px;
    right: 10px;
  }

  .controls > * {
    margin-bottom: 5px;
  }

  #playPauseButton {
    padding: 15px 15px;
    font-size: 16px;
  }

  .playing-next {
    max-width: 100%;
    padding: 10px;
  }

  .playing-next-info {
    padding: 10px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #next-art {
    max-width: 80px;
  }

  #next-title {
    font-size: 20px;
  }

  .song-history {
    margin-top: 20px;
    white-space: nowrap;
    overflow-x: auto;
    padding: 10px;
  }

  .song-history-item {
    display: inline-block;
    margin-right: 15px;
    text-align: center;
  }

  .song-history-item img {
    max-width: 100px;
  }
}

/* Glowing Effect for Selected Station Button */
.stationButton.selected {
  box-shadow: 0 0 10px 5px rgba(0, 170, 255, 0.8);
  border: 2px solid #00aaff;
}

/* Optionally, add a hover effect to improve user experience */
.stationButton:hover {
  box-shadow: 0 0 10px 5px rgba(0, 170, 255, 0.6);
  border: 2px solid #00aaff;
}

#stationButtonsContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Horizontally centers the buttons */
  align-items: center;     /* Vertically centers the buttons */
  gap: 20px;               /* Adds space between buttons */
}
.stationButton {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 140px;
  height: 140px;
  background-size: cover;  /* Ensures the background image covers the button */
  background-position: center;
  border-radius: 15%;      /* Makes the buttons round */
  color: white;
  font-size: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease; /* Optional: for smooth hover effect */
}

.stationButton:hover {
  transform: scale(1.1);  /* Slightly enlarges the button on hover */
}
