@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Special+Elite&family=Nosifer&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 50% 50%, #0a0a0a 0%, #000000 100%);
  color: #e0e0e0;
  font-family: 'Special Elite', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  overflow: hidden;
  cursor: none;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.01) 2px,
    rgba(255, 255, 255, 0.01) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.container {
  z-index: 2;
  position: relative;
}

h1 {
  font-family: 'Creepster', cursive;
  font-size: clamp(28px, 6vw, 48px);
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  letter-spacing: 3px;
}

p {
  font-size: clamp(16px, 3vw, 22px);
  margin: 15px 0;
  max-width: 700px;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

p.visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

/* Enhanced Glitch Effects */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.3s infinite;
  color: #ff0000;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.3s infinite;
  color: #00ff00;
  z-index: -2;
}

.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 0, 0, 0.1) 50%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  animation: glitchSweep 2s infinite;
}

img.jumpscare {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 999;
  display: none;
  filter: contrast(150%) brightness(120%) saturate(150%);
  animation: jumpscareShake 0.5s infinite;
}

.countdown {
  font-family: 'Nosifer', cursive;
  font-size: clamp(50px, 10vw, 100px);
  color: #ff0000;
  text-shadow: 0 0 40px rgba(255, 0, 0, 1), 0 0 80px rgba(255, 0, 0, 0.8);
  margin-top: 30px;
  animation: countdownPulse 1s infinite;
}

.warning {
  color: #ff4444;
  font-size: clamp(18px, 4vw, 24px);
  margin-top: 20px;
  animation: warningFlash 1s infinite;
  font-family: 'Nosifer', cursive;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
}

.final-warning {
  color: #ff0000;
  font-size: clamp(24px, 5vw, 32px);
  margin-top: 20px;
  animation: finalWarningGlitch 0.5s infinite;
  font-family: 'Nosifer', cursive;
  text-shadow: 0 0 30px rgba(255, 0, 0, 1);
}

/* Eyes - More Frequent and Varied */
.eyes {
  position: fixed;
  width: 80px;
  height: 40px;
  background: radial-gradient(circle at 30% 50%, #ff0000 15%, #800000 20%, transparent 25%),
              radial-gradient(circle at 70% 50%, #ff0000 15%, #800000 20%, transparent 25%);
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  animation: eyesBlink 3s infinite;
}

.eyes-large {
  width: 120px;
  height: 60px;
  background: radial-gradient(circle at 30% 50%, #ff4444 20%, #ff0000 25%, transparent 30%),
              radial-gradient(circle at 70% 50%, #ff4444 20%, #ff0000 25%, transparent 30%);
}

.eyes-small {
  width: 40px;
  height: 20px;
  background: radial-gradient(circle at 30% 50%, #ff0000 25%, transparent 30%),
              radial-gradient(circle at 70% 50%, #ff0000 25%, transparent 30%);
}

/* Shadow Effects */
.shadow {
  position: fixed;
  width: 200px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(15px);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}

.shadow-figure {
  width: 150px;
  height: 400px;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.8) 0%, 
    rgba(0, 0, 0, 0.9) 30%, 
    rgba(0, 0, 0, 0.7) 100%);
  filter: blur(8px);
}

/* Static and Noise */
.static {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.95"/></filter></defs><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.15"/></svg>');
  pointer-events: none;
  z-index: 100;
  animation: staticFlicker 0.1s infinite;
}

/* Animations */
@keyframes glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% { 
    transform: translate(0); 
    opacity: 1;
  }
  15%, 49% { 
    transform: translate(-3px, 2px); 
    opacity: 0.8;
  }
  25% {
    transform: translate(2px, -1px) scale(1.01);
  }
}

@keyframes glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% { 
    transform: translate(0); 
    opacity: 1;
  }
  21%, 62% { 
    transform: translate(3px, -2px); 
    opacity: 0.7;
  }
  35% {
    transform: translate(-1px, 2px) scale(0.99);
  }
}

@keyframes glitchSweep {
  0%, 90%, 100% { 
    opacity: 0; 
    transform: translateX(-100%);
  }
  91%, 99% { 
    opacity: 0.3; 
    transform: translateX(100%);
  }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  10% { opacity: 0.8; }
  25% { opacity: 0.2; }
  50% { opacity: 0.9; }
  75% { opacity: 0.1; }
}

@keyframes countdownPulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1; 
    filter: brightness(100%);
  }
  50% { 
    transform: scale(1.15); 
    opacity: 0.8; 
    filter: brightness(150%) hue-rotate(30deg);
  }
}

@keyframes warningFlash {
  0%, 100% { 
    opacity: 0.7; 
    transform: scale(1);
  }
  25% { 
    opacity: 1; 
    transform: scale(1.05);
  }
  50% { 
    opacity: 0.3; 
    transform: scale(0.95);
  }
  75% { 
    opacity: 1; 
    transform: scale(1.02);
  }
}

@keyframes finalWarningGlitch {
  0%, 100% { 
    transform: translate(0) scale(1); 
    filter: hue-rotate(0deg);
  }
  25% { 
    transform: translate(-2px, 1px) scale(1.02); 
    filter: hue-rotate(90deg);
  }
  50% { 
    transform: translate(2px, -1px) scale(0.98); 
    filter: hue-rotate(180deg);
  }
  75% { 
    transform: translate(-1px, 2px) scale(1.01); 
    filter: hue-rotate(270deg);
  }
}

@keyframes eyesBlink {
  0%, 85%, 100% { opacity: 0; }
  86%, 99% { opacity: 0.8; }
  90%, 95% { opacity: 0.3; }
}

@keyframes creepIn {
  0% { 
    opacity: 0; 
    transform: scale(0.5) translateY(100px) rotate(-10deg); 
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8) translateY(20px) rotate(-5deg);
  }
  100% { 
    opacity: 0.7; 
    transform: scale(1) translateY(0) rotate(0deg); 
  }
}

@keyframes staticFlicker {
  0%, 100% { opacity: 0; }
  1%, 3%, 7%, 11%, 13% { opacity: 0.1; }
  2%, 8%, 12% { opacity: 0.05; }
}

@keyframes jumpscareShake {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-5px, 5px) scale(1.02); }
  50% { transform: translate(5px, -5px) scale(0.98); }
  75% { transform: translate(-3px, -3px) scale(1.01); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); filter: brightness(100%); }
  50% { transform: scale(1.03); filter: brightness(110%); }
}

.breathing {
  animation: breathe 4s ease-in-out infinite;
}

.flicker {
  animation: flicker 0.2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .eyes {
    width: 60px;
    height: 30px;
  }
  
  .eyes-large {
    width: 90px;
    height: 45px;
  }
  
  .eyes-small {
    width: 30px;
    height: 15px;
  }
}
