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

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

@keyframes slowPan {
    0% { transform: scale(1.1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-5%, -5%); }
}

body {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: #F0E6F7; /* Light lavender */
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #05000A; /* Very deep, almost black purple */
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #05000A 0%, #0F0018 100%); /* Even deeper purple gradient */
}

.background-image {
    width: 110%; /* Slightly larger to allow panning */
    height: 110%;
    object-fit: cover;
    position: absolute;
    top: -5%;
    left: -5%;
    filter: brightness(0.5) opacity(0.8); /* Dim and blend further */
    animation: slowPan 60s ease-in-out infinite alternate;
}

.header {
    text-align: center;
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.4); /* Slightly more opaque for contrast */
    position: relative;
    z-index: 10;
    font-family: 'Dancing Script', cursive;
    color: #FFDAB9; /* Peachpuff for a warm contrast */
    text-shadow: 0 0 15px rgba(255, 218, 185, 0.7);
    animation: fadeIn 1s ease-out;
}

.header h1 {
    font-size: 3em;
    margin: 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.section {
    min-height: 80vh; /* Make sections visually distinct and encourage scrolling */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 80px;
    background: rgba(10, 0, 20, 0.7); /* Darker, more opaque background for content */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    opacity: 0; /* Hidden by default, revealed by JS */
    transform: translateY(50px);
}

.section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent; /* Hero section will use the main background */
    box-shadow: none;
    backdrop-filter: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.hero-title {
    font-family: 'Dancing Script', cursive;
    font-size: 5em;
    color: #FFDAB9;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 218, 185, 0.8);
    opacity: 0; /* Animated by JS */
}

.hero-text {
    font-size: 2em;
    margin: 10px 0;
    color: #F0E6F7;
    text-shadow: 0 0 10px rgba(240, 230, 247, 0.5);
    opacity: 0; /* Animated by JS */
}

.heart-pulse {
    width: 50px;
    height: 50px;
    background-color: #FF69B4; /* Hot pink */
    position: relative;
    transform: rotate(-45deg);
    margin-top: 50px;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.7);
    animation: pulse 1.5s infinite ease-in-out;
    opacity: 0; /* Animated by JS */
}

.heart-pulse::before,
.heart-pulse::after {
    content: '';
    width: 50px;
    height: 50px;
    background-color: #FF69B4;
    border-radius: 50%;
    position: absolute;
    box-shadow: inherit;
}

.heart-pulse::before {
    top: -25px;
    left: 0;
}

.heart-pulse::after {
    top: 0;
    left: 25px;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5em;
    color: #FFDAB9;
    margin-bottom: 40px;
    text-shadow: 0 0 15px rgba(255, 218, 185, 0.7);
}

.section p {
    font-size: 1.5em;
    margin-bottom: 25px;
    max-width: 700px;
}

/* New class for elements that are intended to be animated and start hidden */
.animate-hidden {
    opacity: 0;
    transform: translateY(20px);
    display: inline-block; /* Crucial for transform to work on spans/inline elements */
    transition: none; /* Prevent CSS transitions from interfering with JS animation */
}

.highlight {
    color: #DA70D6; /* Orchid */
    font-weight: bold;
    text-shadow: 0 0 10px rgba(218, 112, 214, 0.7);
}

.affectionate-term {
    font-family: 'Dancing Script', cursive;
    color: #FFC0CB; /* Pink */
    font-size: 1.1em;
    text-shadow: 0 0 8px rgba(255, 192, 203, 0.7);
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2em;
    margin-top: 50px;
    color: #FFDAB9;
    text-shadow: 0 0 15px rgba(255, 218, 185, 0.7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
    }
    .hero-title {
        font-size: 3.5em;
    }
    .hero-text {
        font-size: 1.4em;
    }
    .section-title {
        font-size: 2.5em;
    }
    .section p {
        font-size: 1.2em;
    }
    .signature {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2em;
    }
    .hero-title {
        font-size: 2.8em;
    }
    .hero-text {
        font-size: 1.1em;
    }
    .section {
        padding: 40px 15px;
        margin-bottom: 40px;
    }
    .section-title {
        font-size: 2em;
    }
    .section p {
        font-size: 1em;
    }
    .heart-pulse {
        width: 40px;
        height: 40px;
    }
    .heart-pulse::before,
    .heart-pulse::after {
        width: 40px;
        height: 40px;
    }
    .heart-pulse::before {
        top: -20px;
    }
    .heart-pulse::after {
        left: 20px;
    }
}