@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  font-family: "Nunito Sans";
  color: dimgray;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-x: hidden;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  text-decoration: none;
}

input {
  outline: 0;
  border-style: solid;
  border-radius: 20px;
  border-width: 1px;
  border-color: whitesmoke;
  font-family: "Nunito Sans";
  font-size: 1em;
  padding: 0.3em 1em 0.3em 1em;
  transition: 0.3s ease-in-out;
  box-sizing: border-box;
  width: 100%;
}

input:focus {
  border-color: lightgray;
}

::selection {
  background: dimgray;
  color: white;
}

::-webkit-scrollbar {
  width: 0.6em;
}


::-webkit-scrollbar-thumb {
  background: #888;
  /*background-clip: padding-box;
  border: 4px solid rgba(0, 0, 0, 0);*/
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.centered-children {
  display: flex;
  align-items: center;
  justify-content: center;
}

.centered-vertically {
  display: flex;
  align-items: center;
}

.navigation {
  width: 100%;
  border-style: none none solid none;
  border-width: 1px;
  border-color: whitesmoke;
  padding: 1em;
  box-sizing: border-box;
  padding-left: 2em;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.title {
  font-size: 1.5em;
  font-family: "Montserrat";
  user-select: text;
}

.title a {
  color: darkgray;
  transition: 0.3s ease-in-out;
}

.title a:hover {
  text-shadow: darkgray 0 5px 0.2em;
}

.wrapper {
  position: relative;
  width: 100vw;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.container {
  position: absolute;
  top: 0;
  width: 75em;
  flex-direction: column;
}

.selection-container {
  user-select: none;
  gap: 1em; 
  position: relative;
  height: 2.5em;
  width: 100%;
  padding-left: 1em;
  box-sizing: border-box;
  margin-top: 1em;
}

#musicContainer {
  user-select: none;
  width: 100%;
  height: calc(100vh - 7.8rem);
  overflow: scroll;
  scroll-behavior: smooth;
  display: grid;
  align-content: start;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-gap: 1em;
  overflow-x: hidden;
  padding: 1em;
  box-sizing: border-box;
}

.card-item {
  display: inline-block;
  /*margin: 1em;*/
}

.card {
  position: relative;
  width: 13em;
  height: 17em;
  border-style: solid;
  border-width: 1px;
  border-color: whitesmoke;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.card:hover {
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  transform: scale(1.05);
}

.favoriteIcon {
  position: absolute;
  left: 0.5em;
  top: 0.5em;
  width: 1.5em;
  height: 1.5em;
  z-index: 9999;
  filter: invert(76%) sepia(98%) saturate(1755%) hue-rotate(356deg) brightness(102%) contrast(108%);
}

.card img:not(.favoriteIcon) {
  width: 13em;
  border-style: none none solid none;
  border-width: 1px;
  border-color: whitesmoke;
  opacity: 0.9;
}

.text-container {
  padding: 0.5em;
  box-sizing: border-box;
}

.song-title {
  position: relative;
  color: black;
  font-size: 1.2em;
  height: 1.2em;
  /*
  text-overflow: ellipsis;
  white-space: nowrap; 
  overflow: hidden;
  width: 11rem;
  */
}

.song-title span {
  position: absolute;
  white-space: nowrap;
  transform: translateX(0);
  transition: 1.5s;
}

.song-title span:hover {
  transform: translateX(calc(12rem - 100%));
}

.song-artist {
  color: gray;
}

.song-title:hover {
  color: dodgerblue;
  transition: 0.3s ease-in-out;
}

#results {
  font-family: "Fira Code";
}

.top-button {
  user-select: none;
  z-index: 9999;
  position: fixed;
  padding: 0.5em;
  bottom: 2em;
  right: 2em;
  border-radius: 50%;
  width: 2em;
  height: 2em;
  border-style: solid;
  border-width: 1px;
  border-color: whitesmoke;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.top-button:hover {
  background: whitesmoke;
}

.sort-option {
  border-radius: 20px;
  padding: 0.2em 1em 0.2em 1em;
  color: dodgerblue;
  background: #e0f0ff;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.sort-option:hover {
  background: #ebf5ff;
}

.sort-icon {
  user-select: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  padding: 0.5em;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.sort-icon:hover {
  background: whitesmoke;
}

.right-section {
  position: absolute;
  right: 0;
  display: flex;
  justify-content: right;
}

.selected {
  background: dodgerblue;
  color: white;
}

.selected:hover {
  background: #1873cd;
}

#sortItems {
  width: 0;
  overflow: hidden;
  transition: 0.5s ease-in-out;
  border-radius: 20px
}

.break {
  height: 17em;
}