* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
}

:root {
      --terminal-bg: rgba(24, 24, 24, 0.92);
      --terminal-header: #2b2b2b;
      --terminal-border: rgba(255, 255, 255, 0.08);
      --text-color: #33ff99;
      --prompt-color: #7aa2f7;
}

@font-face {
  font-family: 'Perfect DOS';
  src: url('assets/fonts/perfect_dos_vga_437.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
      overflow: hidden;
      background: black;
      font-family: 'Ubuntu Mono', monospace;
      font-size: 1.3rem;
}

    /* Matrix Canvas */
canvas {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      z-index: 1;
}


/*
  RETRO LINUX TERMINAL
*/

.terminal {
  position: fixed;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: min(900px, 92vw);
  height: min(550px, 75vh);

  background: #000;

  border: 2px solid #777;

  border-radius: 0;

  overflow: hidden;

  z-index: 2;

  box-shadow:
    0 0 0 1px #222,
    0 0 25px rgba(0, 255, 120, 0.08);

  font-family:
    "Ubuntu Mono",
    monospace;
}

/*
  OLD TITLE BAR
*/

.terminal-header {
  height: 32px;

  background:
    linear-gradient(
      to bottom,
      #5d5d5d,
      #3d3d3d
    );

  border-bottom: 1px solid #222;

  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 0 10px;

  user-select: none;
}

.terminal-title {
  color: #d6d6d6;

  font-size: 0.9rem;

  letter-spacing: 0.5px;
}

/*
  OLD WINDOW BUTTONS
*/

.terminal-controls {
  display: flex;
  gap: 4px;
}

.terminal-controls button {
  width: 24px;
  height: 20px;

  border: 1px solid #111;

  background:
    linear-gradient(
      to bottom,
      #7a7a7a,
      #4d4d4d
    );

  color: #fff;

  font-size: 0.8rem;
  font-family: monospace;

  cursor: default;

  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-controls button:active {
  background:
    linear-gradient(
      to bottom,
      #444,
      #666
    );
}

/*
  TERMINAL BODY
*/

#terminal-content {
  height: calc(100% - 32px);

  overflow-y: auto;

  padding: 18px;

  color: #33ff66;

  font-size: 1rem;

  line-height: 1.6;

  white-space: pre-wrap;

  text-shadow:
    0 0 4px rgba(0, 255, 100, 0.35);
}

/*
  TERMINAL LINES
*/

.line {
  display: flex;
  flex-wrap: wrap;

  margin-bottom: 4px;
}

.prompt {
  color: #6fa8ff;

  margin-right: 10px;
}

/*
  CURSOR
*/

.cursor {
  display: inline-block;

  color: #33ff66;

  animation: blink 1s step-end infinite;
}

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

/*
  CRT SCANLINES
*/

.terminal::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 3px
    );

  pointer-events: none;

  opacity: 0.08;
}

/*
  SUBTLE CRT FLICKER
*/

.terminal::after {
  content: "";

  position: absolute;
  inset: 0;

  background: rgba(255, 255, 255, 0.015);

  opacity: 0.03;

  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.02; }
  50% { opacity: 0.04; }
  100% { opacity: 0.02; }
}
