/* --- Global Styles --- */
body {
    margin: 0;
    padding: 0;
    background-color: #ffeef2;
    font-family: 'Quicksand', sans-serif;
    color: #ff5e78;
    overflow: hidden; 
}

/* MUSIC OVERLAY */
#music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff5e78;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.overlay-content h1 {
    font-family: 'Indie Flower', cursive;
    font-size: 4rem;
    animation: bounce 2s infinite;
}

/* Scroll Snap Container */
.story-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Common Section Styles */
.story-section {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

/* Alternating Background Colors */
#section1 { background: linear-gradient(to bottom, #fff0f0, #ffe6e6); }
#section2 { background-color: #fff5f5; }
#section3 { background-color: #ffe6e6; }
#section4 { background-color: #fff0f5; }
#ask-section { background-color: #ffeef2; position: relative; }

/* Content Layout */
.content-box {
    display: flex;
    align-items: center;
    gap: 50px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 30px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(255, 94, 120, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.content-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.reverse-layout {
    flex-direction: row-reverse;
}

/* Photo Frames */
.photo-frame img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border: 10px solid white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transform: rotate(-3deg);
    border-radius: 5px;
}

.reverse-layout .photo-frame img {
    transform: rotate(3deg);
}

/* Text Styles */
.text-box {
    max-width: 400px;
    text-align: left;
}

h2 {
    font-family: 'Indie Flower', cursive;
    font-size: 3rem;
    margin-bottom: 10px;
}

p {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #555;
}

/* Ask Section */
.question-wrapper {
    text-align: center;
    z-index: 10;
}

.big-question {
    font-family: 'Indie Flower', cursive;
    font-size: 4rem;
    margin: 20px 0;
}

.ask-gif {
    width: 200px;
    border-radius: 15px;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    position: relative; 
}

button {
    padding: 15px 30px;
    font-size: 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.2s;
    width: auto;           
    min-width: 100px;      
    white-space: nowrap;   
}

#yesBtn {
    background-color: #ff5e78;
    color: white;
    z-index: 10;
}

#yesBtn:hover {
    transform: scale(1.1);
}

#noBtn {
    background-color: white;
    color: #ff5e78;
    position: relative; 
    transition: top 0.3s ease, left 0.3s ease; 
}

/* Success Overlay */
.success-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.success-img {
    width: 300px;
    border-radius: 20px;
    margin: 20px;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: #ff5e78;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Decorations */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.heart {
    position: absolute;
    font-size: 3rem;
    animation: float 4s ease-in-out infinite;
    opacity: 0.5;
}
.h1 { top: 10%; left: 10%; }
.h2 { top: 50%; right: 10%; animation-delay: 1s; }
.h3 { bottom: 10%; left: 20%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

#music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    font-size: 24px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .content-box, .reverse-layout {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
        width: 85%;
    }
    
    .photo-frame img {
        width: 100%;
        height: 250px;
        transform: rotate(0deg);
    }

    .big-question { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .buttons { flex-direction: column; gap: 15px; }
}