* {
  box-sizing: border-box;
  user-select: none;
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, black, rgb(100, 100, 225));
  color: white;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

canvas {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
}

section {
  display: grid;
  width: 100vw;
  gap: 2.5rem;
  padding-top: 80px;
  position: relative;
  flex-shrink: 0;
  justify-content: center;
}

section>h1 {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 50px;
  text-align: center;
  width: 100%;
}

div.character {
  cursor: pointer;
}

div.character>img {
  border-radius: 15px;
  margin: 10px;
  box-shadow: 0px 0px 15px black;
  transition-duration: 0.5s;
  width: 300px;
}

div.character>img:hover {
  transform: scale(1.05);
}

svg {
  color: white;
  margin: 0 5px;
  transition-duration: 300ms;
}

svg:hover {
  transform: translateY(-5px);
}

.pages {
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  transition: transform .5s ease;
}

.carousel {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  touch-action: pan-y;
  transition: height .5s ease;
  background: transparent;
  cursor: grab;
  position: relative;
}

.carousel:active {
  cursor: grabbing;
}

@media (max-width: 2000px) {
  section {
    grid-template-columns: repeat(4, min-content);
  }

  div.character>img {
    width: 250px;
  }
}

.slide-dots {
  position: absolute;
  z-index: 4;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.slide-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: white;
  transition: all 0.3s ease;
}

.slide-dots button.active {
  background-color: blue;
}

.character-modal {
  position: fixed;
  inset: 0;

  display: none;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, .75);

  z-index: 999;
}

.character-modal.open {
  display: flex;
}

.character-card {
  position: relative;
  width: 90vw;
  max-height: 90vh;

  overflow-y: hidden;

  border-radius: 20px;
  padding: 20px;
  background: #161225;
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow:
    0 0 40px rgba(168, 85, 247, 0.15),
    0 20px 80px rgba(0, 0, 0, 0.6);
}

.character-card img {
  height: 85vh;
  border-radius: 15px;
  margin-right: 50px;
}

.character-card p {
  font-size: 1.5rem;
}

.info {
  font-family: Roboto;
  font-weight: bold;
  font-size: 2rem;
}

.popup-content h1 {
  font-family: Nunito, Comic Sans MS;
}

#exit-button {
  position: absolute;
  right: 20px;
  top: 20px;
  border: 0;
  background: none;
}

.character-details {
  max-height: 83vh;
  overflow-y: scroll;
}

@media (max-width: 1400px) {
  section {
    grid-template-columns: repeat(3, min-content);
  }

  div.character>img {
    width: 275px;
  }
}

@media (max-width: 1150px) {
  section {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    padding-left: 0;
  }

  main>h1 {
    margin-bottom: 15px !important;
  }

  main {
    padding-top: 10px;
  }

  div.character>img {
    width: 35vw;
  }

  /* Popup modifications */

  .popup-content {
    flex-direction: column;
  }

  .character-card p {
    width: 75vw;
  }

  .character-card img {
    margin-right: 0px;
    width: min(75vw, min-content);
    max-width: min-content;
    height: auto;
    max-height: 80vh;
  }

  .character-details {
    max-height: fit-content;
    overflow-y: visible;
  }

  .character-card {
    overflow-y: auto;
  }
}

@media (max-width: 600px) {
  section {
    padding-top: 100px;
  }

  section>h1 {
    top: 0;
    font-size: 45px;
  }
}