@font-face {
  font-family: "Acidic";
  src: url("../fonts/Acidic-Y7Ov.ttf")
}

@font-face {
  font-family: "Mouldy Cheese";
  src: url("../fonts/MouldyCheeseRegular-WyMWG.ttf")
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeui.ttf")
}

@font-face {
  font-family: "Segoe UI Bold";
  src: url("../fonts/segoeuib.ttf")
}

@font-face {
  font-family: "Segoe UI Light";
  src: url("../fonts/segoeuil.ttf")
}

@font-face {
  font-family: "Segoe UI Semilight";
  src: url("../fonts/segoeuisl.ttf")
}

@keyframes simple-fade-in {
  0% {opacity: 0}
  100% {opacity: 100%}
}

@keyframes simple-fade-out {
  0% {opacity: 100%}
  100% {opacity: 0}
}

@keyframes body-color-fade-in {
  0% {
    background: rgba(55, 255, 48, 0)
  }
  100% {
    background: rgba(55, 255, 48, 1)
  }
}

@keyframes body-cycle-anim {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 20%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes text-swoop-in {
  0% {
    rotate: 80deg;
    margin-left: -100%;
    margin-top: -50%;
  }
  100% {
    rotate: 0deg;
    margin-left: 0;
    margin-top: 0;
  }
}

@keyframes fi-swoop-in {
  0% {margin-top: 200px}
  100% {margin-top: 0}
}

@keyframes glow-anim {
  0% {
    text-shadow: none
  }
  100% {
    text-shadow: 0 0 20px rgba(255,255,255,0.9)
  }
}

@keyframes ib-select {
  0% {
    background-color: rgba(127,127,127,0.25);
  }
  100% {
    background-color: rgba(255,255,255,0.25);
  }
}

@keyframes image-idle {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes minimize-image {
  0% {
    transform: scale(1);
    top: max(calc(25% - 150px), 50px);
  }
  100% {
    transform: scale(0.45);
    top: -65px;
  }
}

@keyframes minimize-title-text {
  0% {
    font-size: 96px;
    top: max(calc(50% - 52px), var(--tt-highest-ceil));
    left: calc(50% - 286px);
  }
  100% {
    font-size: 64px;
    top: 150px;
    left: calc(50% - 191px);
  }
}


body {
  background-size: 400% 400%;
  animation-name: body-color-fade-in;
  animation-duration: 2s;
}

body.ref-show {
  overflow: hidden;
}

h1 {
  margin-left: 0;
  margin-top: 0;
}

h1 span {
  position: relative;
  display: block;
  margin: 0;
  font-family: Acidic;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  user-select: none
}

h1 span.mt-extra {
  font-family: Arial;
  font-weight: 400;
  font-size: 32px;
}

h2 {
  font-family: Mouldy Cheese;
  color: #fff;
  user-select: none;
}

p {
  font-family: Mouldy Cheese;
  font-weight: 250;
  font-size: 20px;
  color: #fff;
  user-select: none;
}

span {
  font-family: Arial;
}

span#page-watermark {
  position: fixed;
  bottom: 10px;
  right: 10px;
  color: #fff;
  opacity: 0.5;
  user-select: none;
}

#main-text {
  position: absolute;
  left: calc(50% - 286px);
  top: max(calc(50% - 52px), var(--tt-highest-ceil));
  height: 104px;
  font-size: 96px;
  text-align: center
}

#main-text.pre-init {
  animation-name: text-swoop-in;
  animation-duration: 2s;
}

#main-text.page-init:hover {
  text-shadow: 0 0 20px rgba(255,255,255,0.9);
  animation-name: glow-anim;
  animation-duration: 250ms;
  cursor: pointer;
}

#main-text.page-init:active {
  cursor: default;
}

#main-text span.mt-extra {
  animation-name: simple-fade-in;
  animation-duration: 1s;
}

#formula-image {
  position: absolute;
  left: calc(50% - 300px);
  top: max(calc(25% - 150px), 50px);
  filter: invert();
  animation-name: fi-swoop-in;
  animation-duration: 1s;
  user-select: none;
}

#formula-image.fi-idle {
  animation-name: image-idle;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
}

#formula-image.atc-minimized {
  top: -65px;
  animation-name: minimize-image;
  animation-duration: 1.5s;
  transform: scale(0.45);
}

#main-text.atc-minimized {
  left: calc(50% - 191px);
  top: 150px;
  animation-name: minimize-title-text;
  animation-duration: 1.5s;
  font-size: 64px;
}

#tc-area {
  display: block;
  position: absolute;
  left: calc(50% - 225px);
  top: 235px;
  width: 450px;
  animation-name: simple-fade-in;
  animation-duration: 1s;
}

side-block {
  position: absolute;
  top: 0;
  height: 100%;
  width: calc(50% - 225px);
  animation-name: simple-fade-in;
  animation-duration: 1s;
}

side-block.sb-left {
  left: 0
}

side-block.sb-right {
  right: 0
}

#display.sb-hidden side-block {
  display: none;
}

.side-picture {
  position: absolute;
  left: calc(50% - ((min(calc(100% - 100px), 320px)) / 2));
  top: 295px;
  width: min(calc(100% - 100px), 320px);
  background-size: 100%;
  aspect-ratio: 1 / 1;
}

.sp-caption {
  display: none;
  position: absolute;
  left: -5px;
  margin-top: 20px;
  top: 100%;
  width: 100%;
  font-family: Segoe UI;
  font-size: 18px;
  background-color: rgba(0,0,0,0.15);
  border-radius: 5px;
  padding: 10px;
  color: #fff;
  animation-name: simple-fade-in;
  animation-duration: 250ms;
  user-select: none;
}

.side-picture:hover:not(body.ref-show div side-block div) .sp-caption {
  display: block;
}

.interactive-button {
  display: block;
  position: relative;
  width: 450px;
  height: 100px;
  background-color: rgba(0,0,0,0.15);
  border-radius: 5px;
  user-select: none;
  text-align: center;
}

.interactive-button:hover:not(body.ref-show div div div) {
  cursor: pointer;
  background-color: rgba(127,127,127,0.25);
}

.interactive-button:active:not(body.ref-show div div div) {
  animation-name: ib-select;
  animation-duration: 50ms;
  background-color: rgba(255,255,255,0.25);
}

.interactive-button p {
  position: relative;
  top: calc(50% - 11px);
  font-size: 24px;
}

references-window {
  position: fixed;
  left: calc(50% - (min(830px, calc(100% - 270px)) / 2) - 35px);
  top: calc(50% - (min(630px, calc(100% - 270px)) / 2) - 35px);
  width: min(830px, calc(100% - 270px));
  height: min(630px, calc(100% - 270px));
  padding: 35px;
  overflow-x: hidden;
  background-color: rgba(65, 255, 27, 0.75);
  outline: 1px solid #18df29;
  border-radius: 15px;
  animation-name: simple-fade-in;
  animation-duration: 100ms;
}

#ref-exit-button {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 40px;
  height: 40px;
  background-image: url("../assets/exit button.png");
  background-size: 100%;
}

#ref-exit-button:hover {cursor: pointer}