* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(#0b1d2a, #1e3c72);
  color: white;
  height: 100vh;
  overflow-x: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 100px;
}

h1 {
  font-size: 3rem;
  animation: fadeIn 2s ease-in-out;
}

.subtitle {
  margin-top: 10px;
  font-size: 1.2rem;
  opacity: 0.8;
}

.card {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 20px;
  margin: 40px auto;
  width: 80%;
  max-width: 500px;
  animation: float 4s ease-in-out infinite;
}

/* Gift styles */
.gift-container {
  margin-top: 40px;
  text-align: center;
}

.gift {
  font-size: 5rem;
  cursor: pointer;
  animation: bounce 2s infinite;
  transition: transform 0.5s ease;
}

.gift.opened {
  transform: scale(1.3) rotate(20deg);
  animation: none;
}

.gift-text {
  margin-top: 10px;
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Shake animation */
.gift:active {
  animation: shake 0.3s;
}

/* Photo gallery */
.gallery {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
  flex-wrap: wrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

.gallery img {
  width: 220px;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery img:hover {
  transform: scale(1.08) rotate(1deg);
  box-shadow: 0 20px 40px rgba(255,255,255,0.3);
}

/* Long love message */
.love-message {
  max-width: 600px;
  margin: 30px auto;
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 1s ease;
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

/* Corner dancing images */
.corner-dance {
  position: fixed;
  width: 120px;
  height: 120px;
  object-fit: cover;
  top: 20px;
  opacity: 0; /* hidden initially */
  pointer-events: none;
  transform-origin: center center;
  z-index: 3;
}

/* Left and right positions */
#cornerLeft { left: 20px; }
#cornerRight { right: 20px; }

/* Dancing animation */
@keyframes dance {
  0% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
  100% { transform: rotate(-15deg); }
}

.dance-active {
  opacity: 1;
  animation: dance 1s infinite ease-in-out;
}
