@import url("https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Sixtyfour+Convergence&display=swap");

:root {
  --a: 0;
  --body: #333333;
  --container: #1c1c1c;
  --card: #2c3e50;
  --text: rgb(255, 239, 239);
  --header: #000000;
  --invert: invert(1);
  --ulta: invert(0);
}

a {
  all: unset;
  cursor: pointer;
}

* {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

/* Utility Classes */
.flex {
  display: flex;
}

.bg-grey {
  background-color: var(--container);
}

.rounded {
  border-radius: 12px;
}

.m-1 {
  margin: 10px;
}

.p-1 {
  padding: 16px;
}

.ulta {
  filter: var(--ulta);
}

#theme-toggle {
  all: unset;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

#theme-toggle svg {
  width: 24px;
  height: 24px;
}

#dark-icon {
  filter: var(--invert);
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.light-theme {
  --body: #fff2f2;
  --container: #ffdddd;
  --text: #333333;
  --header: #ff8888;
  --card: rgb(255, 114, 110);
  --invert: invert(0);
  --ulta: invert(1);
}

.li {
  background-color: var(--card);
}

.close {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
}

.close img {
  width: 100%;
  height: 100%;
}

#searchInput {
  all: unset;
  min-width: 200px;
}

#searchInput:hover {
  color: #d1d1d1;
  cursor: text;
}

#searchInput:focus {
  outline: none;
  border: 1px solid var(--text);
  padding: 8px;
  border-radius: 5px;
}

body {
  background-color: var(--body);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

.container {
  display: flex;
  gap: 10px;
  padding: 10px;
}

.songimg {
  border-radius: 8px;
  object-fit: cover;
}

.left {
  width: 25vw;
  padding: 0;
  background-color: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home {
  background-color: var(--container);
  border-radius: 12px;
  padding: 16px;
}

.library {
  background-color: var(--container);
  border-radius: 12px;
  padding: 16px;
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.right {
  position: relative;
  width: 72vw;
  margin: 0;
  background-color: var(--container);
  border-radius: 12px;
  padding: 16px;
}

h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sixtyfour Convergence", sans-serif;
}

h1 > img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.home ul li {
  display: flex;
  gap: 15px;
  list-style: none;
  padding-top: 14px;
  font-weight: bold;
  align-items: center;
}

.home ul li img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.heading {
  display: flex;
  gap: 15px;
  width: 100%;
  padding: 23px 14px;
  font-weight: bold;
  align-items: center;
  font-size: 13px;
}

.heading img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.library {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.footer {
  display: flex;
  font-size: 10px;
  color: grey;
  gap: 13px;
  position: absolute;
  bottom: 0;
  padding: 10px 0;
  flex-wrap: wrap;
}

.footer a {
  color: grey;
}

.footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.header {
  display: flex;
  justify-content: space-between;
  background-color: var(--header);
  border-radius: 12px;
  align-items: center;
}

.header > * {
  padding: 20px;
}

.spotifyPlaylists {
  padding: 16px;
}

.spotifyPlaylists h1 {
  padding: 16px;
}

.cardContainer {
  margin: 30px;
  margin-bottom: 50px;
  padding: 10px;
  padding-bottom: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  overflow-y: auto;
  max-height: 60vh;
  position: relative;
  z-index: 0;
}

.cardContainer::-webkit-scrollbar {
  width: 8px;
}

.cardContainer::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.cardContainer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.cardContainer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.light-theme .cardContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.light-theme .cardContainer::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.light-theme .cardContainer::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.card {
  width: 200px;
  padding: 10px;
  border-radius: 5px;
  background-color: var(--card);
  position: relative;
  transition: all 0.3s;
}

@property --direction {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.card::after,
.card::before {
  content: "";
  height: 100%;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: conic-gradient(from var(--direction), transparent 20%, red);
  z-index: -1;
  padding: 2px;
  border-radius: 8px;
  animation: rotate 10s linear infinite;
}

.card::before {
  filter: blur(0.5rem);
  opacity: 0.5;
}

@keyframes rotate {
  from {
    --direction: 0deg;
  }
  to {
    --direction: 360deg;
  }
}

.card:hover {
  background-color: rgb(105, 103, 103);
  cursor: pointer;
  transform: translateY(-5px);
}

.card > * {
  padding-top: 10px;
}

.card img {
  width: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.play {
  width: 28px;
  height: 28px;
  background-color: #1fdf64;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 88px;
  right: 17px;
  opacity: 0;
  transition: all 0.3s ease-out;
}

.card:hover .play {
  opacity: 1;
  transform: scale(1.1);
}

.buttons > * {
  margin: 0 12px;
}

.signupbtn {
  background-color: var(--header);
  color: #efefef;
  font-weight: bold;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.signupbtn:hover {
  transform: scale(1.05);
}

.loginbtn {
  background-color: var(--text);
  border-radius: 21px;
  color: var(--body);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  border: none;
}

.loginbtn:hover {
  font-weight: bold;
  transform: scale(1.05);
}

.playbar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 999;
  bottom: 30px;
  border-radius: 10px;
  padding: 12px;
  width: 68vw;
  min-height: 40px;
  background: linear-gradient(
    -45deg,
    #d02600,
    #d67600,
    #ceb200,
    #00bc5b,
    #028ecb,
    #6b00d2
  );
  background-size: 400% 400%;
  animation: gradient 12s ease infinite;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.songbuttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
}

.songList {
  height: 544px;
  overflow-y: auto;
  margin-bottom: 44px;
}

.songList::-webkit-scrollbar {
  width: 8px;
}

.songList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.songList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.songList::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.light-theme .songList::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.light-theme .songList::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.light-theme .songList::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
}

.hamburgerContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.hamburgerContainer svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.songList ul {
  padding: 0 12px;
}

.songList ul li {
  list-style-type: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border: 1px solid rgba(146, 143, 143, 0.491);
  margin: 12px 0;
  border-radius: 5px;
  transition: all 0.2s;
}

.songList ul li:hover {
  background-color: var(--header);
  transform: translateX(5px);
}

.credit {
  font-size: 11px;
  margin-top: 4px;
  color: #686868;
  line-height: 1.3;
  padding: 0 12px 12px 12px;
}

.links {
  font-weight: bold;
  color: #888;
  transition: all 0.2s;
}

.links:hover {
  color: rgb(60, 60, 254);
  text-decoration: underline;
}

.songList .info {
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.info div {
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playnow {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.playnow img {
  width: 20px;
  height: 20px;
}

.playnow span {
  font-size: 15px;
  padding: 12px;
}

.seekbar {
  height: 4px;
  width: 98%;
  background: var(--header);
  border-radius: 10px;
  position: absolute;
  bottom: 8px;
  margin: 6px;
  cursor: pointer;
}

.circle {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: blueviolet;
  position: relative;
  bottom: 5px;
  left: 0%;
  transition: left 0.3s;
}

.songbuttons img {
  cursor: pointer;
  filter: var(--ulta);
  transition: transform 0.2s;
  width: 35px;
  height: 35px;
}

.songbuttons img:hover {
  transform: scale(1.2);
}

.timevol {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 10px;
}

.songinfo {
  color: var(--body);
  padding: 0 12px;
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songtime {
  width: 125px;
  padding: 0 12px;
  color: var(--body);
  white-space: nowrap;
}

.volume {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  filter: var(--ulta);
}

.volume img {
  transition: transform 0.2s;
  width: 25px;
  height: 25px;
}

.volume img:hover {
  transform: scale(1.2);
}

.range input {
  cursor: pointer;
}

.volumer {
  -webkit-appearance: none;
  width: 100px;
  height: 6px;
  background: #006aff;
  border-radius: 5px;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.volumer:hover {
  opacity: 1;
}

.volumer::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: #00aeff;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.volumer::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volumer::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #00aeff;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.abovebar {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  width: 100%;
  gap: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    padding: 0;
    gap: 0;
  }

  .left {
    position: fixed;
    left: -100%;
    transition: left 0.3s;
    z-index: 1000;
    width: 80vw;
    max-width: 373px;
    background-color: var(--container);
    padding: 20px;
    height: 100vh;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 0;
  }

  .left.active {
    left: 0;
  }

  .songinfo,
  .songtime {
    width: auto;
  }

  .left .close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: 50%;
  }

  .timevol {
    flex-direction: column;
    gap: 13px;
  }

  .right {
    width: 100vw;
    margin: 0;
    border-radius: 0;
  }

  .playbar {
    width: calc(100vw - 40px);
    left: 50%;
    transform: translateX(-50%);
  }

  .seekbar {
    width: calc(100% - 20px);
  }

  .hamburger {
    display: block;
  }

  .card {
    width: calc(50% - 20px);
    min-width: 150px;
  }

  .cardContainer {
    margin: 10px;
    justify-content: center;
    max-height: unset;
    overflow-y: unset;
    margin-bottom: 200px;
  }

  .close {
    display: flex;
  }

  .abovebar {
    flex-direction: column;
    gap: 23px;
    align-items: center;
  }
}

@media (max-width: 500px) {
  .card {
    width: 100%;
  }

  .header > * {
    padding: 10px;
  }

  .buttons > * {
    margin: 0 6px;
  }

  .header {
    padding: 7px;
    flex-direction: column;
    gap: 10px;
  }

  .spotifyPlaylists h1 {
    padding: 8px;
    font-size: 1.2rem;
  }

  .library {
    min-height: 85vh;
  }

  .left {
    width: 100vw;
    max-width: 100vw;
  }

  .songinfo {
    width: 150px;
  }

  .songtime {
    width: auto;
    font-size: 12px;
  }

  .playbar {
    bottom: 10px;
    padding: 8px;
  }

  .volume {
    gap: 5px;
  }

  .volumer {
    width: 60px;
  }

  .songbuttons {
    gap: 10px;
  }

  .songbuttons img {
    width: 20px;
  }
}
