@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 var(--primary-color, #00FF00);
  box-shadow: 
    0 0 10px var(--primary-color, #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 var(--primary-color, #00FF00),
    0 0 20px var(--primary-color, #00FF00),
    0 0 30px var(--primary-color, #00FF00);
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% {
    text-shadow: 
      0 0 10px var(--primary-color, #00FF00),
      0 0 20px var(--primary-color, #00FF00);
  }
  25% {
    text-shadow: 
      -2px 0 10px #FF0000,
      2px 0 20px var(--primary-color, #00FF00);
  }
  50% {
    text-shadow: 
      2px 0 10px var(--primary-color, #00FF00),
      -2px 0 20px #FF0000;
  }
  75% {
    text-shadow: 
      0 0 10px #0000FF,
      0 0 20px var(--primary-color, #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;
  white-space: nowrap;
  animation: typing 1s steps(40, end);
}

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

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

/* ASCII Art */
.ascii-art {
  text-shadow: 0 0 10px var(--primary-color, #00FF00);
  line-height: 1.2;
}

/* Custom Range Slider */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #001100;
  outline: none;
  border: 2px solid var(--primary-color, #00FF00);
  box-shadow: 0 0 5px var(--primary-color, #00FF00);
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color, #00FF00);
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-color, #00FF00);
  border: 2px solid #003300;
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color, #00FF00);
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-color, #00FF00);
  border: 2px solid #003300;
}

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

button:hover:not(:disabled) {
  box-shadow: 0 0 15px var(--primary-color, #00FF00);
  transform: translateY(-2px);
}

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

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Custom Checkbox */
.form-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-color, #00FF00);
  background: #000;
  cursor: pointer;
  position: relative;
}

.form-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -4px;
  left: 1px;
  color: var(--primary-color, #00FF00);
  font-size: 14px;
}

/* Custom Radio */
.form-radio {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-color, #00FF00);
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  position: relative;
}

.form-radio:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color, #00FF00);
}

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

/* Image Handling */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary-color, #00FF00);
  box-shadow: 0 0 10px var(--primary-color, #00FF00);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color, #00FF00);
  filter: brightness(1.2);
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}