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

* {
  font-family: 'VT323', monospace;
}

body {
  margin: 0;
  padding: 0;
  background: #000000;
  overflow-x: hidden;
}

/* CRT Screen Effects */
.crt-screen {
  position: relative;
  animation: flicker 0.15s infinite;
}

.crt-screen::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

.crt-screen::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

/* CRT Border */
.crt-border {
  border: 3px solid #00FF00;
  box-shadow: 
    0 0 10px #00FF00,
    inset 0 0 10px rgba(0, 255, 0, 0.2);
  background: rgba(0, 20, 0, 0.8);
  position: relative;
}

/* Scanline Effect */
.scanline-overlay {
  position: relative;
}

.scanline-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 255, 0, 0.1) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
}

/* Glitch Text Effect */
.glitch-text {
  text-shadow: 
    0 0 10px #00FF00,
    0 0 20px #00FF00,
    0 0 30px #00FF00;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% {
    text-shadow: 
      0 0 10px #00FF00,
      0 0 20px #00FF00;
  }
  25% {
    text-shadow: 
      -2px 0 10px #FF0000,
      2px 0 20px #00FF00;
  }
  50% {
    text-shadow: 
      2px 0 10px #00FF00,
      -2px 0 20px #FF0000;
  }
  75% {
    text-shadow: 
      0 0 10px #0000FF,
      0 0 20px #00FF00;
  }
}

/* Flicker Animation */
@keyframes flicker {
  0% {
    opacity: 0.97;
  }
  5% {
    opacity: 1;
  }
  10% {
    opacity: 0.95;
  }
  15% {
    opacity: 1;
  }
  20% {
    opacity: 0.98;
  }
  100% {
    opacity: 1;
  }
}

/* Typing Animation */
.typing-animation {
  overflow: hidden;
  border-right: 0.15em solid #00FF00;
  white-space: nowrap;
  animation: typing 0.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Cursor Blink */
.cursor-blink {
  animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Glow Effect */
.text-green-400,
.text-green-300,
.text-green-500 {
  text-shadow: 0 0 5px currentColor;
}

/* ASCII Art */
.ascii-art {
  text-shadow: 0 0 10px #00FF00;
  line-height: 1;
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #001100;
  outline: none;
  border: 2px solid #00FF00;
  box-shadow: 0 0 5px #00FF00;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #00FF00;
  cursor: pointer;
  box-shadow: 0 0 10px #00FF00;
  border: 2px solid #003300;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #00FF00;
  cursor: pointer;
  box-shadow: 0 0 10px #00FF00;
  border: 2px solid #003300;
}

/* Button Hover Effects */
button {
  position: relative;
  transition: all 0.2s;
}

button:hover {
  box-shadow: 0 0 15px #00FF00;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

/* Responsive Typography */
@media (max-width: 768px) {
  .text-5xl {
    font-size: 2.5rem;
  }
  
  .text-2xl {
    font-size: 1.5rem;
  }
  
  .text-xl {
    font-size: 1.2rem;
  }
}

/* Loading Bar Animation */
@keyframes load {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

/* Make sure images don't break layout */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #000000;
}

::-webkit-scrollbar-thumb {
  background: #00FF00;
  box-shadow: 0 0 10px #00FF00;
}

::-webkit-scrollbar-thumb:hover {
  background: #00DD00;
}