:root {
  --pink-dark: #7b2f6b;
  --pink-mid: #d36ac2;
  --pink-light: #f6b6e6;
  --window-bg: #ffe6f7;
  --border-dark: #5b1f4d;
  --border-light: #ffd6f0;
  --space: #0b0614;
  --neon: #ff6bd6;
  --green: #00ff00;
}

* {
  box-sizing: border-box;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

body {
  margin: 0;
  background: var(--space) url('https://www.transparenttextures.com/patterns/stardust.png');
  color: #ffd9f4;
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
}

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

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

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.error-code {
  font-family: 'Press Start 2P', cursive;
  font-size: 80px;
  color: var(--neon);
  text-shadow: 3px 3px 0 var(--pink-dark), 0 0 20px var(--neon);
  margin: 0 0 20px 0;
  animation: float 3s ease-in-out infinite, glitch 0.3s infinite;
  position: relative;
}

.error-code::before {
  content: '404';
  position: absolute;
  top: 0;
  left: 0;
  color: var(--green);
  z-index: -1;
  opacity: 0.7;
  transform: translate(4px, 4px);
}

.error-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 24px;
  color: var(--pink-light);
  text-shadow: 2px 2px 0 var(--pink-dark);
  margin: 0 0 20px 0;
  animation: float 4s ease-in-out infinite;
}

.error-message {
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid var(--border-dark);
  padding: 20px;
  max-width: 500px;
  margin: 0 0 30px 0;
  box-shadow: 
    inset 2px 2px 0 var(--border-light),
    6px 6px 0 rgba(0, 0, 0, 0.3);
}

.error-message p {
  margin: 0 0 15px 0;
  color: var(--pink-light);
  font-size: 20px;
}

.error-message p:last-child {
  margin-bottom: 0;
}

.blink {
  animation: blink 1s infinite;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--pink-light);
  animation: blink 3s infinite;
}

.home-link {
  font-size: 14px;
  color: var(--pink-mid);
}

.home-link a {
  color: var(--pink-light);
  text-decoration: none;
  border-bottom: 1px dotted var(--pink-mid);
}

.home-link a:hover {
  color: var(--neon);
  border-bottom: 1px solid var(--neon);
}

@media (max-width: 600px) {
  .error-code {
    font-size: 50px;
  }
  
  .error-title {
    font-size: 18px;
  }
  
  .error-message {
    padding: 15px;
    margin: 0 15px 20px 15px;
  }
}