* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5e6 100%);
    color: #d63384;
    overflow-x: hidden;
    position: relative;
    font-weight: 500;
}

/* Animated Background Hearts */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 3rem;
    opacity: 0.6;
    animation: float 8s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50px) rotate(10deg);
        opacity: 0.8;
    }
}

/* Page Styling */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 2rem;
    scroll-snap-align: start;
    /* scroll-snap-stop: always;  <-- Removed to prevent getting stuck */
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity; /* <-- Changed from mandatory to proximity */
}

.page-1 {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 218, 185, 0.3) 100%);
}

.page-2 {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.3) 0%, rgba(255, 240, 245, 0.3) 100%);
}

.page-3 {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.2) 0%, rgba(255, 182, 193, 0.2) 100%);
}

.page-4 {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 240, 245, 0.3) 100%);
    min-height: auto;
    padding: 4rem 2rem;
    align-items: flex-start;
    justify-content: flex-start;
    display: block;
}

.content {
    text-align: center;
    z-index: 20;
    max-width: 600px;
}

/* Typography */
h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: #d63384;
    text-shadow: 2px 2px 4px rgba(255, 192, 203, 0.5);
    font-weight: normal;
}

p {
    font-size: 1.3rem;
    margin: 1rem 0;
    color: #d63384;
    line-height: 1.8;
}

.hearts-top {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.message {
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 2px solid #ffb6c1;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.scroll-hint {
    margin-top: 3rem;
    animation: pulse 2s infinite;
    font-size: 1.2rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* Buttons */
.button-container {
    margin: 3rem 0;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 80px;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
}

.btn-yes {
    background: linear-gradient(135deg, #ff69b4 0%, #d63384 100%);
    color: white;
    padding: 1.5rem 4rem;
    font-size: 1.5rem;
}

.btn-yes:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.5);
}

.btn-yes:active {
    transform: scale(0.95);
}

.btn-no {
    background: rgba(255, 192, 203, 0.8);
    color: #d63384;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    position: relative;
}

.btn-no:hover {
    background: rgba(255, 192, 203, 0.6);
}

.fun-text {
    margin-top: 2rem;
    font-size: 1rem;
    font-style: italic;
    color: #d63384;
    min-height: 2rem;
}

/* Celebration Content */
.celebration-content {
    animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.confetti-text {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.celebration-message {
    font-size: 1.5rem;
    margin: 1.5rem 0;
    animation: fadeIn 1s ease-out;
}

.celebration-message:nth-child(2) {
    animation-delay: 0.3s;
}

.celebration-message:nth-child(3) {
    animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none; /* Disable snapping on mobile */
    }

    .page {
        min-height: 100dvh; /* Use dynamic viewport height for mobile */
        scroll-snap-align: none; /* Remove snap alignment */
    }

    h1 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.1rem;
    }

    .btn-yes {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
    }

    .button-container {
        gap: 1rem;
    }

    .hearts-top {
        font-size: 2rem;
    }

    .heart {
        font-size: 2rem;
    }
}

/* Image Gallery Styles */
.gallery-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 20;
}

.gallery-title {
    font-family: 'Pacifico', cursive;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.image-grid {
    column-count: 3;
    column-gap: 1.5rem;
    animation: fadeIn 1s ease-out;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.2);
    cursor: pointer;
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item:hover img {
    transform: scale(1.15) rotate(2deg);
}

.gallery-item::after {
    content: '❤️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 3rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 1024px) {
    .image-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .image-grid {
        column-count: 1;
        gap: 1rem;
    }

    .gallery-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
}
