@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
   font-family: 'Avenir Next';
   src: url(https://unfortunatecomic.net/.well-known/AvenirNextCyr-Bold.woff2) format('woff2');
   font-weight: bold;
   font-style: normal;
 }

html {
  scroll-behavior: smooth;
  scrollbar-color: #FFFFFF, #FFFFFF;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-family: 'DM Sans';
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background-image: url(https://unfortunatecomic.net/images/home/background.webp);
  background-color: black;
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  margin: 0;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  align-items: center;
}

main {
  width: 100%;
  height: fit-content;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 6%;
}

#ch-select {
  width: 100%;
  max-width: 1500px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10%;
  padding-top: 5%;
}

#fliers {
  width: 50%;
  max-width: 1500px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  padding-top: 5%;
}

#fliers .discord-inv, #fliers .wiki {
  display: flex;
  height: inherit;
  justify-content: center;
}

#fliers img {
  transition: all .3s ease-in-out;
  width: 80%;
  height: auto;
  transform-origin: 50% 20%;
  user-select: none;
}

#fliers img:hover {
  transform: rotate(1deg);
}

/* Chapter Select */
h1 {
  width: fit-content;
  margin: 0;
  cursor: default;
  color: white;
}

.chapters {
  width: auto;
  height: fit-content;
  display: flex;
  justify-content: center;
  margin-top: 25px;
  margin-bottom: 15px;
}

.chapters img {
  width: auto;
  height: 600px;
  transition: all .3s ease-in-out;
  transform-origin: 50% 20%;
  box-shadow: 0px 0px 10px none;
  user-select: none;
}

.chapters img:hover {
  transform: rotate(1deg);
  box-shadow: 0px 0px 20px rgb(255 252 244 / 50%);
}

/* Description/Logline */

#logline {
  width: 100%;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(82, 26, 24);
  margin-bottom: 3%;
  pointer-events: none;
  user-select: none;
}

#logline .body {
  width: 100vw;
  max-width: 1500px;
  height: fit-content;
  display: flex;
  padding: 25px 15%;
  gap: 10%;
  align-items: center;
  justify-content: center;
}

#logline img {
  width: 100%;
  height: auto;
}

.textbox {
  text-align: center;
  font-family: inherit;
  color: white;
  cursor: default;
  margin: 0px;
}

.textbox h1 {
  font-size: 26px;
}

.textbox p {
  font-size: 20px;
  opacity: 50%;
  margin: inherit;
}

/* Middle section */ 

.middle {
  display: flex;
  flex-direction: column;
  height: fit-content;
  width: inherit;
  justify-content: center;
  gap: 10px;
}

.alt-sites {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: center;
  gap: 35%;
  padding: 5% 0%;
}

.alt-sites a {
  display: flex;
  height: 165px;
  width: 110px;
  justify-content: center;
  align-items: center;
}

.alt-sites img {
  height: 85%;
  transition: .2s ease-in;
  transform-origin: 50% 50%;
}

.alt-sites img:hover {
  transition: .2s ease-out;
  filter: drop-shadow(1px 1px 5px rgb(255 252 244 / 15%))
          drop-shadow(-1px 1px 5px rgb(255 252 244 / 15%))
          drop-shadow(-1px -1px 5px rgb(255 252 244 / 15%))
          drop-shadow(1px -1px 5px rgb(255 252 244 / 15%));
  height: 88%;
}

.rounded img {
  border-radius: 15%;
}

h2 {
  width: fit-content;
  margin: 0;
  cursor: default;
  color: white;
  text-align: center;
  user-select: none;
}

/* Break */
.bottom {
  display:flex;
  align-content: center;
  align-items: center;
  justify-content: space-between;
  margin-top: 300px;
  width: 90%;
  max-width: 1440px;
  overflow: visible;
}

.wiki {
  overflow: visible;
  justify-content: center;
  width: 350px;
}

.wiki-link {
  display: flex;
  justify-content: center;
}

.bottom img {
  transition: all .3s ease-in-out;
  width: 100%;
  height: auto;
  transform-origin: 50% 20%;
}

.bottom img:hover {
  transform: rotate(1deg);
}

.discord-inv {
  display: flex;
  height: 450px;
  width: 300px;
  justify-content: center;
}

.chapters:hover .tooltip {
  display: block;
}

.tooltip {
    display: none;
    background: rgb(255 252 244);
    padding: 10px;
    position: absolute;
    z-index: 101;
    width:fit-content;
    height:fit-content;
    border: solid 2px black;
    color: black;
    font-family: 'DM Sans';
    text-align: right;
    justify-content: center;
}

/* Modal Shit */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99;
    backdrop-filter: brightness(0.5);
    visibility: hidden;
    opacity: 1;
    transition: opacity .3s;
    cursor: default;
}

.modal:link, .modal:visited {
  color: inherit;
  text-decoration: none;
}

.modal:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 101;
}
 
/* Displaying Modal */

.modal:target {
    visibility: visible;
    opacity: 1;
}

.modal .modal-container {
  display: flex;
  flex-direction: column;
  width: 300px;
  z-index: 105;
  background: #fff;
  padding: 1em;
  gap: 1em;
  justify-content: center;
  font-family: 'DM Sans';
  border: 2px solid black;
}

.modal .modal-header {
  min-height: fit-content;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.modal-header h3 {
  margin: 0px;
}

.modal .modal-body {
  min-height: fit-content;
  max-height: calc(100vh - 100px);
  overflow: auto;
  text-align: center;
}

.modal-body p {
  margin: 0px;
  font-family: 'DM Sans';
  color: rgba(0 0 0 / 60%);
}
 
/* Break */

footer {
  margin: 20px;
  position: relative;
  bottom: 0%;
}

footer a, footer a:visited {
  color: rgb(255 255 255 / 35%);
  text-decoration: none;
  transition-duration: .2s;
}

footer a:hover {
  color: rgb(255 255 255 / 75%);
  text-shadow: rgb(255 252 244 / 50%);
  transition-duration: .2s;
}

/* kofi button */ 

.kofi-button {
  position: fixed;
  display: flex;
  height: fit-content;
  width: fit-content;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  bottom: 0%;
  right: 0%;
  padding: 5%;
}

.kofi-button a {
  border-radius: 18%;
  width: 75px;
  height: 75px;
  transition: .2s ease-in-out;
}

.kofi-button a:hover {
  transition: .2s ease-in-out;
  box-shadow: 0px 0px 10px rgb(255 252 244 / 25%);
  transform: rotate(2deg);
}

.kofi-button img {
  width: 100%;
  height: auto;
}