/* CP437 font for ANSI art */
@font-face {
  font-family: 'IBM VGA';
  src: url('/telnet/fonts/Web437_IBM_VGA_8x16.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset and base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: #080810;
  color: #999;
  font-family: 'IBM VGA', 'Courier New', monospace;
  overflow: hidden;
}

/* Page layout */
.crt-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 16px;
  gap: 12px;
}

/* CRT Monitor frame */
.crt-monitor {
  position: relative;
  flex-shrink: 0;
}

.crt-bezel {
  position: relative;
  border: 3px solid #222;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(51, 255, 51, 0.1),
    0 0 60px rgba(51, 255, 51, 0.03),
    inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.crt-screen {
  background: #000;
  padding: 4px;
}

/* Scanline overlay */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* xterm.js overrides */
.crt-screen .xterm {
  padding: 0;
}

.crt-screen .xterm-viewport {
  overflow: hidden !important;
}
