@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --phosphor: #33ff33;
  --phosphor-bright: #aaffaa;
  --phosphor-dim: rgba(51, 255, 51, 0.6);
  --phosphor-glow: rgba(51, 255, 51, 0.5);
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #001a00;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.screen-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #001100;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.3) 1px,
    transparent 1px,
    transparent 4px
  );
  z-index: 10;
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 100px rgba(51, 255, 51, 0.1), inset 0 0 50px rgba(0,0,0,0.4);
}

.crt-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(51, 255, 51, 0.03),
    rgba(51, 255, 51, 0.03) 2px,
    transparent 2px,
    transparent 4px
  );
}

.crt-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(51, 255, 51, 0.08),
    transparent 50%,
    rgba(51, 255, 51, 0.08)
  );
  mix-blend-mode: overlay;
}

.vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

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

.screen-wrapper {
  animation: flicker 0.15s infinite;
}