@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  font-family: 'Courier New', monospace;
  background: #000;
  position: relative;
}

/* CRT Scanline Effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
}

.retro-text {
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.retro-title {
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
  text-shadow: 
    2px 2px 0px #000,
    4px 4px 0px rgba(255, 0, 255, 0.3);
  animation: colorCycle 4s infinite;
}

@keyframes colorCycle {
  0%, 100% { color: #00FFFF; }
  25% { color: #FF00FF; }
  50% { color: #00FF00; }
  75% { color: #FFFF00; }
}

.retro-border {
  border: 4px solid #00FFFF;
  box-shadow: 
    inset 0 0 20px rgba(0, 255, 255, 0.2),
    0 0 20px rgba(0, 255, 255, 0.3);
  position: relative;
}

.retro-border::before,
.retro-border::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #000;
  border: 2px solid #00FFFF;
}

.retro-border::before {
  top: -4px;
  left: -4px;
}

.retro-border::after {
  bottom: -4px;
  right: -4px;
}

.retro-button {
  background: #000;
  border: 2px solid #00FFFF;
  color: #00FFFF;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.retro-button:hover:not(:disabled) {
  background: #00FFFF;
  color: #000;
  box-shadow: 0 0 10px #00FFFF;
  transform: translate(-2px, -2px);
}

.retro-button:active:not(:disabled) {
  transform: translate(0, 0);
}

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

.retro-button.active {
  background: #FF00FF;
  border-color: #FF00FF;
  color: #000;
}

.retro-button-big {
  background: linear-gradient(180deg, #4B0082 0%, #000 100%);
  border: 4px solid #FF00FF;
  color: #00FFFF;
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 
    inset 0 0 20px rgba(255, 0, 255, 0.3),
    0 0 20px rgba(255, 0, 255, 0.5);
  position: relative;
}

.retro-button-big:hover:not(:disabled) {
  background: linear-gradient(180deg, #FF00FF 0%, #4B0082 100%);
  box-shadow: 
    inset 0 0 30px rgba(0, 255, 255, 0.5),
    0 0 30px rgba(0, 255, 255, 0.7);
  transform: scale(1.02);
}

.retro-button-big:active:not(:disabled) {
  transform: scale(0.98);
}

.retro-button-big:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 0.5; }
  51%, 100% { opacity: 0.3; }
}

.retro-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #000;
  border: 2px solid #00FFFF;
  outline: none;
}

.retro-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #FF00FF;
  border: 2px solid #00FFFF;
  cursor: pointer;
}

.retro-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #FF00FF;
  border: 2px solid #00FFFF;
  cursor: pointer;
}

.retro-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #00FFFF;
  background: #000;
  cursor: pointer;
  position: relative;
}

.retro-checkbox:checked {
  background: #FF00FF;
}

.retro-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00FFFF;
  font-weight: bold;
  font-size: 14px;
}

.pixel-image-container {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 2px solid #00FFFF;
  background: #000;
}

.pixel-image {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 256px;
  height: auto;
}

textarea, input[type="number"] {
  font-family: 'Courier New', monospace;
}

textarea::placeholder {
  color: rgba(0, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .retro-title {
    font-size: 1.2rem;
  }
  
  .retro-button-big {
    font-size: 0.7rem;
  }
}