/* ==========================================================================
   Easter Egg: Retro-Terminal
   coded by www.bos-medien.com
   ========================================================================== */

#terminal-trigger {
  display: inline-block;
  margin: 0 1px;

  cursor: pointer;
  color: inherit;
  opacity: 0.85;

  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease, transform 160ms ease;
}

#terminal-trigger:hover,
#terminal-trigger:focus-visible {
  color: #e0455f;
  transform: scale(1.15);
}

#terminal-trigger:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 3px;
}

#mini-terminal {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 999998;

  width: min(460px, calc(100vw - 40px));
  min-height: 245px;
  overflow: hidden;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(40, 255, 90, 0.018) 0,
      rgba(40, 255, 90, 0.018) 1px,
      transparent 1px,
      transparent 4px
    ),
    #020a03;

  border: 1px solid rgba(70, 255, 110, 0.55);
  border-radius: 3px;

  box-shadow:
    0 0 8px rgba(50, 255, 90, 0.22),
    0 0 30px rgba(50, 255, 90, 0.12),
    inset 0 0 35px rgba(30, 255, 80, 0.04);

  color: #55ff7a;

  content-visibility: auto;
  contain-intrinsic-size: 430px 245px;

  display: none;
}

#mini-terminal.open {
  display: block;
  animation: terminal-open 180ms ease-out;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 34px;
  padding: 0 13px;

  background: rgba(40, 255, 80, 0.045);
  border-bottom: 1px solid rgba(70, 255, 110, 0.22);

  color: rgba(85, 255, 122, 0.7);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.terminal-status-dot {
  width: 6px;
  height: 6px;

  background: #55ff7a;
  border-radius: 50%;

  box-shadow: 0 0 7px rgba(85, 255, 122, 0.9);
}

.terminal-body {
  position: relative;

  min-height: 210px;
  padding: 22px 24px;

  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;

  text-shadow:
    0 0 4px rgba(85, 255, 122, 0.75),
    0 0 10px rgba(85, 255, 122, 0.2);
}

#terminal-text {
  white-space: pre-wrap;
}

#terminal-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: cursor-blink 900ms steps(1) infinite;
}

.terminal-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: radial-gradient(
    circle at center,
    transparent 45%,
    rgba(0, 0, 0, 0.22) 100%
  );
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@keyframes terminal-open {
  from {
    opacity: 0;
    transform: translateY(5px) scaleY(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@media (max-width: 520px) {
  #mini-terminal {
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .terminal-body {
    padding: 18px;
    font-size: 12px;
  }
}
