:root {
  --blue: #1e90ff;
  --white: #ffffff;
  --text-bright-accent: #1ed760;
  --background-base: #121212;
}

@font-face {
  font-family: "Cousine-Regular";
  src: url("/fonts/Cousine-Regular.ttf");
}

:root {
  color-scheme: light dark;
}

html,
body {
  margin: 0;
  overflow: hidden;
  background-color: #131516;
  height: 100%;
  font-family: "Cousine-Regular";
}

#searchBar input[type="search"] {
  border-radius: 5px;
  border: none;
  font-size: 1em;
}

#searchBar input[type="search"]:focus {
  border: none;
}

.loading #normal {
  display: none;
}

.loading #loading {
  display: block !important;
}

#loading {
  display: none;
}

#searchForm {
  display: inline-block;
  margin: auto;
}

video {
  height: calc(100% - 162.39px - 18px);
  width: 100%;
}

#search {
  padding: 6px;
}

#searchBar {
  background-color: #1c1f20;
  padding: 15px;
  box-shadow: 0px 2px 5px black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.linkButton {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  padding: 7px 10px;
  background-color: rgb(21, 44, 86);
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 2px 2px 2px black;
  /* color: #3391ff; */
  color: pink;
  white-space: nowrap;
}

.error {
  background-color: red !important;
}

#songDisplay {
  display: flex;
}

#randomSongDisplay {
  font-size: 1.8em;
  padding: 15px;
  text-align: center;
  background-color: #181818;
  border-radius: 30px;
  display: inline-block;
}

.songDetails {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.5em;
  margin: 15px;
  max-width: calc(100% - 100px);
}

.profileCardMini {
  padding: 2px;
}

.profileCardMini img {
  border-radius: 50%;
  vertical-align: middle;
  padding-right: 5px;
  height: 16px;
}

.logoutBtn {
  text-decoration: none;
  color: red;
}

#vcMembers {
  position: absolute;
  top: 80px;
  left: 0;
  z-index: 4;
  background-color: #1c1f20;
  padding: 5px 15px;
  border-radius: 0px 0px 5px 0px;
  box-shadow: 0px 2px 2px black;
  user-select: none;
  width: max-content;
}

#profileCard {
  background-color: #131516;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 2px 2px 2px black;
  user-select: none;
}

/* homarr */
@media only screen and (max-width: 300px) {
  #profileCard {
    width: 40%;
    margin-left: 60vw;
  }

  #voiceChannelName {
    width: 40%;
    height: 20px;
  }

  #searchBar {
    width: 96vw;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 3px;
  }
}

#profileCard #details {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.8em;
}

#profileCard #username {
  display: block;
}

#profileCard #voiceChannelName {
  font-size: 0.8em;
  color: grey;
}

#voiceChannelName {
  overflow: hidden;
  display: inline-block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  border-radius: 50%;
  vertical-align: middle;
}

.avatarSmall {
  height: 32px;
}

.songCover {
  vertical-align: middle;
  min-width: 74px;
  max-width: 74px;
  object-fit: cover;
}

.songCoverContainer {
  vertical-align: middle;
  border-radius: 5px;
  box-shadow: 2px 2px 5px black;
  min-width: 74px;
  max-width: 74px;
  object-fit: cover;
  max-height: 74px;
  overflow: hidden;
}

.backgroundImage {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: 50% 50%;
}

.blurredBackgroundImage {
  background-size: cover !important;
}

#mainBackgroundImage {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: 50% 50%;
  backdrop-filter: blur(10px);
  filter: drop-shadow(0px 0px 30px black);
}

#mainBody {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#searchBarWrapper {
  /* position: absolute; */
  width: 100%;
  z-index: 100;
}

.notice:hover {
  outline: solid 1px #333638;
  filter: drop-shadow(0px 0px 5px #333638);
}

#joinVCNotice img {
  vertical-align: middle;
}

img[src=""] {
    display: none;
}

.notice {
  position: absolute;
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 15px;
  border-radius: 15px;
  user-select: none;
}

.login {
  margin-top: 5px;
}

.progresContainer {
  text-align: center;
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lucide {
  width: 16px;
  height: 16px;
}

#fallbackCover i {
  font-size: 44px;
  line-height: 74px;
  color: hsla(0,0%,100%,.2)
}

#fallbackCover {
  text-align: center;
  height: 74px;
  vertical-align: middle;
  background-color: hsla(0,0%,100%,.1);
}

.progresContainer > span {
  margin: 0px 5px;
}

.progressBar {
  width: calc(100% - 6em);
  height: 4px;
  background-color: rgb(116, 116, 116);
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

.progressBar .progressBarInner {
  width: var(--progressBarPercentage);
  height: 4px;
  background-color: antiquewhite;
  border-radius: 2px;
}

.songTitle {
  display: block;
  max-width: 325px;
  min-width: 325px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songAuthors {
  font-size: 0.5em;
  margin-top: 0.2em;
  color: rgb(160, 160, 160);
  display: block;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#controlBarBottom {
  background-color: transparent;
  /* #111213 */
  width: 100%;
  /* position: absolute; */
  bottom: 0px;
  padding: 15px;
  box-sizing: border-box;
  box-shadow: 0px -2px 5px black;
  user-select: none;
  z-index: 100; /* 
  transform: translateY(100%);
  animation: smooth-appear 0.5s cubic-bezier(0.19, 1.57, 1, 1) forwards; */
}

@keyframes smooth-appear {
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

.progressBarDragged {
  background-color: #00d74c !important;
  z-index: 100;
  position: absolute;
  top: 0px;
}

#centerControls {
  width: 100px;
  height: 20px;
  background-color: red;
}

#rightControls {
  width: 100px;
  height: 20px;
  background-color: red;
}

#controlsBar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% - 74px);
}

#controlsBarLeft {
  min-height: 20px;
}

#controlsBarMiddle {
  min-height: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-content: center;
  width: 100%;
}

#controlsBarRight {
  width: 30%;
  min-height: 20px;
  margin: auto;
}

.button {
  margin: 0 4px;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  /* transition: background-color 0.2s ease; */
}

.button:hover {
  background-color: #9d9d9d;
  color: #181818;
  transform: scale(1.05);
}

.button:active {
  transform: scale(1.1);
}

#playbackControls {
  white-space: nowrap;
}

.queueUpDown {
  display: block;
}

body[data-voice="false"] .inVoice {
  display: none !important;
}
body[data-voice="true"] .notInVoice {
  display: none;
}
body[data-media-playing="false"] .mediaPlaying {
  display: none;
}
body[data-media-playing="true"] .mediaNotPlaying {
  display: none;
}
body[data-linked="false"] .accountLinked {
  display: none;
}
body[data-linked="true"] .accountNotLinked {
  display: none;
}
body[data-online="false"] .online {
  display: none !important;
}
body[data-online="true"] .offline {
  display: none !important;
}
body[data-reconnecting="false"] .reconnecting {
  display: none !important;
}

body[data-reconnecting="true"] .notReconnecting {
  display: none !important;
}

body[data-buffering="false"] .notBuffering {
  display: none !important;
}

@media only screen and (max-width: 768px) {
  #playbackControls {
    padding: 6px;
    border-radius: 5px;
    background-color: #131516;
    display: flex;
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media only screen and (max-width: 400px) {
  #vcMembers {
    top: 145px;
  }
}

#queueModal {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 70vw;
  max-width: 70vw;
  min-height: 70vh;
  max-height: 71vh;
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 5px;
  border-color: #1c1f20;
  border-style: solid;
  border-width: 2px;

  
  height: 100%;
  z-index: 99999;
  box-sizing: border-box;
}

#queueFlexContainer {
  display: flex;
  flex-flow: column;
  height: 100%;
}

@media only screen and (max-width: 768px) {
  #queueModal {
    height: 100%;
    max-height: unset;
    width: 100%;
    max-width: unset;
    padding: 0px;
  }

  .play-button-container, .plbtn, .queueUpDownContainer, .requester-icon, .remove-button, #vcMembers, #details, .logoutBtn {
    display: none !important;
  }

  #queue-list {
    margin: 5px;
  }

  #controlsBar {
    justify-content: unset;
  }

  #profileCard {
    padding: 5px;
    border-radius: 50%;
  }
}

.queue-item {
  padding: 10px;
  border-radius: 5px;
  height: 30px;
  background-color: rgb(30, 30, 30);
  display: flex;
  flex-direction: "row";
  align-items: center;
  gap: 10px;
  user-select: none;
  position: relative;
}

#queue-list.dragging .queue-item * {
  pointer-events: none;
}

.queue-item.dropstart::before {
  background: red;
  content: "";
  height: 1px;
  position: absolute;
  width: 100%;
  top: -2.5px;
}

.queue-item.dropend:after {
  background: var(--text-bright-accent);
  content: "";
  height: 1px;
  position: absolute;
  width: 100%;
  top: calc(100% + 2.5px);
}

.queue-item.selected {
  background-color: hsla(0,0%,100%,.3);
}

.queue-item.selected.currently-playing {
  color: var(--text-bright-accent);
}

.queue-item:hover:not(.selected) {
  background-color: rgb(22, 22, 22);
  outline: solid 1px white;
}

.queue-item.dragging {
  background-color: rgb(58, 58, 58);
}

.queue-item:not(:last-child) {
  margin-bottom: 5px;
}

.queue-item:first-child {
  margin-top: 10px;
}

.queue-item-text {
  height: 30px;
  line-height: 35px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.queue-image {
  width: 40px;
  height: 40px;
  border-radius: 5px;
}

.currently-playing {
  background-color: rgb(0, 80, 0);
}

.end-container {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-left: auto;
}

.requester-icon {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  align-self: center;
}

.icon {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 20px;
  height: 30px;
  margin: 0 4px;
  padding: 10px 10px;
  margin-bottom: -8px;
  /* font-size: 16px; */
  /* background-color: #131516; */
}

/* .icon:hover .bar {
  display: none;
}

.icon:not(:hover) .button .set-play-button {
  display: block;
}

.icon:not(:hover) .button {
  display: none;
} */

.play-button-container:not(:hover) .button {
  display: none;
}

.play-button-container:hover .icon {
  display: none;
}

.bar {
  width: 6px;
  height: 80%;
  background-color: green;
  border-radius: 3px;
  transform-origin: bottom;
  animation: bounce 2.2s ease infinite alternate;
  content: "";
}

.bar {
  &:nth-of-type(2) {
    animation-delay: -2.2s; /* Start at the end of animation */
  }

  &:nth-of-type(3) {
    animation-delay: -3.7s; /* Start mid-way of return of animation */
  }
}

@keyframes bounce {
  10% {
    transform: scaleY(0.3); /* start by scaling to 30% */
  }

  30% {
    transform: scaleY(1); /* scale up to 100% */
  }

  60% {
    transform: scaleY(0.5); /* scale down to 50% */
  }

  80% {
    transform: scaleY(0.75); /* scale up to 75% */
  }

  100% {
    transform: scaleY(0.6); /* scale down to 60% */
  }
}


#queue-list {
  display: flex;
  flex-direction: column;
  flex: 0 1 100%;
  overflow-y: scroll;
  margin-top: 15px;
}

.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}