body {
  margin: 0;
  color: #ff7518;
  font-family: "Creepster", cursive;
  text-align: center;
  padding: 60px;
  overflow: hidden;
  cursor: none;
  background: black;
}

/* Background Layer — Shakes Alone */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./first section.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  animation: bgShake 0.4s infinite alternate ease-in-out;
  z-index: -3;
}

/* Foggy Red Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 0, 0, 0.05),
    rgba(0, 0, 0, 0.8)
  );
  mix-blend-mode: overlay;
  animation: fog 12s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: -2;
}

/* Static TV Glitch Overlay */
.static-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://media.giphy.com/media/oEI9uBYSzLpBK/giphy.gif");
  opacity: 0.05;
  mix-blend-mode: screen;
  animation: staticFlicker 10s infinite;
  z-index: -1;
}

h1 {
  font-size: 3.5em;
  color: #ff3333;
  text-shadow: 0 0 30px #ff0000, 0 0 10px #ff6600;
  animation: flicker 2.5s infinite;
}

.subtitle {
  margin-bottom: 40px;
  font-style: italic;
  color: #ffb366;
  text-shadow: 0 0 5px #ff6600;
}

button {
  background-color: transparent;
  border: 2px solid #ff7518;
  color: #ffb366;
  font-size: 1.2em;
  margin: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #ff7518;
  color: #000;
  box-shadow: 0 0 20px #ff7518;
  transform: scale(1.1);
}

audio {
  margin-top: 30px;
  width: 80%;
  filter: drop-shadow(0 0 10px #ff6600);
}

#message-box {
  margin-top: 30px;
  font-size: 1.1em;
  color: #ffcccc;
  text-shadow: 0 0 10px red;
  min-height: 40px;
}

/* Ghost Text */
.ghost {
  position: absolute;
  color: rgba(255, 255, 255, 0.08);
  font-size: 1.5em;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  animation: ghostFade 7s ease-in-out forwards;
}

/* Cursor Ghost Trail */
.cursor-echo {
  position: absolute;
  width: 15px;
  height: 15px;
  background: radial-gradient(
    circle,
    rgba(255, 100, 100, 0.7),
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: echoFade 0.8s ease-out forwards;
  z-index: 10;
}

.summon-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 18px;
  font-family: "Creepster", cursive;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid red;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
  text-shadow: 0 0 10px red;
  animation: floatButton 3s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.summon-btn:hover {
  background: red;
  box-shadow: 0 0 25px red;
  transform: scale(1.1);
}

/* Gentle floating/dangling motion */
@keyframes floatButton {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

/* Keyframes */
@keyframes bgShake {
  0% {
    background-position: center;
  }
  25% {
    background-position: calc(50% + 2px) calc(50% - 2px);
  }
  50% {
    background-position: calc(50% - 2px) calc(50% + 2px);
  }
  75% {
    background-position: calc(50% + 1px) calc(50% + 1px);
  }
  100% {
    background-position: calc(50% - 1px) calc(50% - 1px);
  }
}

@keyframes fog {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes staticFlicker {
  0%,
  90%,
  100% {
    opacity: 0.03;
  }
  95% {
    opacity: 0.15;
  }
}

@keyframes ghostFade {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  20% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
  }
  80% {
    opacity: 0.1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes echoFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

@keyframes flicker {
  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    opacity: 1;
  }
  20%,
  24%,
  55% {
    opacity: 0.3;
  }
}
