/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --lavender-deep: #2a1b3d;
    --lavender-dark: #3d2c5e;
    --lavender-mid: #6b4c9a;
    --lavender-light: #b48edd;
    --lavender-glow: #d4b4f4;
    --rose: #e8829a;
    --rose-light: #f4adc0;
    --rose-bright: #ff7eb3;
    --mint: #7ecfb3;
    --mint-light: #a8e6cf;
    --gold: #d4a843;
    --gold-light: #f0d68a;
    --gold-bright: #ffd700;
    --white: #ffffff;
    --white-soft: rgba(255,255,255,0.9);
    --glass: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.18);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--lavender-deep);
    color: var(--white);
    overflow-x: hidden;
}

/* ===== GLOBAL ELEMENTS ===== */
#balloon-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; overflow: hidden; }
#confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }
#sparkle-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 998; }

.section { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 60px 20px; }
.section-content { max-width: 900px; width: 100%; margin: 0 auto; text-align: center; position: relative; z-index: 2; }

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--rose-light), var(--gold-light), var(--lavender-glow));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.heading-accent { font-size: 0.8em; }

@keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--lavender-deep) 0%, #3a2052 40%, #2d3a4f 70%, var(--lavender-deep) 100%);
    flex-direction: column; overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('images/background.png') center/cover no-repeat;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--lavender-deep) 75%);
}

.hero-content { position: relative; z-index: 2; text-align: center; animation: fadeInUp 1.2s ease-out; }

.hero-badge {
    display: inline-block; padding: 10px 30px; border-radius: 50px;
    background: rgba(180, 142, 221, 0.15);
    border: 1px solid rgba(180, 142, 221, 0.3);
    backdrop-filter: blur(10px);
    font-size: 1rem; letter-spacing: 2px; margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title { font-family: 'Great Vibes', cursive; margin-bottom: 24px; }

.hero-title .line1 {
    display: block; font-size: clamp(2.5rem, 7vw, 5rem);
    background: linear-gradient(135deg, var(--rose-light), var(--gold-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-title .line2 {
    display: block; font-size: clamp(4rem, 12vw, 9rem);
    background: linear-gradient(135deg, var(--white), var(--lavender-glow));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--white-soft);
    margin-bottom: 40px; font-weight: 300; letter-spacing: 1px;
}

.cta-button {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 16px 40px;
    border: 2px solid var(--rose);
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(232,130,154,0.15), rgba(180,142,221,0.1));
    color: var(--rose-light);
    font-family: 'Playfair Display', serif; font-size: 1.2rem;
    cursor: pointer; transition: all 0.4s ease;
    backdrop-filter: blur(10px); position: relative; overflow: hidden;
}

.cta-button::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--rose), var(--lavender-light));
    opacity: 0; transition: opacity 0.4s ease;
}

.cta-button:hover { transform: scale(1.08); box-shadow: 0 0 40px rgba(232,130,154,0.3); }
.cta-button:hover::before { opacity: 0.15; }
.cta-button:active { transform: scale(0.95); }

.btn-icon { font-size: 1.4rem; position: relative; z-index: 1; }
.btn-text { position: relative; z-index: 1; }

.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.5); font-size: 0.85rem; letter-spacing: 2px;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 20px; height: 20px;
    border-right: 2px solid rgba(255,255,255,0.5);
    border-bottom: 2px solid rgba(255,255,255,0.5);
    transform: rotate(45deg);
}

/* ===== MESSAGE SECTION ===== */
.message-section {
    background: linear-gradient(180deg, var(--lavender-deep), #231636, var(--lavender-deep));
}

.message-bg-pattern {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(212,180,244,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.message-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.message-card {
    padding: 36px 28px; border-radius: 20px;
    background: rgba(180,142,221,0.06);
    border: 1px solid rgba(180,142,221,0.2);
    backdrop-filter: blur(20px);
    transition: all 0.4s ease; cursor: pointer;
    position: relative; overflow: hidden;
}

.message-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s ease;
}

.message-card:hover::before { left: 100%; }

.message-card:hover {
    transform: translateY(-8px);
    border-color: var(--rose);
    box-shadow: 0 16px 40px rgba(232,130,154,0.15);
}

.message-card.clicked {
    animation: cardPop 0.5s ease;
    border-color: var(--rose-bright);
    box-shadow: 0 0 50px rgba(232,130,154,0.3);
}

.msg-emoji { font-size: 3rem; margin-bottom: 16px; }

.message-card h3 {
    font-family: 'Playfair Display', serif; font-size: 1.3rem;
    margin-bottom: 12px; color: var(--rose-light);
}

.message-card p { font-size: 0.95rem; line-height: 1.7; color: rgba(255,255,255,0.75); font-weight: 300; }

/* ===== SCRIPTURE SECTION ===== */
.scripture-section {
    background: linear-gradient(180deg, var(--lavender-deep), #1c1230, var(--lavender-deep));
}

.scripture-showcase { margin-bottom: 40px; perspective: 1000px; cursor: pointer; }

.scripture-frame {
    position: relative; display: inline-block; border-radius: 16px; overflow: hidden;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 60px rgba(180,142,221,0.15);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.scripture-frame:hover {
    transform: scale(1.04) rotateX(2deg);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 100px rgba(180,142,221,0.25);
}

.scripture-glow {
    position: absolute; inset: -3px;
    background: linear-gradient(135deg, var(--lavender-glow), var(--rose), var(--mint), var(--gold));
    border-radius: 20px; z-index: -1;
    animation: borderGlow 5s linear infinite; background-size: 300% 300%;
}

.scripture-image { width: 100%; display: block; border-radius: 16px; }

.scripture-shine {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    background-size: 200% 200%; animation: shine 4s ease-in-out infinite;
    pointer-events: none; border-radius: 16px;
}

.click-hint {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    padding: 6px 20px; border-radius: 20px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
    font-size: 0.85rem; color: var(--rose-light);
    animation: pulse 2s ease-in-out infinite; pointer-events: none;
}

.scripture-text-block {
    max-width: 700px; margin: 0 auto;
    padding: 44px 40px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(232,130,154,0.08), var(--glass));
    border: 2px solid rgba(232,130,154,0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(180,142,221,0.1);
}

.scripture-text-block blockquote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-style: italic; line-height: 2;
    color: var(--white); margin-bottom: 20px;
}

.scripture-text-block cite {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; color: var(--rose-light);
    font-style: normal; font-weight: 600; letter-spacing: 2px;
}

/* ===== WISHES SECTION ===== */
.wishes-section {
    background: linear-gradient(135deg, var(--lavender-deep) 0%, #3a2052 50%, #2a1b3d 100%);
    overflow: hidden;
}

.wishes-bg {
    position: absolute; inset: 0;
    background: url('images/background.png') center/cover no-repeat;
    opacity: 0.15;
}

.wishes-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--lavender-deep) 70%);
}

.wishes-content { position: relative; z-index: 2; }
.crown-icon { font-size: 4rem; margin-bottom: 20px; animation: float 3s ease-in-out infinite; }

.wishes-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2.5rem, 7vw, 5rem);
    background: linear-gradient(135deg, var(--rose-light), var(--gold-light), var(--lavender-glow));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 24px;
}

.wishes-text {
    font-size: 1.2rem; line-height: 1.9; max-width: 600px;
    margin: 0 auto 36px; color: var(--white-soft); font-weight: 300;
}

.wishes-hearts {
    display: flex; justify-content: center; gap: 20px;
    font-size: 2.5rem; margin-bottom: 40px;
}

.wishes-hearts span { cursor: pointer; transition: transform 0.3s ease; display: inline-block; }
.wishes-hearts span:hover { transform: scale(1.4); }
.wishes-hearts span:active { transform: scale(0.8); }

.replay-btn { margin-bottom: 40px; }

.signature {
    font-family: 'Great Vibes', cursive; font-size: 2rem;
    color: var(--rose-light); opacity: 0.8;
}

/* ===== BALLOON STYLES ===== */
.balloon {
    position: absolute; width: 50px; height: 62px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    bottom: -100px;
    animation: floatUp var(--duration, 8s) ease-in forwards;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    z-index: 1000; pointer-events: none;
}

.balloon::before {
    content: ''; position: absolute;
    bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 8px; background: inherit;
    clip-path: polygon(20% 0%, 80% 0%, 50% 100%); filter: brightness(0.85);
}

.balloon::after {
    content: ''; position: absolute;
    bottom: -50px; left: 50%; transform: translateX(-50%);
    width: 1px; height: 50px; background: rgba(255,255,255,0.4);
}

.balloon.pop { animation: popBalloon 0.3s ease-out forwards !important; }

@keyframes floatUp {
    0% { bottom: -100px; opacity: 0; transform: translateX(0) rotate(0deg); }
    10% { opacity: 1; }
    100% { bottom: 110vh; opacity: 0.8; transform: translateX(var(--sway, 50px)) rotate(var(--rotate, 10deg)); }
}

@keyframes popBalloon {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

/* ===== SPARKLE ===== */
.sparkle {
    position: absolute; width: 6px; height: 6px;
    background: var(--gold-bright); border-radius: 50%;
    pointer-events: none; animation: sparkleAnim 0.8s ease-out forwards;
}

@keyframes sparkleAnim {
    0% { transform: scale(0) translate(0,0); opacity: 1; }
    100% { transform: scale(1) translate(var(--tx), var(--ty)); opacity: 0; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.03); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes bounce { 0%,20%,50%,80%,100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-12px); } 60% { transform: translateX(-50%) translateY(-6px); } }
@keyframes cardPop { 0% { transform: scale(1); } 30% { transform: scale(1.08); } 60% { transform: scale(0.96); } 100% { transform: scale(1); } }
@keyframes borderGlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shine { 0%, 100% { background-position: 200% 200%; } 50% { background-position: 0% 0%; } }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section { padding: 40px 16px; min-height: auto; min-height: 100svh; }
    .section-content { padding: 0 4px; }
    .section-heading { font-size: 1.9rem; margin-bottom: 32px; }

    /* Hero */
    .hero-badge { font-size: 0.85rem; padding: 8px 20px; margin-bottom: 20px; }
    .hero-title .line1 { font-size: 2.8rem; }
    .hero-title .line2 { font-size: 5rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 28px; padding: 0 10px; }
    .cta-button { padding: 14px 28px; font-size: 1rem; gap: 8px; }
    .btn-icon { font-size: 1.2rem; }
    .scroll-indicator { bottom: 24px; font-size: 0.75rem; }

    /* Messages */
    .message-grid { grid-template-columns: 1fr; gap: 16px; }
    .message-card { padding: 28px 22px; }
    .msg-emoji { font-size: 2.5rem; margin-bottom: 12px; }
    .message-card h3 { font-size: 1.15rem; }
    .message-card p { font-size: 0.9rem; }

    /* Scripture */
    .scripture-frame { max-width: 90vw; }
    .scripture-showcase { margin-bottom: 28px; }
    .scripture-text-block { padding: 28px 20px; max-width: 95vw; }
    .scripture-text-block blockquote { font-size: 1.15rem; line-height: 1.8; }
    .scripture-text-block cite { font-size: 1rem; }
    .click-hint { font-size: 0.75rem; padding: 5px 14px; bottom: 10px; }

    /* Wishes */
    .crown-icon { font-size: 3rem; }
    .wishes-title { font-size: 3rem; margin-bottom: 16px; }
    .wishes-text { font-size: 1.05rem; line-height: 1.7; margin-bottom: 24px; padding: 0 8px; }
    .wishes-hearts { font-size: 2rem; gap: 14px; margin-bottom: 28px; }
    .wishes-hearts span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .replay-btn { margin-bottom: 28px; }
    .signature { font-size: 1.6rem; }

    /* Balloons smaller on mobile */
    .balloon { width: 36px; height: 45px; }
    .balloon::after { height: 35px; bottom: -35px; }
}

@media (max-width: 480px) {
    .section { padding: 32px 12px; }
    .section-heading { font-size: 1.5rem; margin-bottom: 24px; }

    .hero-badge { font-size: 0.75rem; padding: 7px 16px; letter-spacing: 1px; }
    .hero-title .line1 { font-size: 2.2rem; }
    .hero-title .line2 { font-size: 3.8rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .cta-button { padding: 12px 22px; font-size: 0.9rem; }

    .message-card { padding: 24px 18px; }
    .scripture-text-block { padding: 22px 16px; }
    .scripture-text-block blockquote { font-size: 1.05rem; }

    .wishes-title { font-size: 2.4rem; }
    .wishes-text { font-size: 0.95rem; }
    .wishes-hearts { font-size: 1.8rem; gap: 10px; }
    .signature { font-size: 1.4rem; }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .wishes-section { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .hero-section { padding-top: calc(60px + env(safe-area-inset-top)); }
}
