/* Base reset */
* {
  box-sizing: border-box;
}


@font-face {
  font-family: "WebPlus_IBM_VGA_8x16";
  src: url("../static/fonts/WebPlus_IBM_VGA_8x16.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  background: black;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
}

/* CRT container */
.crt {
  width: 90vw;
  max-width: 900px;
  height: 70vh;
  background: #001100;
  border-radius: 12px;
  box-shadow:
    0 0 20px rgba(0, 255, 0, 0.2),
    inset 0 0 50px rgba(0, 255, 0, 0.15);
  position: relative;
  overflow: hidden;
}

/* Screen text */
.screen {
  padding: 30px;
  color: #00ff66;
  text-shadow:
    0 0 5px rgba(0, 255, 102, 0.6);
  font-size: 16px;
  line-height: 1.4;
  /* text-transform: uppercase; */
  height: 100%;
  overflow: hidden;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
}

#output {
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
}

#output pre {
  font-family: inherit; /* ensures dynamically created pre elements inherit */
}

#output::-webkit-scrollbar {
  width: 6px;
}

#output::-webkit-scrollbar-track {
  background: #020a02; /* deep CRT black-green */
}

#output::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    #0f0 0%,
    #0a0 50%,
    #0f0 100%
  );
  border-radius: 4px;
  box-shadow:
    0 0 4px rgba(0, 255, 0, 0.6),
    inset 0 0 2px rgba(0, 0, 0, 0.8);
}

#output::-webkit-scrollbar-thumb:hover {
  background: #1aff1a;
}

#output {
  scrollbar-width: thin;
  scrollbar-color: #0f0 #020a02;
}


#output::-webkit-scrollbar-thumb {
  visibility: hidden;
}

#output:hover::-webkit-scrollbar-thumb,
#output:active::-webkit-scrollbar-thumb {
  visibility: visible;
}

/* Terminal text */
pre {
  margin: 0;
  white-space: pre-wrap;
}


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

.input-line {
  position: relative;   /* positioning context */
  height: 22px;
  margin-top: 6px;
}


/* prompt stays in flow */
.prompt {
  position: absolute;
  left: 0;
  top: 0;
}

/* invisible real input */
#commandInput {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
  color: transparent;
  caret-color: transparent;
  z-index: 2;
}

/* visible text mirror */
#inputMirror {
  position: absolute;
  left: 18px;
  top: 0;
  white-space: pre;
  pointer-events: none;
}

/* fake caret */
#inputCursor {
  position: absolute;
  top: 0;
  left: 18px;
  pointer-events: none;
  animation: blink 1s infinite;
}



/* =======================
   CRT EFFECTS
   ======================= */

.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.05);
  animation: flicker 0.15s infinite;
  pointer-events: none;
}

@keyframes flicker {
  0% { opacity: 0.9; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}


.edge {
  position: absolute;
  background: rgba(0, 255, 0, 0.15);
  pointer-events: none;
}

.edge.top, .edge.bottom {
  height: 2px;
  width: 100%;
}

.edge.left, .edge.right {
  width: 2px;
  height: 100%;
}

.edge.top { top: 0; }
.edge.bottom { bottom: 0; }
.edge.left { left: 0; }
.edge.right { right: 0; }



.link {
  font-size: 12px;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
  color: #00ff66;
  text-decoration: none;
  opacity: 0.6;
  z-index: 1000;
}

.link:hover {
  opacity: 1;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.8);
}


.bottom-links {
  position: fixed;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 8px;           /* space between the links */
  z-index: 1000;
  font-family: "WebPlus_IBM_VGA_8x16", monospace;
  font-size: 12px;
}


/* #bootPrompt {
  color: black;
  background-color: #0f0;
  font-weight: bold;
  padding: 0 2px;
  animation: flicker 1s infinite;
}

@keyframes flicker {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
} */