/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background: #121212;
  color: #fff;
  line-height: 1.4;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.nav-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1 1 auto;
}

.logo {
  width: 120px;
  height: auto;
}

.home-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  fill: white;
  width: 32px;
  height: 32px;
}

input[type="search"] {
  background: #222;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  color: white;
  min-width: 200px;
  flex-grow: 1;
  max-width: 400px;
}

.nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  margin-top: 0.5rem;
}

.nav-link {
  color: #b3b3b3;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-link:hover {
  color: white;
}

.login-btn {
  background: white;
  color: black;
  border-radius: 20px;
  border: none;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
}

main {
  flex-grow: 1;
  padding: 1rem 0;
}

/* Sección Biblioteca */
.library {
  background: #181818;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.library-create,
.library-podcasts {
  flex: 1 1 300px;
  min-width: 280px;
}

.library-create h2 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.library-create p {
  margin-bottom: 1rem;
  color: #b3b3b3;
}

.btn-create {
  background-color: #1db954;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}

.library-podcasts h3 {
  margin-bottom: 0.5rem;
}

.library-podcasts p {
  color: #b3b3b3;
}

/* Sección Canciones */
.current-songs h2 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.song-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.song {
  background: #181818;
  border-radius: 10px;
  padding: 0.5rem;
  width: calc(33.33% - 1rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 150px;
}

.song img {
  width: 100%;
  border-radius: 8px;
  max-width: 200px;
  height: auto;
  margin-bottom: 0.5rem;
}

.song h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.song p {
  font-size: 0.85rem;
  color: #b3b3b3;
}

.song.dimmed {
  opacity: 0.6;
}

.btn-show-all {
  margin-top: 1rem;
  background: transparent;
  border: 1px solid #b3b3b3;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  color: #b3b3b3;
  cursor: pointer;
  font-weight: bold;
}

/* Sección Artistas */
.popular-artists {
  margin-top: 3rem;
}

.popular-artists h2 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.artist-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.artist-list img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.artist-list img:hover {
  transform: scale(1.1);
}

footer {
  background: #181818;
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
  margin-top: 2rem;
}

footer p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #b3b3b3;
}

.btn-register {
  background-color: #1db954;
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Media Queries para responsiveness */
@media (max-width: 1024px) {
  .song {
    width: calc(50% - 1rem);
  }

  .library {
    flex-direction: column;
  }

  .library-create, .library-podcasts {
    min-width: 100%;
  }

  .nav-right {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-left {
    justify-content: center;
    gap: 0.5rem;
  }

  input[type="search"] {
    min-width: 100%;
    max-width: 100%;
  }

  .song {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .artist-list {
    justify-content: space-around;
  }
}

@media (max-width: 480px) {
  .nav-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .login-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }

  .song h3 {
    font-size: 0.9rem;
  }

  .song p {
    font-size: 0.75rem;
  }

  .library-create h2 {
    font-size: 1.2rem;
  }

  .library-podcasts h3 {
    font-size: 1rem;
  }
}
