@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}
body {
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
  /* background: #050505; */
}

.header {
  padding: 2rem;
}

a {
  text-decoration: none;
  color: hsl(219, 100%, 60%);
}

h1 {
  color: hsl(219, 100%, 60%);
  text-align: center;
}

h1 span {
  font-weight: 200;
  color: #050505;
}

main {
  box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
  border-radius: 8px;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  margin: 3rem;
  margin-top: 0;
}

.image-container {
  display: flex;
  position: relative;
  height: fit-content;
}

.image-container button {
  position: absolute;
  border: 0;
  background: hsla(0, 0%, 100%, 0.5);
  backdrop-filter: blur(5px);
  color: black;
  padding: 1rem;
  transition: 0.2s;
  cursor: pointer;
  font-size: larger;
  height: 60px;
  -webkit-tap-highlight-color: transparent;
}

.image-container button:hover {
  background: hsla(219, 100%, 60%, 0.5);
  color: white;
}

.image-container .button-prev {
  left: 0;
  top: calc(50% - 30px);
  border-radius: 0 4px 4px 0;
}
.image-container .button-next {
  right: 0;
  top: calc(50% - 30px);
  border-radius: 4px 0 0 4px;
}

.image-container img {
  width: 100%;
  max-width: 400px;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.frame {
  position: relative;
  animation: fade 1.2s linear;
}

.loader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: justify;
  width: 100vw;
  height: 100vh;
  animation: fade 1.2s linear;
}

.loader-text {
  max-width: 600px;
  padding: 2rem;
}

.intro-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #050505;
}

.intro-text button {
  width: fit-content;
  padding: 0.4rem 1rem;
  background: hsl(219, 100%, 64%);
  color: white;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 3px;
  transition: 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.intro-text button:hover {
  background: rgb(41, 114, 249);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.content {
  display: none;
  height: 100vh;
  width: 100vw;
}

.now-playing {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 6px 10px;
  box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,
    rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 1s ease-in-out; /* Smooth fade */
}

.now-playing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20%;
  height: 100%;
  background-color: hsl(219, 100%, 64%);
  z-index: -1; 
  animation: fill-animation 10s linear forwards;
  border-radius: 4px;
}

@keyframes fill-animation {
  to {
    width: 100%;
  }
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1.5rem;
    padding-bottom: 0;
  }

  main {
    margin: 1.5rem;
  }

  .image-container button {
    font-size: initial;
    padding: 0.8rem;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 25px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 20px;
  }
}


#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
}

#preloader:before {
  content: "";
  position: absolute;
  /* Centering the pseudo-element */
  top: 50%;
  left: 50%;
  margin-top: -25px; /* Half of the element's height */
  margin-left: -25px; /* Half of the element's width */
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid hsl(219, 100%, 60%);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.hidden {
  display: none;
}