:root {
    --primary-rose: #e6396e;
    --light-rose: #ff85a2;
    --soft-pink: #fdf2f4;
    --accent-pink: #ffe5ec;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(255, 255, 255, 0.7);
    --text-primary: #3d2329;
    --text-muted: #6b4c53;
    --font-sans: 'Poppins', sans-serif;
    --font-script: 'Caveat', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #fff0f3 0%, #ffd6e0 50%, #ffc2d1 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Background Animated Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    bottom: -30px;
    font-size: 1.2rem;
    color: var(--light-rose);
    opacity: 0.6;
    animation: driftUp 7s linear forwards;
}

@keyframes driftUp {
    0% {
        transform: translateY(0) scale(0.7);
        opacity: 0;
    }
    20% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) scale(1.1);
        opacity: 0;
    }
}

/* Music Control Button */
.music-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: 0 4px 15px rgba(230, 57, 110, 0.15);
    font-size: 1.2rem;
    color: var(--primary-rose);
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(230, 57, 110, 0.25);
}

/* Main Container and Stages */
.main-wrapper {
    width: 100%;
    max-width: 620px;
    padding: 24px 16px;
    position: relative;
    z-index: 10;
}

.stage {
    display: none;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stage.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 36px 28px;
    box-shadow: 0 16px 40px rgba(230, 57, 110, 0.12);
}

.text-center {
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-pink);
    color: var(--primary-rose);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

h1 {
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--primary-rose);
    margin-bottom: 8px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-rose);
    margin-bottom: 6px;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Modern Action Buttons */
.action-btn {
    background: var(--primary-rose);
    color: #ffffff;
    border: none;
    padding: 13px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(230, 57, 110, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 57, 110, 0.4);
}

.hidden {
    display: none !important;
}

/* Stage 2: Balloons */
.balloons-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.balloon-item {
    background: none;
    border: none;
    font-size: 3.2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: gentleFloat 2.4s ease-in-out infinite alternate;
}

.balloon-item:nth-child(2) {
    animation-delay: 0.6s;
}

.balloon-item:nth-child(3) {
    animation-delay: 1.2s;
}

.balloon-item:hover {
    transform: scale(1.15);
}

.balloon-item.popped {
    visibility: hidden;
    pointer-events: none;
}

@keyframes gentleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

.message-box {
    min-height: 48px;
    margin: 15px 0 20px 0;
}

#balloon-message {
    font-family: var(--font-script);
    font-size: 1.45rem;
    color: var(--primary-rose);
    font-weight: 600;
}

/* Stage 3: Bouquet and Reasons */
.bouquet-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 15px 0;
}

.flower-item {
    background: #ffffff;
    border: 1px solid rgba(230, 57, 110, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, background 0.2s ease;
}

.flower-item:hover {
    transform: translateY(-4px);
    background: var(--accent-pink);
}

.reason-box {
    background: var(--soft-pink);
    border: 1px dashed rgba(230, 57, 110, 0.3);
    border-radius: 14px;
    padding: 18px;
    margin: 20px 0;
    min-height: 80px;
}

#reason-title {
    font-size: 1.05rem;
    color: var(--primary-rose);
    margin-bottom: 4px;
}

#reason-body {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Stage 4: Polaroid Gallery */
.polaroid-gallery {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0 28px 0;
}

.polaroid-card {
    background: #ffffff;
    padding: 10px 10px 14px 10px;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    width: 160px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease, z-index 0.3s ease;
}

.polaroid-card:nth-child(2) {
    transform: rotate(2deg);
}

.polaroid-card:nth-child(3) {
    transform: rotate(-1.5deg);
}

.polaroid-card:hover {
    transform: scale(1.06) rotate(0deg);
    z-index: 5;
}

.polaroid-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.polaroid-caption {
    font-family: var(--font-script);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-top: 8px;
    line-height: 1.2;
}

/* Stage 5: Envelope and Letter */
.envelope-container {
    margin: 20px auto 26px auto;
    cursor: pointer;
    max-width: 440px;
}

.envelope {
    background: #ffaec0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(230, 57, 110, 0.15);
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: translateY(-3px);
}

.letter-sheet {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.letter-date {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 10px;
}

.letter-sheet h3 {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--primary-rose);
    margin-bottom: 12px;
}

.letter-sheet p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.letter-sign {
    font-family: var(--font-script);
    font-size: 1.35rem;
    color: var(--primary-rose);
    text-align: right;
    margin-top: 16px;
}

/* Stage 6: Cake and Confetti */
.cake-wrapper {
    margin: 20px 0;
    cursor: pointer;
}

.cake-display {
    font-size: 5rem;
    transition: transform 0.2s ease;
}

.cake-display:hover {
    transform: scale(1.12);
}

.celebration-box {
    margin-top: 24px;
    animation: fadeIn 0.8s ease forwards;
}

.wishing-title {
    font-family: var(--font-script);
    font-size: 2.6rem;
    color: var(--primary-rose);
    margin-bottom: 8px;
}

.wishing-text {
    font-size: 1rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .glass-card {
        padding: 28px 18px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .polaroid-gallery {
        gap: 12px;
    }

    .polaroid-card {
        width: 130px;
    }

    .polaroid-card img {
        height: 110px;
    }
}