@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  src: local("IBM Plex Mono"), local("IBMPlexMono"),
    url("fonts/ibm-plex-mono-v20-latin-regular.woff2") format("woff2"),
    url("fonts/IBMPlexMono-Regular.woff") format("woff");
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (height >= 1050px) {
  .dialogue-box {
    font-size: 1.5rem;
  }

  .crystal-text {
    font-size: 1.5rem;
  }

  .crystal-nav-bar {
    font-size: 1.5rem;
  }
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

.z1 {
  z-index: 1;
}

.z2 {
  z-index: 2;
}

.z3 {
  z-index: 3;
}

@keyframes fadein {
  to {
    opacity: 1;
  }
}

.bg-image {
  opacity: 0;
  animation: fadein 1s forwards;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.body-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.status-bar-top {
  background-color: rgb(0, 0, 0);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 20px;
  border-bottom: 1px solid #fff;
}

.status-bar-top > :first-child {
  flex-grow: 1;
  flex-basis: 0;
}

.status-bar-top > :last-child {
  flex-grow: 1;
  flex-basis: 0;
  text-align: right;
}

.guest {
  color: #ffff00;
}

.online {
  color: #add8e6;
}

.title-container {
  margin-top: 50px;
  padding: 5px;
  line-height: 0.7;
  font-size: clamp(0.3rem, 1.3vw, 1rem);
  width: fit-content;
  align-self: center;
  color: #b7fff5;
}

.dialogue-box {
  padding: 10px;
  color: #fff;
  background-color: #000;
  border: 2px solid #fff;
  position: absolute;
  width: 92%;
  max-width: 800px;
  top: 92%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.crystal-container {
  --video-ratio: 16 / 9;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: var(--video-ratio);
  width: clamp(400px, 110vh, 2000px);
  height: auto;
  mix-blend-mode: screen;
}

@media (min-width: 1050px) {
  .crystal-container {
    width: clamp(400px, 110vh, 2000px);
  }
}

#crystal-video {
  opacity: 0;
  animation: fadein 1s forwards;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.crystal-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 20%, 57% 50%, 50% 80%, 43% 50%);
  cursor: pointer;
}

.crystal-nav-bar {
  display: flex;
  justify-content: center;
  position: absolute;
  padding: 7px;
  top: 79%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  background-color: #002176;
  border: 4px double #fff;
  /* 800px for 3 links, 300px for 1 link */
  width: 300px;
}

.crystal-nav-bar-links {
  text-decoration: none;
  color: #fff;
}

.crystal-nav-bar-links:hover {
  color: #c7fbff;
}

.terminal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  height: 80%;
}

.terminal {
  height: 300px;
  width: 500px;
  padding: 12px 14px;
  color: #cccccc;
  font-size: 0.9rem;
  line-height: 1.6;
  z-index: 5;
  background-color: rgb(0, 0, 0);
}

.command-color {
  color: #00ffff;
}

.boot-line {
  display: block;
  opacity: 0;
  animation: fadein 0.01s forwards;
  /* animation-delay: calc(var(--i) * 0.1s); */
}

.boot-line:nth-child(1) {
  animation-delay: 0.1s;
}
.boot-line:nth-child(2) {
  animation-delay: 0.2s;
}
.boot-line:nth-child(3) {
  animation-delay: 0.3s;
}
.boot-line:nth-child(4) {
  animation-delay: 0.4s;
}
.boot-line:nth-child(5) {
  animation-delay: 0.5s;
}
.boot-line:nth-child(6) {
  animation-delay: 0.6s;
}
.boot-line:nth-child(7) {
  animation-delay: 0.7s;
}
.boot-line:nth-child(8) {
  animation-delay: 0.8s;
}
.boot-line:nth-child(9) {
  animation-delay: 0.9s;
}

.prompt-line {
  display: flex;
  align-items: center;
  margin-top: 4px;
  opacity: 0;
  animation: fadein 0.01s 0.85s forwards;
}

.prompt-text {
  color: #fff;
  white-space: pre;
}

.cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1.0625rem;
  background: #cccccc;
  margin-left: 1px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  animation: blink 1.1s step-start infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.dim {
  color: #666;
}

.instagram-label {
  background-color: #16c60c;
  color: #000;
  width: 150px;
}

.twitter-label {
  background-color: #b4009e;
  color: #000;
  width: 150px;
}

.open-label {
  background-color: #3b78ff;
  color: #000;
  width: 170px;
}

.instagram-link {
  color: #16c60c;
  width: fit-content;
  text-decoration: none;
}

.instagram-link:hover {
  color: #a3cc16;
  text-decoration: overline;
}

.twitter-link {
  color: #b4009e;
  width: fit-content;
  text-decoration: none;
}

.twitter-link:hover {
  color: #ff9cff;
  text-decoration: overline;
}

.open-link {
  color: #3b78ff;
  width: fit-content;
  text-decoration: none;
}

.open-link:hover {
  color: #00b2ff;
  text-decoration: overline;
}

.exit-container {
  display: flex;
  justify-content: center;
}

.exit-link {
  color: #fff;
  text-decoration: none;
  text-align: center;
  background-color: #002f9e;
  width: 50px;
  font-size: 1.1rem;
}

/* scanlines */
.crystal-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.55) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 2;
}
