/* basic layout and background */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at top left, #ffccd5, #ffb6c1, #ffc1cc, #ffe4e1);
  overflow-x: hidden;
  color: #fff;
  text-align: center;
  position: relative;
  min-height: 100vh;
}

/* subtle animated glow background */
.bg-animation {
  position: fixed;
  width: 100%;
  height: 100%;
  background: repeating-radial-gradient(circle at center, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.08) 2px, transparent 3px, transparent 20px);
  animation: glowMove 12s linear infinite;
  z-index: -1;
}
@keyframes glowMove { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3.2em;
  margin-top: 40px;
  color: #fff8fb;
  text-shadow: 0 0 20px rgba(255,182,193,0.9);
}
h2 {
  font-weight: 400;
  margin-bottom: 10px;
  color: #fff0f5;
}

/* wheel + indicator layout */
.wheel-wrapper {
  margin: 60px auto 20px;
  position: relative;
  width: 320px;
}

.wheel-container {
  position: relative;
  margin: 0 auto;
  width: 300px;
  height: 300px;
}

/* the wheel canvas */
canvas {
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255,182,193,0.9);
  transition: transform 0.2s ease;
  display: block;
  margin: 0 auto;
  transform-origin: 50% 50%;
}

/* bottom indicator: triangle that points UP (placed under the wheel) */
.indicator-bottom {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #ff69b4; /* triangle pointing down */
  filter: drop-shadow(0 0 6px rgba(255,105,180,0.6));
  z-index: 20;
}


/* button under wheel, spaced so it doesn't overlap the counter */
.spin-btn {
  margin-top: 40px;
  background: linear-gradient(45deg, #ff69b4, #ff85b4);
  color: white;
  border: none;
  padding: 15px 44px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.3em;
  transition: all 0.28s ease;
  box-shadow: 0 0 15px rgba(255,105,180,0.7);
}

.spin-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 30px rgba(255,105,180,1);
}

.result {
  margin-top: 25px;
  font-size: 1.5em;
  font-weight: 600;
  color: #fff5f8;
  text-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* falling hearts */
.heart {
  position: fixed;
  top: -10px;
  color: rgba(255,105,180,0.9);
  font-size: 24px;
  animation: fallDown 7s linear infinite;
}
@keyframes fallDown {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* counter */
.counter {
  margin-top: 25px;
  margin-bottom: 50px;
  font-size: 1.15em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.45);
}


/* Target by ID */
#playPauseButton {
  position: fixed;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.3);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 1.5em;
  color: #fff;
  box-shadow: 0 0 10px rgba(255,182,193,0.5);
  transition: transform 0.18s ease;
  z-index: 1000;
}

/* Hover effect */
#playPauseButton:hover {
  background-color: #ff4d94;
  transform: scale(1.05);
}



/* Pulse animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Apply pulse when active */
#playPauseButton.playing {
  animation: pulse 0.8s infinite;
}

#playPauseButton {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  font-size: 1.5em;
  color: #fff;
  box-shadow: 0 0 10px rgba(255,182,193,0.5);
  z-index: 1000;
}

#volumeSlider {
  display: none;               /* hidden initially */
  position: fixed;             /* fixed to viewport */
  top: 80px;                   /* distance below button */
  right: 38px;                 /* same as button’s right edge */
  transform: translateX(50%);  /* move left by half of its width to center */
  -webkit-appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 8px;
  height: 120px;
  accent-color: #ff69b4;
  cursor: pointer;
  z-index: 999;
}

.love-section {
  margin-top: 80px;
  padding: 10px 20px 80px 20px;
  text-align: center;
  background: linear-gradient(to bottom right, #ffe6f0, #fff0f5);
  border-top: 3px solid #ffb6c1;
}

.love-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5em;
  color: #ff6fa5;
  margin-bottom: 30px;
}

.love-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.love-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(255, 182, 193, 0.4);
  width: 250px;
  padding: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.love-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(255, 182, 193, 0.6);
}

.love-card img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 10px;
}

.love-card p {
  font-family: 'Poppins', sans-serif;
  color: #555;
}

.love-letter {
  margin-top: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  border-radius: 25px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(255, 182, 193, 0.4);
}

.love-letter h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 2em;
  color: #ff6fa5;
  margin-bottom: 15px;
}

.love-letter p {
  font-family: 'Poppins', sans-serif;
  color: #333;
  font-size: 1.1em;
  line-height: 1.6;
}

/* === Reasons I Love You Section === */
.reasons {
  padding: 60px 20px 150px 20px;
  background: linear-gradient(180deg, rgba(255,192,203,0.2), rgba(255,182,193,0.1));
  border-top: 2px solid rgba(255,182,193,0.4);
  border-bottom: 2px solid rgba(255,182,193,0.4);
  text-align: center;
  color: #fff8fb;
  box-shadow: 0 0 25px rgba(255,182,193,0.5);
}

.reasons h2 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.8em;
  margin-bottom: 40px;
  color: #fff0f8;
  text-shadow: 0 0 12px rgba(255,105,180,0.8);
}

/* Grid layout for the reasons */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  max-width: 900px;
  margin: 0 auto;
}

/* Each reason card */
.reason {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 20px 15px;
  font-size: 1.1em;
  color: #fff;
  box-shadow: 0 0 15px rgba(255,182,193,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover animation */
.reason:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 30px rgba(255,105,180,0.8);
  background: rgba(255,255,255,0.25);
}

/* Subtle entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

.reason {
  animation: fadeUp 0.6s ease forwards;
}
.reason:nth-child(odd) { animation-delay: 0.1s; }
.reason:nth-child(even) { animation-delay: 0.2s; }

/* Center the last reason */
.reasons-grid .reason:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: 70%;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 40px rgba(255,105,180,0.7);
  font-size: 1.2em;
  font-weight: 600;
  transform: scale(1.05);
}

.back-link-container {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%); z-index: 1000;
}
.back-link {
    display: inline-block; padding: 12px 25px;
    background: linear-gradient(135deg, #fcb6c7, #f88da6);
    color: white; text-decoration: none; font-weight: bold;
    font-family: 'Segoe UI', sans-serif; border-radius: 50px;
    transition: transform 0.2s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.back-link:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #f88da6, #fcb6c7);
}
