*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.crt {
  position: relative;
  width: min(100vw, calc(100vh * 384 / 272));
  width: min(100vw, calc(100dvh * 384 / 272));
  height: min(100vh, calc(100vw * 272 / 384));
  height: min(100dvh, calc(100vw * 272 / 384));
  overflow: hidden;
}

.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.09) 2px,
    rgba(0, 0, 0, 0.09) 3px
  );
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.25);
}

#c64 {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
