/* Сброс базовых стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Подложка: темный фон */
body {
  background: #000; /* основной фон - черный */
  color: #f00; /* базовый текст - красный */
  font-family: 'Creepster', cursive;
  overflow: hidden; /* отключаем скролл ради эффекта полноэкранной темноты */
  height: 100vh;
  position: relative;
}

/* Затемнение с градиентом */
.dark-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0,0,0,0.7) 0%, #000 80%);
  z-index: 1;
}

/* Основной контейнер */
main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

/* Стиль заголовка с глитч-эффектом */
.glitch-title {
  font-size: 4rem;
  color: #f00;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: glitch 2s infinite;
}
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  text-transform: uppercase;
}
.glitch-title::before {
  color: #ff1a1a;
  z-index: -1;
  animation: glitch 2s infinite;
}
.glitch-title::after {
  color: #9b0000;
  z-index: -2;
  animation: glitch 2s infinite reverse;
}
@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);
  }
}

/* Красная линия под заголовком */
.line {
  width: 200px;
  height: 4px;
  background: #900;
  margin: 1rem auto 2rem;
}

/* Текст приветствия */
.intro-text {
  font-size: 1.3rem;
  color: #ff4c4c; /* светлее красный */
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* Кнопка с эффектом капель крови */
.scare-button {
  position: relative;
  display: inline-block;
  background: #900;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  overflow: hidden;
  transition: 0.3s ease;
}
.scare-button:hover {
  background: #f00;
}
.scare-button span {
  position: relative;
  z-index: 2;
}
.blood-drip {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0.5rem;
  height: 1rem;
  background: #900;
  border-radius: 5px;
  animation: drip 2s infinite ease-in-out;
  z-index: 1;
}
@keyframes drip {
  0% {
    height: 1rem;
  }
  50% {
    height: 2rem;
  }
  100% {
    height: 1rem;
  }
}

/* Фон с туманом */
#fog {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://i.imgur.com/3s8XSV1.png') repeat center center;
  z-index: 0;
  opacity: 0.1;
  animation: fogMove 30s linear infinite;
}
@keyframes fogMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
  .glitch-title {
    font-size: 2.5rem;
  }
  .intro-text {
    font-size: 1rem;
  }
  .scare-button {
    font-size: 1rem;
  }
}
