@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background-color: black;
  overflow: hidden;
  font-family: 'Creepster', cursive;
  display: flex;
  justify-content: center;
  align-items: center;
  color: red;
  font-size: 3em;
  text-shadow: 0 0 10px #ff0000, 0 0 20px #770000;
  position: relative;
  flex-direction: column;
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100px, 100px);
  }
}

.content {
  z-index: 1;
  text-align: center;
  animation: flickerFloat 3s infinite ease-in-out;
  color: #ff0000;
  text-shadow:
    0 0 10px #ff0000,
    0 0 20px #ff0000,
    0 0 30px #770000,
    0 0 40px #770000,
    0 0 50px #ff0000;
}

@keyframes flickerFloat {
  0%, 100% {
    opacity: 1;
    transform: translateY(0);
    text-shadow:
      0 0 10px #ff0000,
      0 0 20px #ff0000,
      0 0 30px #770000,
      0 0 40px #770000,
      0 0 50px #ff0000;
  }
  50% {
    opacity: 0.4;
    transform: translateY(-10px);
    text-shadow:
      0 0 20px #ff0000,
      0 0 30px #ff0000,
      0 0 40px #770000,
      0 0 50px #770000,
      0 0 60px #ff0000;
  }
}


.candle {
  margin-top: 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle img {
  width: 200px;
  transition: opacity 0.5s ease;
  display: block;
  z-index: 2;
  position: relative;
  cursor: pointer;
}

.btn {
  margin-top: 20px;
  background-color: #770000;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'Creepster', cursive;
  box-shadow: 0 0 10px red;
  z-index: 2;
  position: relative;

  animation: heartbeat 7s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.2);
  }
  75% {
    transform: scale(1.1);
  }
}

.btn:hover {
  background-color: #550000;
}

/* Ảnh fullscreen và rung */
#scaryImage {
  display: none; /* ẩn mặc định */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 9999;
  animation: shake 0.1s infinite alternate;
  pointer-events: none;
  user-select: none;
}

@keyframes shake {
  0% {
    transform: translate(2px, 1px) rotate(0deg);
  }
  25% {
    transform: translate(-2px, -1px) rotate(-1deg);
  }
  50% {
    transform: translate(1px, 2px) rotate(1deg);
  }
  75% {
    transform: translate(-1px, -2px) rotate(0deg);
  }
  100% {
    transform: translate(2px, 1px) rotate(-1deg);
  }
}
