/* Reset & Base Fonts */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: 'Tajawal', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #040407;
  color: #e5e5e5;
  overflow: hidden;
  touch-action: none;
}

/* Atmospheric Post-Processing Layers */
#vignette-layer {
  background: radial-gradient(circle, transparent 40%, rgba(5, 0, 8, 0.85) 90%, #000000 100%);
  transition: background 0.5s ease;
}

#vhs-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* Sanity / Fear Glitch effect */
@keyframes chromaticGlitch {
  0% {
    transform: translate(0);
    filter: drop-shadow(-2px 0 red) drop-shadow(2px 0 cyan);
  }
  20% {
    transform: translate(-3px, 2px);
    filter: drop-shadow(3px 0 red) drop-shadow(-3px 0 cyan);
  }
  40% {
    transform: translate(2px, -2px);
    filter: drop-shadow(-2px 0 red) drop-shadow(2px 0 blue);
  }
  60% {
    transform: translate(-1px, 1px);
    filter: drop-shadow(2px 0 red) drop-shadow(-2px 0 cyan);
  }
  100% {
    transform: translate(0);
  }
}

.glitching {
  animation: chromaticGlitch 0.25s infinite alternate;
}

/* Custom UI Polish */
button {
  cursor: pointer;
}

button:active {
  transform: scale(0.96);
}

/* Touch controls look */
#joystick-zone {
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Scrollbars inside modals */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}