:root {
  --bezel: #0a0c0a;
  --green: #4dff88;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 45%, #101710 0%, #050705 45%, #000 100%);
  font-family: monospace;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#cab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#bezel {
  padding: clamp(6px, 1.4vmin, 18px);
  border-radius: 18px;
  background: linear-gradient(160deg, #171b17 0%, #0a0c0a 55%, #050605 100%);
  box-shadow:
    0 0 0 2px #000,
    0 0 60px rgba(60, 255, 120, 0.07),
    0 24px 70px rgba(0, 0, 0, 0.9);
}

#screenWrap {
  position: relative;
  width: min(94vw, 124vh);
  aspect-ratio: 4 / 3;
  background: #000;
  overflow: hidden;
  border-radius: 10px;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(70, 255, 130, 0.12);
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  image-rendering: auto;
  animation: flicker 5.5s infinite steps(1);
}

#scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0) 3px
  );
  opacity: 0.5;
}

#vig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(0, 0, 0, 0) 52%,
    rgba(0, 0, 0, 0.34) 82%,
    rgba(0, 0, 0, 0.72) 100%);
}

#glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(114deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 26%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(ellipse at 30% 12%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 55%);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; }
  49% { opacity: 0.985; }
  50% { opacity: 1; }
  77% { opacity: 0.993; }
  78% { opacity: 1; }
}