body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif; /* Spotify-like font */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: auto; /* Ermöglicht das Scrollen */
}

body {
  background-color: #1DB954; /* Spotify green */
  transition: background 0.3s ease-in-out;
  font-size: 16px;
  line-height: 1.6; /* Increased line height for readability */
  color: white;
}

/* Container for Song Information */
.container {
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 20px;
  color: white;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 40px; /* Ensure some padding from top */
}

/* Album Cover Styling */
.album-cover-container {
  position: relative;
  display: inline-block;
  width: 220px;
  height: 220px;
  margin-bottom: 15px;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: rotateAlbum 30s linear infinite; /* Continuous 3D rotation */
}

.album-cover-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* 3D Continuous Rotation Animation */
@keyframes rotateAlbum {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

/* Song and Album Information Styling */
.song-info {
  width: 100%;
  max-width: 400px;
  text-align: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px; /* Minimal gap between song info sections */
  align-items: center; /* Center all child elements */
}

/* Song Name, Album, and Artist Styling */
.song-info h1, .song-info h2, .song-info h3 {
  font-size: 1.5rem;
  font-weight: 700; /* Bold text like Spotify */
  margin: 0; /* Remove margin between text */
  letter-spacing: 0.5px;
  text-align: center;
}

/* Album Name and Artist Styling */
.song-info p {
  font-size: 1.1rem;
  color: #ffffff; /* Grey color for the artist and album */
  font-weight: 300;
  margin: 0; /* Remove margin for tighter layout */
  letter-spacing: 0.5px;
  text-align: center;
}

/* Stats Section */
.song-info .stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px; /* Minimal gap between the stats */
  margin-top: 20px; /* Add a bit more space after the song information */
}

/* Individual Stat Styling */
.song-info .stats p {
  font-size: 1.1rem;
  margin: 0; /* Remove margin for tighter stats layout */
  color: white;
  width: 100%; /* Ensure each stat takes full width for proper centering */
  text-align: center; /* Ensure text is centered */
}

/* Additional space between Stats and Song Info */
.song-info .stats + .song-info p {
  margin-top: 20px; /* Adds space between the stats and the song info below */
}

/* Footer Styling */
.footer {
  position: relative;
  bottom: 20px;
  text-align: center;
  width: 100%;
  padding: 10px 0;
}

.footer a {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600; /* Bold font for emphasis */
  text-decoration: none;
  background-color: #1A9A47;
  padding: 12px 24px;
  border-radius: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer a:hover {
  background-color: #1A7C3A;
  transform: scale(1.05);
}


@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* Random Fact Section */
.random-fact {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: white;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

.random-fact h2 {
  font-size: 1.5rem;
  margin: 0;
}

.random-fact p {
  font-size: 1.1rem;
  margin: 0;
}

/* Add space between the two sections */
#current-playing {
  margin-bottom: 40px;
}

/* Responsive Media Queries */

/* Small Devices (Phones, up to 480px) */
@media screen and (max-width: 480px) {
  .song-info h1, .song-info h2, .song-info h3 {
    font-size: 1.2rem;
  }

  .song-info p {
    font-size: 1rem;
  }

  .album-cover-container {
    width: 150px;
    height: 150px;
  }

  .song-info {
    width: 90%;
    max-width: none;
  }

  .random-fact {
    width: 90%;
    max-width: none;
  }
}

/* Medium Devices (Tablets, 481px to 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .song-info h1, .song-info h2, .song-info h3 {
    font-size: 1.4rem;
  }

  .song-info p {
    font-size: 1.1rem;
  }

  .album-cover-container {
    width: 180px;
    height: 180px;
  }

  .random-fact {
    width: 80%;
  }
}

/* Large Devices (Desktops, 769px and above) */
@media screen and (min-width: 769px) {
  .song-info h1, .song-info h2, .song-info h3 {
    font-size: 1.5rem;
  }

  .song-info p {
    font-size: 1.2rem;
  }

  .album-cover-container {
    width: 220px;
    height: 220px;
  }

  .random-fact {
    width: 60%;
  }
}
