body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f8ff;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  overflow: hidden;
}

.container {
  padding: 2rem;
  max-width: 500px;
}

h1 {
  font-size: 6rem;
  color: #ff6b6b;
}
h2 {
  font-size: 2rem;
  margin: 1rem 0;
}
p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

a {
  display: inline-block;
  text-decoration: none;
  background: #ff6b6b;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  transition: background 0.3s;
}
a:hover {
  background: #ff4757;
}

.animation {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 15px #4b0082); /* dark purple glow around chest */
}

.chest-svg {
  width: 100px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Pages */
.page-svg {
  width: 30px;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  animation: dropPage 2s infinite ease-in-out;
}
.page1 {
  animation-delay: 0s;
}
.page2 {
  animation-delay: 0.5s;
}
.page3 {
  animation-delay: 1s;
}

@keyframes dropPage {
  0% {
    transform: translate(-50%, -60px) rotate(0deg);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  50% {
    transform: translate(-50%, 20px) rotate(10deg);
  }
  75% {
    transform: translate(-50%, 40px) rotate(-10deg);
  }
  100% {
    transform: translate(-50%, 60px) rotate(0deg);
    opacity: 0;
  }
}

/* Chest lid */
.lid {
  transform-origin: 50% 30%;
  animation: lidBounce 3s infinite ease-in-out;
}
@keyframes lidBounce {
  0%,
  20%,
  50%,
  70%,
  100% {
    transform: rotateX(0deg);
  }
  35% {
    transform: rotateX(-60deg);
  }
  85% {
    transform: rotateX(-45deg);
  }
}

/* Eyes */
@keyframes eyePulseSync {
  0%,
  20%,
  50%,
  70%,
  100% {
    fill: #ff00ff;
    filter: blur(3px);
  }
  35% {
    fill: #ff99ff;
    filter: blur(8px);
  }
  85% {
    fill: #ff66ff;
    filter: blur(6px);
  }
}
@keyframes pupilFlicker {
  0%,
  100% {
    fill: #550033;
  }
  25% {
    fill: #770044;
  }
  50% {
    fill: #550033;
  }
  75% {
    fill: #990066;
  }
}
.chest-svg circle:nth-of-type(1),
.chest-svg circle:nth-of-type(2) {
  animation: eyePulseSync 3s infinite ease-in-out;
}
.chest-svg circle:nth-of-type(3),
.chest-svg circle:nth-of-type(4) {
  animation: pupilFlicker 3s infinite ease-in-out;
}
