/* GIAO DIỆN CHUNG */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #e9e8e6 0%, #686766 100%), 
                url('https://cdn.pixabay.com/photo/2016/11/29/05/42/music-1868596_960_720.png');
    background-blend-mode: overlay;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    color: black;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}



/* HEADER */
header {
    position: sticky;
    top:0;
    z-index: 5;
    background-color: #000000ba;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo img {
    width: 50px;
}

nav {
    display: flex;
    gap: 2px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: 0.6s;
    font-weight: bold;
}

nav a:hover {
    background-color: white;
    color: black;
}

.search-login {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-login input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    outline: none;
    width: 200px;
}

.search-login button {
    padding: 8px 12px;
    border: none;
    background-color: #2196f3;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-login button:hover {
    background-color: #0d8ae3;
}

/* MAIN */
main {
    flex: 1;
    padding: 40px 20px;
    text-align: center;
}

main h2 {
    color: #333;
    margin-top: 40px;
    margin-bottom: 20px;
}

.song-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.song {
    background-color: #fffde7;
    padding: 15px;
    border-radius: 10px;
    width: 280px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    text-align: center;
}

.song:hover {
    transform: translateY(-5px);
}

.song h3, .song p {
    margin: 10px 0 5px;
    color: #222;
}

/* HÌNH ẢNH VÀ NÚT PLAY */
.song-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.overlay-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.overlay-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 8px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    font-size: 30px;
    padding: 10px 20px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.overlay-wrapper:hover .overlay,
.overlay-wrapper:hover .play-button {
    opacity: 1;
}

/* FOOTER */
footer {
    background-color: #000000ba;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer-logo img {
    width: 50px;
}

.socials a {
    margin: 0 10px;
    text-decoration: none;
}

/* Button Xem thêm */
.see-more-wrapper {
    margin: 30px 0;
    text-align: center;
}

.see-more-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: #2196f3;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.see-more-button:hover {
    background-color: #0d8ae3;
}

/* ANIMATION */
.song-list.fade-out {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s ease-in;
}

.song-list.fade-in {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s ease-out;
}
.btn-link {
  display: inline-block;
  margin-left: 5px;
  padding: 5px 10px;
  background-color: green;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.btn-link:hover {
  opacity: 0.8;
}

.logout-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #ff5252;
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #ff0000;
}

.song-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.song-main {
    flex: 1 1 60%;
}

.ranking-sidebar {
    margin-top: 40px;
    flex: 1 1 300px;
    background-color: #fff8e1;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ranking-sidebar h2 {
    margin-bottom: 15px;
    color: #d32f2f;
}

.ranking-list {
    list-style: decimal;
    padding-left: 20px;
}

.ranking-list li {
    margin-bottom: 10px;
}

.ranking-list a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.ranking-list a:hover {
    color: #d32f2f;
}


.music-notes {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    pointer-events: none;
    z-index: 999;
}

.note {
    position: absolute;
    bottom: 0;
    font-size: 30px;
    animation: floatNote 5s linear infinite;
    opacity: 0.7;
}

.note:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}
.note:nth-child(2) {
    left: 50%;
    animation-delay: 2s;
}
.note:nth-child(3) {
    left: 80%;
    animation-delay: 4s;
}

@keyframes floatNote {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        opacity: 1;
        transform: translateY(-50vh) scale(1.2);
    }
    100% {
        transform: translateY(-100vh) scale(0.8);
        opacity: 0;
    }
}


.remix-section {
    margin-top: 50px;
    padding: 20px;
    background-color: #fff3e0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.remix-section h2 {
    color: #e65100;
    margin-bottom: 20px;
}

.remix-list {
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}


/* USER AVATAR + NAME */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.username {
  font-size: 0.95em;
  white-space: nowrap;
}

.avatar-wrapper img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.avatar-wrapper img:hover {
  transform: scale(1.1);
}




@media only screen and (max-width: 600px) {

    html, body {
  max-width: 100%;
  overflow-x: hidden;
}

  /* Header gọn lại, chuyển dọc */
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 15px;
    gap: 12px;
  }

  .logo img {
    width: 36px;
  }

  nav {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  nav a {
    width: 100%;
    display: block;
    padding: 10px;
    font-size: 0.95em;
  }

  .search-login {
    width: 100%;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
  }

  .search-login input {
    flex: 1;
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    box-sizing: border-box;
  }

  .search-login button {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
  }

  main {
    padding: 20px 10px;
  }

  .song-list, .remix-list {
    flex-direction: column;
    gap: 20px;
  }

  .song {
    width: 100%;
    max-width: 100%;
  }

  .song-content {
    flex-direction: column;
    gap: 20px;
  }

  .ranking-sidebar {
    width: 100%;
    margin-top: 0;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
  }

  .footer-logo img {
    width: 36px;
  }

  .socials a {
    margin-right: 8px;
    margin-bottom: 8px;
  }

  .user-info {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .username {
    font-size: 0.9em;
  }

  .avatar-wrapper img {
    width: 32px;
    height: 32px;
  }
}
