body {
    margin: 0;
    padding: 0;
    height: 100dvh; /* Changed to dynamic viewport height for perfect mobile centering */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Georgia', serif;
    /* Animated Background */
    background: linear-gradient(45deg, #ff758c, #ff7eb3, #ff9a9e, #fbc2eb);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
    text-align: center;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    padding: 20px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0; /* Removes the hidden extra space at the very top */
    margin-bottom: 10px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

.from-text {
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-style: italic;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    height: 100px; 
}

button {
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#yesBtn {
    background-color: #ff3366;
    color: white;
}

#yesBtn:hover {
    transform: scale(1.1);
}

#noBtn {
    background-color: #ffffff;
    color: #ff758c;
    position: relative;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.sub-text {
    font-size: 0.8rem;
    margin-top: 50px;
    opacity: 0.7;
}

/* --- NEW SLIDESHOW STYLES --- */
.slider-container {
    width: 250px;
    height: 250px; /* Forces the 1:1 Square */
    margin: 20px auto 0;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    overflow: hidden; /* Keeps the images inside the rounded corners */
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the box perfectly without stretching */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* The smooth fade transition */
}

.slide-img.visible {
    opacity: 1;
}

/* --- NEW FLOATING HEARTS STYLES --- */
.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Ensures you can still click the buttons through the hearts! */
    overflow: hidden;
    z-index: 0; /* Keeps hearts safely in the background */
}

.heart {
    position: absolute;
    bottom: -50px; /* Starts just below the screen */
    color: rgba(255, 255, 255, 0.4); /* Soft semi-transparent white */
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg) scale(0.5); /* Floats up and shrinks slightly */
        opacity: 0;
    }
}

/* --- NEW LOVE LETTER STYLES --- */
.love-letter {
    margin-top: 30px;
    text-align: center;
    position: relative;
    height: 60px; /* Adjusted height since background is gone */
}

.love-letter h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: none;
    margin-top: 0;
}

.text-slider {
    position: relative;
    height: 60px; /* Space for the changing text */
    width: 100%;
}

.slide-text-item {
    font-size: 1.3rem;
    line-height: 1.4;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
}

.slide-text-item.visible {
    opacity: 1;
}

.final-line {
    text-align: center;
    color: #ff3366;
    font-size: 3.5rem;
    font-weight: bold;
    opacity: 0; /* Hidden initially */
    transition: opacity 2.5s ease-in-out;
    position: absolute;
    bottom: 0;
    width: 100%; 
    left: 0;
}

.final-line.visible {
    opacity: 1;
}