html, body {
  margin: 0;
  padding: 0;
  background-color: #1C1E22;
  overflow: hidden;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  height: 100%;
  width: 100%;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hint {
  position: absolute;
  bottom: 40px;
  width: 100%;
  text-align: center;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
  transition: opacity 1s ease;
}

.hidden {
  opacity: 0;
}

/* --- CRT + VHS AESTHETIC LAYERS --- */
body {
  background: radial-gradient(circle at center, #0a0015 0%, #000 100%);
  overflow: hidden;
  image-rendering: pixelated;
  mix-blend-mode: screen;
  filter: contrast(180%) brightness(1.1) saturate(150%);
}

#canvas-container {
  position: relative;
  filter: contrast(200%) brightness(1.2) blur(0.4px);
}

/* Horizontal scan lines */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 0, 255, 0.05) 0px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(255, 0, 255, 0.05) 4px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 10;
}

/* Chromatic aberration and curvature effect */
canvas {
  transform: perspective(1000px) scale(1.02) rotateX(1deg);
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.2);
  image-rendering: pixelated;
  filter:
    drop-shadow(0px 0px 8px rgba(255, 0, 255, 0.3))
    drop-shadow(2px 2px 0 rgba(0, 255, 255, 0.3))
    drop-shadow(-2px -2px 0 rgba(255, 0, 0, 0.4));
}

/* Subtle VHS glitch texture overlay */
@keyframes glitchShift {
  0% { transform: translate(0, 0);}
  20% { transform: translate(-2px, 1px);}
  40% { transform: translate(2px, -1px);}
  60% { transform: translate(0, 1px);}
  80% { transform: translate(1px, -2px);}
  100% { transform: translate(0, 0);}
}

#canvas-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to right,
    rgba(0, 255, 255, 0.05) 0px,
    rgba(255, 0, 255, 0.05) 2px,
    rgba(0, 255, 255, 0.05) 4px
  );
  mix-blend-mode: lighten;
  opacity: 0.4;
  animation: glitchShift 0.3s infinite ease-in-out;
}

#hint {
  text-shadow:
    1px 0px 0px #ff00ff,
    -1px 0px 0px #00ffff,
    2px 2px 2px rgba(255, 255, 255, 0.3);
}