@font-face {
  font-family: "IBM_BIOS";
  src: url("fonts/Ac437_IBM_BIOS.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VGA_9x8";
  src: url("fonts/Ac437_IBM_VGA_9x8.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VGA_8x16";
  src: url("fonts/Ac437_IBM_VGA_8x16.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "JetBrains_Mono_ExtraBold";
  src:
    url("fonts/JetBrainsMono-ExtraBold-subset.woff2") format("woff2"),
    url("fonts/JetBrainsMono-ExtraBold.ttf") format("truetype");
  font-display: swap;
}

body {
  margin: 0;
  background: #000000;
  color: #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

#stage {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.game-layer {
  white-space: pre;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  padding: 12px;
  user-select: none;
  font-variant-ligatures: none;
  text-rendering: optimizeSpeed;
}

#game {
  position: relative;
  background: #03070f;
  border: 1px solid #000000;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
  filter: none;
  transition:
    filter 150ms ease,
    font-size 120ms ease;
  z-index: 1;
}

#bloom-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: blur(10px) saturate(200%);
  mix-blend-mode: screen;
  opacity: 0.3;
  border: 1px solid transparent;
  z-index: 2;
  display: none;
}

.font-ibm-bios {
  font-family: "IBM_BIOS", "Courier New", monospace;
}

.font-vga-9x8 {
  font-family: "VGA_9x8", "Courier New", monospace;
}

.font-vga-8x16 {
  font-family: "VGA_8x16", "Courier New", monospace;
}

.font-scp {
  font-family: "Source Code Pro", "Consolas", monospace;
  font-weight: 700;
  font-variant-ligatures: none;
  font-feature-settings: normal;
  letter-spacing: 0;
  line-height: 1;
}

.game-layer.font-scp {
  line-height: 1;
}

.font-fira {
  /* Force strict monospace fallback chain and disable ligatures for alignment */
  font-family: "Fira Mono", "Fira Code", "DejaVu Sans Mono", "Consolas", monospace;
  font-weight: 700;
  font-variant-ligatures: none;
  font-feature-settings:
    "liga" 0,
    "calt" 0,
    "clig" 0;
  letter-spacing: 0;
  line-height: 1.1; /* Slightly taller to prevent descenders from clipping */
}

/* ID + class to override the base #game line-height when using Fira */
.game-layer.font-fira {
  line-height: 1.1;
}

.font-jetbrains-mono {
  font-family: "JetBrains_Mono_ExtraBold", "Consolas", monospace;
  font-weight: 800;
  font-variant-ligatures: none;
  font-feature-settings:
    "liga" 0,
    "calt" 0,
    "clig" 0;
  letter-spacing: 0;
  line-height: 1.1; /* Consistent line-height for alignment */
}

/* ID + class to override the base #game line-height when using JetBrains Mono */
.game-layer.font-jetbrains-mono {
  line-height: 1.1;
}

/* Progress bar block characters - use negative margin to overlap blocks without affecting text spacing */
.pb {
  display: inline-block;
  margin-right: 0;
}
