/* BASE */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;500;900&display=swap");
:root {
  --text-nonAtive: #8ba1a7;
  --white-color: #fff;
  --white-text: #f5f5f5;
  --black-color: #000;
  --bg-color: #121212;
  --hover-color: #3e3e3e;
  --item-color: #222222;
  --green-color: #1fdf64;
}

* {
  /* Không cho chọn */
  -webkit-touch-callout: none; /* Safari */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  color: var(--white-text);
}

*:focus {
  background-color: transparent;
  outline: none;
}

body {
  background-color: var(--black-color);
  overflow-x: hidden;
}

i {
  margin: 5px;
}

.hidden {
  display: none !important;
}

.text-ative {
  color: var(--white-color) !important;
  text-shadow: 0 0 8px var(--white-color) !important;
}

.hover-underline:hover {
  text-decoration: underline;
  cursor: pointer;
}

.hover-color:hover {
  color: var(--green-color);
}

::-webkit-scrollbar {
  width: 2px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--hover-color); /* Màu của phần thumb */
  border-radius: 4px; /* Đặt độ cong cho phần thumb */
}

/****** Toast  ******/
/*
 * Toastify js 1.12.0
 * https://github.com/apvarun/toastify-js
 * @license MIT licensed
 *
 * Copyright (C) 2018 Varun A P
 */

 .toastify {
  padding: 12px 20px;
  color: #ffffff;
  display: inline-block;
  box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);
  background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);
  background: linear-gradient(135deg, #73a5ff, #5477f5);
  position: fixed;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  max-width: calc(50% - 20px);
  z-index: 2147483647;
}

.toastify.on {
  opacity: 1;
}

.toast-close {
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  opacity: 0.4;
  padding: 0 5px;
}

.toastify-right {
  right: 15px;
}

.toastify-left {
  left: 15px;
}

.toastify-top {
  top: -150px;
}

.toastify-bottom {
  bottom: -150px;
}

.toastify-rounded {
  border-radius: 25px;
}

.toastify-avatar {
  width: 1.5em;
  height: 1.5em;
  margin: -7px 5px;
  border-radius: 2px;
}

.toastify-center {
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
  max-width: fit-content;
  max-width: -moz-fit-content;
}

@media only screen and (max-width: 360px) {
  .toastify-right, .toastify-left {
      margin-left: auto;
      margin-right: auto;
      left: 0;
      right: 0;
      max-width: fit-content;
  }
}

/* Custom Input range */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

/***** Track Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type="range"]::-webkit-slider-runnable-track {
  background: var(--hover-color);
  height: 5px;
  border-radius: 4px;
}

/***** Thumb Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  margin-top: -3px;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background-color: var(--green-color);
}

/* 
.grid {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
}

.grid__full-width {
    width: 100%;
}

.grid__row {
    display: flex;
    flex-wrap: wrap;
}

img {
    pointer-events: none;
} */

/* BASE */

/* Header */

header {
  position: fixed;
  top: 0;
  right: 0;
  width: 79.8vw;
  height: 60px;
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  border-radius: 5px;
  z-index: 100;
}

.logo h2 {
  color: var(--white-text);
  position: relative;
  padding: 0 0 0 20px;
  cursor: pointer;
}

.hyper-link {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-right: 20px;
  position: absolute;
  top: 8px;
}

.hyper-link-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 20px;
  list-style-type: none;
}

.hyper-link-item {
  color: var(--white-color);
  margin-top: 8px;
  cursor: pointer;
}

.hyper-link-item a {
  text-decoration: none;
  color: inherit;
}

.hyper-link-item:first-child {
  display: flex;
  align-items: center;
  background-color: var(--hover-color);
  border-radius: 24px;
  padding: 0 10px 0 6px;
}

.hyper-link-item:first-child:hover {
  transform: scale(1.03);
}

.hyper-link-item:last-child {
  border: 2px solid var(--green-color);
  border-radius: 50%;
  padding: 0 1px;
}

.setting {
  color: var(--white-color);
  cursor: pointer;
  position: absolute;
  right: 20px;
  display: none;
}

.user-menu {
  width: 190px;
  height: auto;
  position: absolute;
  top: 55px;
  right: 20px;
  background-color: var(--item-color);
  border-radius: 2px;
  z-index: 100;
}

.user-menu-list {
  list-style-type: none;
  padding: 4px;
}

.user-menu-item {
  color: var(--white-color);
  padding: 10px 16px;
  cursor: pointer;
}

.user-menu-item:hover {
  border-radius: 2px;
  background-color: var(--hover-color);
}

.user-menu-item i {
  position: absolute;
  right: 10px;
  transform: translateY(-4px);
  pointer-events: none;
}

.user-menu-item:last-child {
  border-top: 1px solid var(--hover-color);
}

aside {
  position: fixed;
}

.home-search {
  width: 19.5vw;
  height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  gap: 12px;
  font-size: 20px;
  background-color: var(--bg-color);
  border-radius: 5px;
}

.home-search span {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  cursor: pointer;
  text-wrap: nowrap;
}

.home-search span,
.home-search i {
  color: var(--text-nonAtive);
}

.library {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 16px;
  border-radius: 0 5px 0 0;
  background-color: var(--bg-color);
  margin-top: 5px;
  width: 19.5vw;
}

.library-item {
  display: flex;
  align-items: center;
  font-size: 18px;
  gap: 8px;
}

.library-item > i,
.library-item > span {
  color: var(--text-nonAtive);
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-item:hover > i,
.library-item:hover > span {
  color: var(--white-color);
}

.library-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--bg-color);
  padding: 8px 0 16px 0;
  width: 19.5vw;
  overflow-x: hidden;
}

.library-filter span {
  background-color: var(--hover-color);
  color: var(--white-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  text-wrap: nowrap;
}

.library-playlist {
  padding: 0 10px;
  background-color: var(--bg-color);
  position: relative;
  width: 19.5vw;
  height: 55vh;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding-bottom: 80px;
}

.library-search {
  display: flex;
  align-items: center;
  padding: 2px 10px;
  justify-content: space-between;
}

.library-search-icon i {
  color: var(--text-nonAtive);
  cursor: pointer;
  position: relative;
  z-index: 4;
}

.library-search-icon i::after {
  content: "";
  position: absolute;
  width: 180%;
  height: 180%;
  top: 0;
  left: 0;
  transform: translate(-24%, -24%);
  background-color: var(--hover-color);
  border-radius: 50%;
  z-index: -1;
  transition: all 0.3s ease;
}

.library-search-icon i:hover {
  color: var(--white-color);
  transition: all 0.3s ease;
}

.library-search-choose {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.library-playlist-img img {
  height: 50px;
  width: 50px;
  border-radius: 5px;
  object-fit: cover;
  box-sizing: border-box;
  position: relative;
}

.library-playlist-item {
  position: relative;
  top: 5px;
  height: 60px !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: upper 0.8s ease forwards;
  animation-delay: calc(0.2s * var(--i));
  cursor: pointer;
}

.library-playlist-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--white-color);
  cursor: pointer;
  line-height: 1.8;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-playlist-title p:last-child {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-nonAtive);
  line-height: 1.8;
}

@keyframes upper {
  from {
    transform: translateY(40px);
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Player Control */
.player-control {
  display: flex;
  position: fixed;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  width: 100vw;
  bottom: 0;
  background-color: var(--black-color);
  z-index: 100;
}

.song-playing-item {
  border-radius: 5px;
  display: flex;
  flex-direction: row;
  height: 70px;
  gap: 20px;
  align-items: center;
  width: 30vw;

}

.song-playing-img {
  height: 50px;
  width: 50px;
  padding-left: 10px;
  cursor: pointer;
}

.song-playing-img img {
  height: 50px;
  width: 50px;
  border-radius: 5px;
  box-sizing: border-box;
  object-fit: cover;
}

.song-playing-title {
  display: flex;
  flex-direction: column;
  position: relative;
  line-height: 1.7;
  color: var(--white-color);
  cursor: pointer;
  text-wrap: nowrap;
  width: 100%;
}

.song-playing-title-namesinger span {
  font-size: 12px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1.8;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-nonAtive);
}

.song-control {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50vw;
}

.song-control-list {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  justify-content: space-evenly;
  position: relative;
  top: -20px;
  min-width: 320px;
}

.song-control-item {
  font-size: 18px;
  color: var(--white-color);
  cursor: pointer;
}

#music-duration,
#music-duration-end {
  position: absolute;
  top: -13px;
  left: -46px;
  font-size: 16px;
}

#music-duration-end {
  right: -46px;
  left: unset;
}

.range {
  position: relative;
  width: 50%;
  display: flex;
  align-items: center;
}

.range-item {
  position: relative;
  top: -5px;
  height: 2px;
  max-width: 50vw;
  width: 100%;
  cursor: pointer;
}


#volume::-webkit-slider-runnable-track {
  background: var(--hover-color);
  border-radius: 4px;
}

#volume {
  position: absolute;
  top: -55px;
  right: 5px;
  width: 130px;
  transform: rotate(-90deg);
  background-color: #fff;
}

#volume::after {
  content: '';
  position: absolute;
  top: -79px;
  left: 50px;
  width: 40px;
  height: 160px;
  border-radius: 6px;
  background-color: var(--bg-color);
  transform: inherit;
  z-index: -1;
}

.song-option {
  width: 25vw;
  display: flex;
  justify-content: flex-end;
  padding-right: 20px;
}

.song-option-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style-type: none;
  gap: 8px;
}

.song-option-item {
  font-size: 16px;
  cursor: pointer;
  color: var(--white-color);
}

/* Recommend */
.container {
  display: block;
  position: relative;
  top: 65px;
  right: 0;
  float: right;
  width: 79.8vw;
  height: calc(100vh + 60px);
  background-color: var(--bg-color);
  border-radius: 5px;
}

#multiText {
  font-size: 38px;
  font-weight: 900;
  padding-left: 20px;
  line-height: 1.5;
  height: 60px;
}

.main-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 20px;
}

.main-item {
  flex-basis: calc(33.33% - 10px);
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  height: 45px;
  min-width: 150px;
  background-color: var(--item-color);
  border-radius: 2px;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
}

.main-item img {
  height: 45px;
  width: 45px;
  border-radius: inherit;
  object-fit: cover;
}

.main-item span {
  text-wrap: wrap;
}

.play-button {
  position: absolute;
  cursor: pointer;
  right: var(--positionX);
  top: 50%;
  transform: translateY(-20%);
  opacity: 0;
  transition: 0.3s ease;
}

.play-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-53%, -50%);
  height: 35px;
  width: 35px;
  background-color: var(--hover-color);
  border-radius: 50%;
  z-index: -1;
  transition: 0.5s ease;
  background-color: var(--green-color);
  z-index: -1;
  box-shadow: 0 0 8px var(--black-color);
}

.play-button i {
  font-size: 22px;
  color: var(--black-color);
}

.main-item:hover > .play-button {
  opacity: 1;
  transform: translateY(var(--positionY));
}

/*********** For you ***********/
.feed {
  padding-bottom: 100px;
  background-color: var(--bg-color);
}

.for-you {
  position: relative;
  top: 40px;
  padding: 0 20px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.for-you-title h2 {
  cursor: pointer;
  width: max-content;
}

.for-you-title a {
  position: absolute;
  top: 5px;
  right: 40px;
  font-size: 14px;
  color: var(--text-nonAtive);
  cursor: pointer;
}

.for-you-list {
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow: hidden;
  height: 330px;
}

.for-you-item {
  position: relative;
  top: 10px;
  display: flex;
  flex-direction: column;
  max-height: 300px;
  min-width: 200px;
  background-color: var(--item-color);
  border-radius: 10px;
  cursor: pointer;
  opacity: 0;
  animation: toLeft 0.8s ease forwards;
  animation-delay: calc(0.2s * var(--i));
  transition: 0.3s linear;
  padding: 10px;
  overflow: hidden;
}

.for-you-item img {
  height: 170px;
  width: 170px;
  margin: auto;
  border-radius: 4px;
  object-fit: cover;
  top: -12px;
  position: relative;
}

.for-you-item:hover > .play-button {
  opacity: 1;
  transform: translateY(var(calc(--positionY + 20px)));
}

@keyframes toLeft {
  from {
    transform: translateX(-20px);
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.for-you-item:hover {
  background-color: var(--hover-color);
}

.for-you-item-title {
  position: relative;
  top: -15px;
}

.for-you-item-title-main {
  font-size: 18px;
  font-weight: 900;
  padding: 5px;
  color: var(--text-color);
}

.for-you-item-title-sub {
  font-size: 14px;
  font-weight: 300;
  line-height: 15px;
  color: var(--text-nonAtive);
  height: 45px;
  padding: 5px;
}

.menu-mobile {
  position: fixed;
  bottom: 0;
  width: 100vw;
  height: 60px;
  display: flex;
  justify-content: space-around;
  background-color: var(--black-color);
  z-index: 999;
  display: none;
}

.menu-mobile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-mobile-item i {
  font-size: 24px;
}

.menu-mobile-item span {
  font-size: 10px;
  color: var(--text-nonAtive);
  text-shadow: unset !important;
}

.mobile-control {
  display: none;
}

/* Tablet */
@media only screen and (max-width: 1024px) {
  .library-item:last-child i,
  .library-item span,
  .library-filter,
  .library-search,
  .library-playlist-title,
  .moblie-control {
    display: none !important;
  }

  header {
    width: 91.5vw;
  }

  .home-search,
  .library,
  .library-playlist {
    width: 7.5vw !important;
  }

  .home-search-content {
    display: none !important;
  }

  .library-item:first-child i {
    font-size: 26px;
  }

  .container {
    width: 91.5vw;
  }

  .main-item {
    flex-basis: calc(50% - 10px);
  }

  .login-form {
    width: 80% !important;
  }

  .first-input, .second-input {
    width: 80% !important;
  }

}

/* Mobile */
@media only screen and (max-width: 768px) {
  header,
  .container {
    width: 100% !important;
  }

  .setting{
    display: block !important;
  }

  .home-search,
  .library,
  .hyper-link,
  .library-playlist,
  .song-option-item,
  .song-control-item  {
    display: none !important;
  }

  #multiText {
    font-size: 28px;
  }

  .player-control {
    bottom: 70px;
    background-color: var(--item-color);
    width: calc(100vw - 20px);
    height: 60px;
    margin-left: 10px;
    border-radius: 8px;
    display: block;
  }

  .song-playing-item {
    display: flex;
    gap: 20px;
    padding-left: 30px;
  }

  .song-playing-img img {
    position: absolute;
    height: 45px;
    width: 45px;
    inset: 8px 0 0 8px;
  }

  .song-playing-title-namesong {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } 

  #music-range {
    position: absolute;
    max-width: unset;
    width: calc(100vw - 30px);
    top: -12px;
    left: -47%;
  }

  #music-duration, #music-duration-end {
    display: none !important;
  }

  .song-option-item:nth-child(3) {
    position: absolute;
    font-size: 18px;
    right: 50px;
  }

  .menu-mobile {
    display: flex !important;
  }

  #music-range::-webkit-slider-thumb {
    height: unset !important;
    width: unset !important;
  }

  .mobile-control {
    position: relative;
    top: -55px;
    float: right;
    right: 10px;
    list-style: none;
    display: flex;
    font-size: 20px;
    gap: 15px;
    cursor: pointer;
  }

  .login-container {
    padding: 0 !important;
  }

  .login-form {
    width: 100% !important;
  }

  .login-form label, .login-form hr, .login-form button {
    width: 90% !important;
  }

  .first-input, .second-input {
    width: 90% !important;
  }
}

/* Loading */
.load-container {
  position: fixed;
  background-color: #111;
  z-index: 999999;
  inset: 0;
}

.loader {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.loader::after,
.loader::before {
  content: '';  
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--green-color);
  position: absolute;
  left: 0;
  top: 0;
  animation: animloader 2s linear infinite;
}
.loader::after {
  animation-delay: 1s;
}

@keyframes animloader {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Login */

.login-logo {
  width: 100vw;
  display: flex;
  align-items: center;
  margin: 20px 50px;
  gap: 6px;
  font-size: 22px;
  font-weight: 800;
}

.login-logo img {
  width: 40px;
  height: 40px;
}

.login-container {
  background-color: var(--hover-color);
  width: 100vw;
  padding: 30px 0;
  display: flex;
  justify-content: center;
}

.login-form {
  width: 60%;
  height: 100%;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--black-color);
}

.login-form hr {
  width: 60%;
  border: 1px solid #cbcbcb5d;
}

.login-form label span {
  position: absolute;
  font-size: 14px;
}

.login-form label {
  position: relative;
  display: flex;
  width: 50%;
}

.login-form input:not([type="checkbox"]) {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #cbcbcb5d;
  border-radius: 5px;
  background-color: var(--item-color);
  color: var(--white-color);
  margin-top: 20px;
}

/* toggle button */
.login-form input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 20px;
  background: #c0c0c0;
  position: relative;
  border-radius: 20px;
  cursor: pointer;
}

.login-form input[type="checkbox"]:before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 0;
  left: 0;
  transition: 0.3s;
}

.login-form input[type="checkbox"]:checked {
  background: #2ecc71;
}

.login-form input[type="checkbox"]:checked:before {
  left: 20px;
}

.remember-me {
  padding-left: 44px;
  font-size: 18px;
  transform: translateY(2px);
}

.login-form button {
  width: 50%;
  height: 40px;
  border: none;
  border-radius: 5px;
  background-color: var(--green-color);
  color: var(--white-color);
  font-size: 18px;
  cursor: pointer;
  color: var(--black-color);
}

.login-form button:hover {
  transform: scale(1.03);
}

.login-form label i {
  position: absolute;
  right: 7px;
  top: 27px;
  color: var(--text-nonAtive);
  cursor: pointer;
}

#userImage {
  opacity: 0;
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.input-avata {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  position: relative !important;
  cursor: pointer;
  background-color: var(--hover-color);
  margin: 0 auto;
}

.input-avata::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 1px;
  background-color: var(--green-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white-color);
}

.input-avata::before {
  content: '';
  position: absolute;
  height: 50%;
  width: 1px;
  background-color: var(--green-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white-color);
}

#selectedImage {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  display: none;
}

.first-input, .second-input {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.first-input label, .second-input label {
  width: 100%;
}