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

:root {
    --blue-deep: #0a1628;
    --blue-dark: #132744;
    --blue-mid: #1e4976;
    --blue-light: #4a90d9;
    --blue-glow: #6fb3f2;
    --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.15);
}

html { scroll-behavior: smooth; }

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

/* ===== 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(--gold-light), var(--gold), var(--gold-bright));
    -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(--blue-deep) 0%, var(--blue-dark) 40%, var(--blue-mid) 100%);
    flex-direction: column;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--blue-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: var(--glass);
    border: 1px solid var(--glass-border);
    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(--gold-light), var(--gold-bright));
    -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(--blue-glow));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    text-shadow: 0 0 60px rgba(111,179,242,0.3);
}

.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(--gold);
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(212,168,67,0.05));
    color: var(--gold-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(--gold), var(--gold-bright));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cta-button:hover { transform: scale(1.08); box-shadow: 0 0 40px rgba(212,168,67,0.4); }
.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);
}

/* ===== CARD SECTION ===== */
.card-section {
    background: linear-gradient(180deg, var(--blue-deep) 0%, #0d1f3c 50%, var(--blue-deep) 100%);
}

.card-showcase { perspective: 1000px; margin-bottom: 40px; }

.card-frame {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(74,144,217,0.15);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    cursor: pointer;
    max-width: 400px;
}

.card-frame:hover {
    transform: rotateY(-5deg) rotateX(3deg) scale(1.05);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 120px rgba(74,144,217,0.3);
}

.card-glow {
    position: absolute; inset: -4px;
    background: linear-gradient(135deg, var(--blue-glow), var(--gold), var(--blue-light), var(--gold-bright));
    border-radius: 24px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
    background-size: 300% 300%;
}

.card-image { width: 100%; display: block; border-radius: 20px; }

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

.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(--gold-light);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.card-message {
    font-size: 1.15rem; line-height: 1.8;
    color: var(--white-soft);
    max-width: 600px; margin: 0 auto;
    font-weight: 300;
}

@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%; }
}

/* ===== MESSAGE SECTION ===== */
.message-section {
    background: linear-gradient(180deg, var(--blue-deep), #0b1a30, var(--blue-deep));
    position: relative;
}

.message-bg-pattern {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 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: var(--glass);
    border: 1px solid var(--glass-border);
    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(--gold);
    box-shadow: 0 16px 40px rgba(212,168,67,0.15);
}

.message-card.clicked {
    animation: cardPop 0.5s ease;
    border-color: var(--gold-bright);
    box-shadow: 0 0 50px rgba(212,168,67,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(--gold-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(--blue-deep), #091420, var(--blue-deep));
}

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

.scripture-frame {
    position: relative;
    display: inline-block;
    border-radius: 16px;
    overflow: hidden;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 60px rgba(111,179,242,0.1);
    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(111,179,242,0.2);
}

.scripture-glow {
    position: absolute; inset: -3px;
    background: linear-gradient(135deg, var(--blue-glow), var(--gold), var(--blue-light));
    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.1) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shine 4s ease-in-out infinite;
    pointer-events: none;
    border-radius: 16px;
}

.scripture-text-block {
    max-width: 700px;
    margin: 0 auto;
    padding: 44px 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(212,168,67,0.08), var(--glass));
    border: 2px solid rgba(212,168,67,0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(212,168,67,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;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

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

/* ===== WISHES SECTION ===== */
.wishes-section {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-dark) 50%, #1a0a2e 100%);
    overflow: hidden;
}

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

.wishes-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--blue-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(--gold-light), var(--gold-bright), var(--gold));
    -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(--gold-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;
    cursor: pointer;
}

.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); }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

@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); }
}

/* ===== 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; }
    .message-grid { grid-template-columns: 1fr; }
    .card-frame, .scripture-frame { max-width: 90vw; }
    .cta-button { padding: 14px 28px; font-size: 1rem; }
    .wishes-hearts { font-size: 2rem; gap: 12px; }
}

@media (max-width: 480px) {
    .hero-badge { font-size: 0.8rem; padding: 8px 20px; }
    .section-heading { font-size: 1.8rem; margin-bottom: 30px; }
}
