@font-face {
  font-family: "Mushin";
  src: url("https://assets.akutazehy.xyz/fonts/LXGWMarkerGothic-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Higashi";
  src: url("https://assets.akutazehy.xyz/fonts/HigashiOme-Gothic-1.3i.ttf") format("truetype");
}

@font-face {
  font-family: "Ark Pixel";
  src: url("https://assets.akutazehy.xyz/fonts/ark-pixel-12px-proportional-zh_cn.otf") format("opentype");
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background-color: #111;
  color: #fff;
  font-family: "Ark Pixel", Courier, monospace;
  overflow: hidden;
}

.top-section {
  height: 15%;
  /* border-bottom: 1px solid #fff; */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 20px;
}

.top-section-mobile {
  height: 15%;
  display: none;
  justify-content: center;
  align-items: center;
}

svg {
  cursor: pointer;
}

.door {
  fill: darkred;
  transition: fill 0.5s;
}

.background {
  fill: black;
  transition: fill 0.5s;
}

.arrow,
.light,
.person,
.person-body {
  opacity: 0;
  transition:
    opacity 1s,
    transform 1s;
}

.bottom-section {
  border-top: 1px solid #fff;
  height: 85%;
  display: flex;
}

.area {
  flex: 1;
  position: relative;
  border-right: 1px solid #fff;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: flex 0.5s ease;
}

.area:last-child {
  border-right: none;
}

.title {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2em;
  text-align: center;
  white-space: nowrap;
  font-family: "Ark Pixel", "Mushin", "Courier New", Courier, monospace;
  font-size: 5em;
}

.description {
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5em;
  text-align: center;
  opacity: 0.8;
  white-space: nowrap;
  font-family: "Ark Pixel", "Higashi", "Courier New", Courier, monospace;
}

.area {
  flex: 1;
  position: relative;
  border-right: 1px solid #fff;
  cursor: pointer;
  transition: flex 0.5s ease;
}

.area:last-child {
  border-right: none;
}

@media (hover: hover) {
  .area:hover {
    flex: 2;
  }

  .area:hover~.area {
    flex: 0.8;
  }
}

.area.expanded {
  flex: 2;
}

.area.expanded~.area {
  flex: 0.8;
}

@keyframes blink {
  0% {
    background-color: rgba(255, 255, 255, 0.1);
  }

  50% {
    background-color: rgba(255, 255, 255, 0.3);
  }

  100% {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

.area.active {
  animation: blink 0.5s ease 2;
}

@keyframes runEscape {
  0% {
    opacity: 0;
    transform: translateX(0);
  }

  15% {
    opacity: 1;
    transform: translateX(0);
  }

  40% {
    opacity: 1;
    transform: translateX(-20px) translateY(3px) rotate(-5deg);
  }

  100% {
    opacity: 1;
    transform: translateX(80px) translateY(-8px) rotate(10deg);
  }
}

.person.is-running {
  animation: runEscape 1.5s cubic-bezier(0.5, 0, 0.75, 1) forwards;
}

/* Mobile */
@media (max-width: 800px) {
  .bottom-section {
    flex-direction: column;
  }

  .area {
    border-right: none;
    border-bottom: 1px solid #fff;
  }

  .area:last-child {
    border-bottom: none;
  }

  .area:hover,
  .area.expanded {
    flex: 1;
  }

  .area:hover~.area,
  .area.expanded~.area {
    flex: 1;
  }

  .title {
    top: 35%;
    font-size: 3.5em;
    transform: translate(-50%, -50%);
  }

  .description {
    top: 65%;
    bottom: auto;
    font-size: 1.2em;
    transform: translate(-50%, -50%);
  }

  .top-section {
    display: none;
  }

  .top-section-mobile {
    display: flex;
  }
}

/* Low Height Screens */
@media (max-height: 700px) {
  .title {
    display: none;
  }

  .description {
    top: 50%;
    font-size: 1.5em;
  }
}
