:root {
    --primary-color: #ff477e; /* Bright, cute bubblegum pink */
    --secondary-color: #ff7096; /* Soft pastel pink */
    --accent-color: #ff0a54; /* Deep vibrant pink for emphasis */
    --bg-gradient: linear-gradient(135deg, #ffc2d1 0%, #ffb3c6 40%, #ff8fa3 100%); /* Cotton candy pink gradient */
    --text-color: #a01a58; /* Deep berry pink for readable text */
    --card-bg: rgba(255, 245, 248, 0.85); /* Very soft pink-tinted white */
    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Poppins', sans-serif;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Floating Hearts Background */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.heart {
    position: absolute;
    color: #fff;
    opacity: 0.6;
    animation: floatUp linear infinite;
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    will-change: transform; /* Performance optimization */
}

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

/* Container & Sections */
.container {
    width: 100%;
    max-width: 900px; /* Increased from 800px */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.view-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    pointer-events: none;
    transform: scale(0.95);
}

.view-section.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    transform: scale(1);
}

.view-section.hidden {
    display: none;
}

/* Slideshow Styling */
.title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(255, 10, 84, 0.4), 0 0 20px rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(255, 10, 84, 0.15), 
                inset 0 0 0 4px rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 750px; /* Increased from 650px */
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #fff;
    max-height: 90vh; /* Keep it from overflowing the screen */
}

.image-container {
    width: 100%;
    height: 400px; /* Increased from 350px */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff0f3 0%, #ffccd5 100%);
    box-shadow: inset 0 0 20px rgba(255, 71, 126, 0.2),
                0 10px 20px rgba(0,0,0,0.05);
    border: 3px solid #fff;
    flex-shrink: 0; /* Prevents image from squishing too much */
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease;
    border-radius: 15px;
}

.text-container {
    width: 100%;
    text-align: center;
    padding: 25px 20px 10px; /* More padding */
    min-height: 160px; /* Increased from 120px */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto; /* Allow scrolling if text gets really long */
}

.caption {
    font-size: 2.2rem; /* Slightly larger */
    color: var(--accent-color);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
    margin-bottom: 12px;
}

.description {
    font-size: 1.2rem; /* Slightly larger */
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 500;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 750px; /* Matched card width */
    margin-top: 25px;
}

.nav-btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 700;
    border: 3px solid #fff;
    border-radius: 50px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff7096 0%, #ff477e 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 71, 126, 0.3),
                inset 0 2px 5px rgba(255,255,255,0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(255, 71, 126, 0.5),
                inset 0 2px 5px rgba(255,255,255,0.5);
    background: linear-gradient(135deg, #ff477e 0%, #ff0a54 100%);
}

.nav-btn:disabled {
    background: #ffccd5;
    color: #fff;
    border-color: #ffe5ec;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Lock Screen Section */
.password-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

#password-input {
    padding: 15px 25px;
    font-size: 1.3rem;
    font-family: var(--font-body);
    border: 3px solid #ffb3c6;
    border-radius: 30px;
    outline: none;
    text-align: center;
    width: 100%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

#password-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 71, 126, 0.3), inset 0 2px 5px rgba(0,0,0,0.05);
}

.error-text {
    color: #d90429;
    margin-top: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.error-text.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Music Toggle Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 3px solid #ffb3c6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-btn:hover {
    transform: scale(1.15);
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 71, 126, 0.4);
}

.music-btn.hidden {
    display: none;
}

/* Proposal Section */
.proposal-content {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px 40px;
    border-radius: 40px;
    box-shadow: 0 25px 50px rgba(255, 10, 84, 0.2), 
                inset 0 0 0 5px rgba(255, 255, 255, 0.9);
    max-width: 600px;
    width: 100%;
    border: 3px solid #fff;
}

.proposal-content h2 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #fff;
}

.proposal-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
    color: var(--text-color);
}

.big-question {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--accent-color);
    margin: 30px 0 40px 0;
    animation: heartbeat 1.5s infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9),
                 2px 2px 0px #fff;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.1); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
    height: 70px;
}

.btn {
    padding: 15px 45px;
    font-size: 1.5rem;
    font-family: var(--font-body);
    font-weight: 800;
    border: 3px solid #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.yes {
    background: linear-gradient(135deg, #ff0a54 0%, #ff477e 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(255, 10, 84, 0.4),
                inset 0 4px 10px rgba(255,255,255,0.4);
    z-index: 10;
}

.yes:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(255, 10, 84, 0.6),
                inset 0 4px 10px rgba(255,255,255,0.4);
}

.no {
    background: #fff0f3;
    color: #ff8fa3;
    position: absolute;
    right: 15%;
    border-color: #ffccd5;
}

/* Celebration Overlay */
#celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #ff7096 0%, #ff0a54 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease;
}

#celebration.hidden {
    display: none;
}

#celebration.show {
    opacity: 1;
}

#celebration h1 {
    font-family: var(--font-heading);
    font-size: 6rem;
    margin-bottom: 20px;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: heartbeat 1.5s infinite;
}

#celebration p {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .image-container {
        height: 320px;
    }
    .title {
        font-size: 3rem;
    }
    .big-question {
        font-size: 3.5rem;
    }
    .proposal-content {
        padding: 40px 20px;
    }
    .proposal-content h2 {
        font-size: 3.5rem;
    }
    .nav-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}