:root {
    --bg-gradient: linear-gradient(180deg, #fce8f4, #e8ebf7, #dcedf7, #f4e8fce0);
    --text-color: #5a5a66;
    --accent-glow: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --placeholder-bg: rgba(255, 255, 255, 0.5);
    --placeholder-border: rgba(255, 182, 193, 0.5);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background: var(--bg-gradient);
    background-size: 100% 400%;
    animation: gradientShift 20s ease infinite alternate;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.8;
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}

/* Ambient Background Elements */
#heart-container, #ambient-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Soft blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: floatBlob 15s ease-in-out infinite alternate;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}

/* Hearts */
.heart {
    position: absolute;
    bottom: -10vh;
    opacity: 0.6;
    animation: floatUp linear forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-120vh) scale(1.5) rotate(20deg); opacity: 0; }
}

/* Base structural */
section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    padding: 2rem 5%;
}

.fullscreen.center-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Typography */
h1 {
    font-weight: 500;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #8c7e97;
}

p {
    font-size: 1.4rem;
    font-weight: 300;
    color: #6a6a7a;
}

.subtext {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Glow Effect */
.glow-text {
    text-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow);
}

/* Layouts */
.split-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5%;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.content-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease-out;
}

.bg-image-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.full-width-msg {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80vh;
    padding: 0;
    overflow: hidden;
}

.full-width-msg .glass-overlay {
    position: relative;
    z-index: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 4rem;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    margin: 4rem 10%;
}

/* Scroll Animations */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    font-size: 0.9rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.fade-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.initial-fade {
    animation: slowFadeIn 2.5s ease-out forwards;
}

@keyframes slowFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Sequence Animations for Final Section */
.sequence-text {
    width: 100%;
}

.sequence-text p {
    transition: opacity 1.5s ease, transform 1.5s ease;
    margin-bottom: 2rem;
}

.hidden-step {
    opacity: 0 !important;
    transform: translateY(20px);
}

.closing-text {
    font-size: 1.8rem;
    color: #9b84a9;
    font-weight: 500;
    margin-top: 4rem;
}

/* Buttons */
.small-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    padding: 8px 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 20px;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.small-btn:hover {
    background: rgba(255,255,255,0.5);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    section {
        padding: 3rem 1.5rem;
        min-height: auto;
        height: auto;
    }

    .fullscreen {
        min-height: 100vh;
    }

    .split-layout, .split-layout.reverse {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .image-wrapper {
        width: 100%;
        order: -1; /* Always put image above text on mobile */
    }

    .content-image {
        max-width: 280px;
        margin: 0 auto;
    }

    h1 { 
        font-size: 1.8rem; 
        line-height: 1.3;
    }

    p { 
        font-size: 1.1rem; 
        line-height: 1.6;
    }

    .subtext {
        font-size: 1rem;
    }

    .full-width-msg .glass-overlay {
        padding: 2.5rem 1.5rem;
        margin: 2rem 5%;
        width: 90%;
    }

    .closing-text {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .small-btn {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    p { font-size: 1rem; }
    .content-image { max-width: 220px; }
}
