body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e27 0%, #1a0a2e 50%, #16213e 100%);
  perspective: 1000px;
}

canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 80px rgba(255, 77, 109, 0.5)) drop-shadow(0 0 40px rgba(255, 0, 110, 0.3));
  z-index: 5;
}

.box {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: heartBeat 1.3s infinite;
}

@keyframes heartBeat {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  30% {
    transform: translate(-50%, -50%) scale(0.8);
  }

  60% {
    transform: translate(-50%, -50%) scale(1.2);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  transition: opacity 1s;
}

#startBtn {
  padding: 15px 30px;
  font-size: 1.2rem;
  color: white;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff006e 100%);
  border: 2px solid #ff4d6d;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Dancing Script', cursive;
  box-shadow: 0 0 20px #ff4d6d, inset 0 0 10px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 1px;
}

#startBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #ff4d6d, 0 0 50px rgba(255, 77, 109, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

#startBtn:active {
  transform: scale(0.98);
}

.content {
  position: absolute;
  bottom: 10%;
  width: 100%;
  text-align: center;
  pointer-events: none;
}

.message {
  font-family: 'Dancing Script', cursive;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff006e 50%, #c42e5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.5rem;
  text-shadow: 0 0 20px rgba(255, 77, 109, 0.6);
  opacity: 0;
  animation: fadeInUp 3s forwards 1.5s, pulse-glow 2s ease-in-out 1.5s infinite;
  letter-spacing: 2px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 77, 109, 0.5));
  }

  50% {
    filter: drop-shadow(0 0 25px rgba(255, 77, 109, 0.8));
  }
}

/* 3D Carousel Styles */
.carousel-container {
  position: fixed;
  top: 50%;
  width: 300px;
  height: 400px;
  perspective: 1200px;
  opacity: 0;
  transition: opacity 1s;
  z-index: 20;
}

.carousel-container.active {
  opacity: 1;
  pointer-events: auto;
}

/* Left Carousel */
.carousel-container.left-carousel {
  left: 5%;
  transform: translateY(-50%);
}

/* Right Carousel */
.carousel-container.right-carousel {
  right: 5%;
  transform: translateY(-50%);
}

.carousel {
  position: relative;
  width: 300px;
  height: 300px;
  transform-style: preserve-3d;
  animation: rotate 25s infinite linear;
  top: 50%;
  left: 50%;
  margin-left: -150px;
  margin-top: -150px;
}

@keyframes rotate {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

.carousel-item {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  margin-left: -50px;
  margin-top: -50px;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--index) * 40deg)) translateZ(180px);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #ff4d6d;
  box-shadow: 0 0 25px rgba(255, 77, 109, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.carousel-item:hover img {
  transform: scale(1.15) rotateZ(5deg);
  box-shadow: 0 0 40px rgba(255, 77, 109, 1), 0 0 60px rgba(255, 0, 110, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  border-color: #ff006e;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
  padding: 30px;
  border-radius: 20px;
  border: 2px solid #ff4d6d;
  max-width: 85%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(255, 77, 109, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 15px;
  display: block;
  margin: 0 auto 20px;
  border: 3px solid #ff4d6d;
}

#modalMessage {
  font-family: 'Dancing Script', cursive;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff006e 50%, #c42e5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  text-align: center;
  margin: 0;
  text-shadow: 0 0 20px rgba(255, 77, 109, 0.6);
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #ff4d6d;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close:hover,
.close:focus {
  color: #ff006e;
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .carousel {
    width: 250px;
    height: 250px;
  }

  .carousel-item {
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
    transform: rotateY(calc(var(--index) * 40deg)) translateZ(140px);
  }

  .message {
    font-size: 1.6rem;
  }

  .modal-content {
    max-width: 95%;
    padding: 20px;
  }

  .carousel-container.left-carousel {
    left: 2%;
  }

  .carousel-container.right-carousel {
    right: 2%;
  }
}