* {
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Mono', 'Share Tech Mono', monospace;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Scanlines effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 0, 0.03) 0px,
    transparent 1px,
    transparent 2px,
    rgba(0, 255, 0, 0.03) 3px
  );
  pointer-events: none;
  z-index: 9999;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.97; }
}

/* Matrix background */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, rgba(0, 255, 0, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(0, 255, 0, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* Glow effects */
.glow-text {
  text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
}

.glitch-text {
  position: relative;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
  98% {
    transform: translate(2px, 2px);
  }
}

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

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

/* Pixel art scaling */
.pixel-art {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Robot card hover effect */
.robot-card {
  position: relative;
  transition: all 0.3s ease;
}

.robot-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00fff9, #39ff14, #ff006e, #00fff9);
  background-size: 400% 400%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  animation: gradient 3s ease infinite;
}

.robot-card:hover::before {
  opacity: 0.3;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Terminal modal effects */
.terminal-modal {
  box-shadow: 0 0 40px rgba(0, 255, 249, 0.5);
}

/* Robot detail modal rotation */
.rotating-robot {
  animation: hover-float 3s ease-in-out infinite;
}

@keyframes hover-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Ticker animation */
.ticker {
  white-space: nowrap;
}

.ticker-content {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0e27;
  border: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb {
  background: #00ff00;
}

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

/* CRT monitor effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scanlines {
    background-size: 100% 2px;
  }
  
  pre {
    font-size: 8px !important;
    line-height: 1.2;
  }
}

/* Button hover effects */
button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0, 255, 249, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

button:hover::after {
  width: 300px;
  height: 300px;
}

/* Input glow on focus */
input:focus {
  box-shadow: 0 0 10px rgba(0, 255, 249, 0.5);
}

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

.pulse {
  animation: pulse 2s ease-in-out infinite;
}