/* =========================================
   GLOBAL THEME & PREMIUM AESTHETIC
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 

    /* FIX 1: Removes the blue tap highlight box on mobile */
    -webkit-tap-highlight-color: transparent;

    /* FIX 2: Prevents accidental text selection on touch/drag */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
}
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff4b6e, #b71c1c);
    z-index: 99999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(255, 75, 110, 0.5);
}

/* FIX 3: Re-enable selection for the passcode input so it remains usable */
input {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}
body {
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh; color: #4a4a4a; overflow-x: hidden;
    /* Softened, mature color palette */
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    background-size: 200% 200%;
    animation: breathe 15s ease infinite alternate;
}
@keyframes breathe {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

h1 { font-family: 'Playfair Display', serif; font-size: 3.5rem; color: #b71c1c; margin-top: 50px; text-align: center; font-weight: 600; text-shadow: 0 4px 15px rgba(183, 28, 28, 0.1); }
/* Removed harsh underlines, added letter spacing */
h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: #880e4f; margin: 70px 0 25px 0; text-align: center; font-weight: 400; letter-spacing: 1px; }
.subtitle { text-align: center; color: #888; font-size: 0.9rem; font-weight: 400; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 30px; }

.instruction { text-align: center; font-size: 0.8rem; color: #aaa; margin-top: 10px; letter-spacing: 1px; }
.footer-credit { text-align:center; padding-bottom: 50px; opacity:0.5; color:#444; font-size: 0.8rem; margin-top: 80px; letter-spacing: 2px; }

/* CONTAINER & SCROLL REVEAL */
.container { max-width: 800px; margin: auto; padding: 20px; transition: filter 1s ease, opacity 1s ease; }
.container.blur-out { filter: blur(10px) grayscale(0.2); opacity: 0.5; pointer-events: none; }
.content-hidden { display: none; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* LOCK SCREEN */
#lock-screen { position: fixed; inset: 0; background: rgba(255,255,255,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.8s ease; }
#lock-screen.hidden { opacity: 0; pointer-events: none; }
.lock-heart { font-size:3rem; color:#ff4b6e; margin-bottom:15px; animation: heartbeat 2s infinite cubic-bezier(0.4, 0, 0.6, 1); }
.lock-title { margin:0; font-size:1.5rem; color:#4a4a4a; letter-spacing: 2px; }

/* =========================================
   PHASE 2: THE SCENE WIPE (LOCK SCREEN)
   ========================================= */
/* Ensure the lock screen actually hides properly after the fade */
#lock-screen {
    transition: opacity 0.8s ease, visibility 0.8s;
}
#lock-screen.hidden {
    opacity: 0;
    visibility: hidden; 
}

/* The smooth scale transition for the final wipe */
.lock-heart {
    transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.4s ease;
    will-change: transform;
}

/* The class we inject via JS to make the heart fill the screen */
.heart-wipe {
    transform: scale(150) !important; /* Massive scale to cover mobile and desktop */
    opacity: 1;
    z-index: 99999;
}

input { padding: 15px 25px; border-radius: 50px; border: 1px solid rgba(255, 75, 110, 0.3); outline: none; text-align: center; margin-top: 20px; font-size: 1.1rem; background: rgba(255,255,255,0.5); box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); transition: all 0.3s ease; }
input:focus { border-color: #ff4b6e; background: white; box-shadow: 0 5px 15px rgba(255, 75, 110, 0.1); }
.glass-btn { margin-top: 15px; padding: 10px 30px; border: none; border-radius: 50px; background: #ff4b6e; color: white; font-family: 'Quicksand'; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 75, 110, 0.3); transition: transform 0.2s; }
/* Premium Breathing Glow for Lock Hint */
@keyframes premiumHintGlow {
    0%, 100% { opacity: 0.6; text-shadow: 0 0 0 rgba(255, 75, 110, 0); }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(255, 75, 110, 0.5); color: #ff4b6e; }
}
.lock-hint { 
    margin-top: 15px; 
    font-size: 0.85rem; 
    color: #888; 
    letter-spacing: 1px;
    animation: premiumHintGlow 3s ease-in-out infinite; 
}
/* PREMIUM LIQUID GLASS COMPONENT */
.liquid-glass-card {
    position: relative; padding: 40px 30px; border-radius: 20px; text-align: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.5), 0 10px 30px rgba(0,0,0,0.05);
}

/* TIMER - MOBILE OPTIMIZED */
#love-timer { display: flex; justify-content: center; gap: 15px; margin: 30px 0; }
.time-box { background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.6); border-radius: 15px; padding: 15px; flex: 1; max-width: 100px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.time-box span { display: block; font-size: 1.8rem; font-weight: 400; color: #b71c1c; font-family: 'Playfair Display', serif; }
@media (max-width: 450px) {
    #love-timer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .time-box { max-width: 100%; }
}

/* TIMELINE */
.timeline-container { position: relative; max-width: 800px; margin: 0 auto; padding: 20px 0; }
.timeline-container::after { content: ''; position: absolute; width: 2px; background: rgba(255, 75, 110, 0.2); top: 0; bottom: 0; left: 50%; margin-left: -1px; }
.timeline-card { padding: 10px 40px; position: relative; width: 50%; }
.left { left: 0; text-align: right; }
.right { left: 50%; text-align: left; }
.timeline-card::after { 
    content: ''; 
    position: absolute; 
    width: 14px; 
    height: 14px; 
    right: -10px; /* <--- FIXED HERE */
    background: white; 
    border: 3px solid #ff4b6e; 
    top: 15px; 
    border-radius: 50%; 
    z-index: 1; 
    box-shadow: 0 0 10px rgba(255, 75, 110, 0.4); 
}
.right::after { 
    left: -10px; /* <--- FIXED HERE */
}
.content { padding: 25px; background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: 15px; border: 1px solid rgba(255,255,255,0.8); box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.content h3 { font-family: 'Playfair Display'; color: #b71c1c; margin: 10px 0; }
.date-badge { display: inline-block; background: rgba(255, 75, 110, 0.1); color: #ff4b6e; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; }

/* 9:16 ASPECT RATIO GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; perspective: 1000px; }
.gallery-card { 
    width: 100%; 
    height: 250px; 
    position: relative; 
    transform-style: preserve-3d; 
    /* Upgraded from standard ease to a bouncy, physical spring */
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); 
    cursor: pointer; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    will-change: transform; /* Hardware acceleration for smoother mobile rendering */
}
.gallery-card.flipped { transform: rotateY(180deg); }
.gallery-front, .gallery-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 15px; }
/* Subtle Tap Navigation Icon on Gallery Cards */

.gallery-front { background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.1)); border: 1px solid rgba(255,255,255,0.8); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; }
.gallery-front::before {
    content: '\f25a'; /* FontAwesome Hand-Pointer icon */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 15px; right: 15px;
    font-size: 1.2rem; color: rgba(255, 75, 110, 0.6);
    animation: bounce 2s infinite; /* Reusing your existing bounce animation */
}
.gallery-front::after { content: '\f004'; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 2rem; color: rgba(255, 75, 110, 0.3); }
.gallery-back { transform: rotateY(180deg); background: white; overflow: hidden; }
.gallery-back img { width: 100%; height: 100%; object-fit: cover; }

/* BUCKET LIST */
/* 2. Original Bucket List Style */
.bucket-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}
.bucket-item.done span { 
    color: #880e4f; 
    font-weight: 600; 
}
@media (hover: hover) and (pointer: fine) { .bucket-item:hover { transform: translateX(5px); background: rgba(255,255,255,0.8); } }
.checkbox { width: 22px; height: 22px; border: 2px solid #ff4b6e; border-radius: 50%; margin-right: 15px; display: flex; align-items: center; justify-content: center; background: transparent; transition: 0.3s; flex-shrink: 0; }
.bucket-item.done .checkbox { background: #ff4b6e; border-color: #ff4b6e; animation: heartPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.bucket-item.done .checkbox::after { content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: white; font-size: 10px; }
.bucket-item.done span { color: #880e4f; font-weight: 600; }
@keyframes strike {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}
/* SCRATCH CARD */
.scratch-container { display: flex; flex-direction: column; align-items: center; margin: 30px 0; }
.scratch-card { position: relative; width: 100%; max-width: 320px; height: 160px; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.scratch-content { position: absolute; inset: 0; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.scratch-content h3 { font-family: 'Playfair Display'; color: #ff4b6e; font-size: 1.5rem; margin-bottom: 5px;}
canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

/* ENVELOPE */
.envelope-container { height: 350px; display: flex; align-items: flex-end; justify-content: center; perspective: 1000px; margin-bottom: 20px; }
.envelope-wrapper { width: 100%; max-width: 320px; height: 200px; position: relative; cursor: pointer; transition: all 0.4s ease; }
@media (hover: hover) and (pointer: fine) { .envelope-wrapper:hover { transform: translateY(-5px); } }
.envelope-body, .envelope-pocket, .envelope-flap { border: 1px solid rgba(255,255,255,0.8); }
.envelope-body { position: absolute; inset: 0; border-radius: 0 0 15px 15px; z-index: 10; background: rgba(255,255,255,0.4); backdrop-filter: blur(10px); border-top: none; }
.envelope-pocket { position: absolute; inset: 0; z-index: 20; pointer-events: none; clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom right, rgba(255,255,255,0.8), rgba(255,255,255,0.4)); backdrop-filter: blur(5px); border-radius: 0 0 15px 15px; }
.envelope-flap { position: absolute; inset: 0; z-index: 30; transform-origin: top; transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1); clip-path: polygon(0 0, 50% 55%, 100% 0); background: rgba(255,255,255,0.7); backdrop-filter: blur(5px); }
.envelope-wrapper.open .envelope-flap { transform: rotateX(180deg); z-index: 1; opacity: 0.3; }
.heart-seal { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); width: 35px; height: 35px; background: #ff4b6e; clip-path: path('M17.5 31.3l-2.5-2.3C6 20.8 0 15.4 0 8.8 0 3.9 3.9 0 8.8 0c2.7 0 5.3 1.3 7.1 3.3 1.8-2 4.4-3.3 7.1-3.3 4.9 0 8.8 3.9 8.8 8.8 0 6.6-6 12-15 20.3l-2.5 2.2z'); z-index: 40; transition: opacity 0.3s; box-shadow: 0 5px 15px rgba(255, 75, 110, 0.5); }
.envelope-wrapper.open .heart-seal { opacity: 0; pointer-events: none; }
.card-stack { position: absolute; bottom: 0; left: 15px; right: 15px; height: 140px; z-index: 5; }

/* =========================================
   UPDATED LETTER CARDS (PREMIUM UI & BUG FIX)
   ========================================= */
.letter-card {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center;
    
    /* FIX 1: Start from the top to completely eliminate text chopping */
    justify-content: flex-start; 
    
    /* Premium Stationery Aesthetic */
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 0 0 15px rgba(255,255,255,1);
    border: 1px solid rgba(255, 75, 110, 0.15);
    padding: 35px 25px 40px 25px;
    text-align: center;
    overflow-y: auto; scrollbar-width: none;
    cursor: pointer; transition: transform 0.5s ease, opacity 0.5s ease;
}

.letter-card::-webkit-scrollbar { display: none; }

/* Decorative Quote Icon to elegantly anchor the top layout */
.letter-card::before {
    content: '\f10d'; /* FontAwesome Quote-Left */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 1.2rem; color: rgba(255, 75, 110, 0.25);
    margin-bottom: 15px; flex-shrink: 0;
}

.letter-card p {
    font-family: 'Playfair Display', serif;
    /* FIX 2: Deeper, richer color without opacity for crisp legibility */
    color: #5c0a36; 
    font-size: 1.05rem;
    line-height: 1.85; /* Increased breathing room */
    
    /* FIX 3: Removed 'margin: auto' which was causing the overflow trap */
    margin: 0; 
    letter-spacing: 0.3px;
    font-weight: 500;
}
/* The fully-revealed presentation state */
.card-peek { 
    /* Pushed up from -160px to -230px to sit right in the V-cut of the pocket */
    transform: translateY(-200px) rotate(var(--rot)) scale(1.02); 
    pointer-events: auto !important; 
    
    /* Added a deeper, softer drop shadow to give it a premium 3D lift */
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 5px 15px rgba(255, 75, 110, 0.05) !important;
}

/* The animation when a card is clicked and sent to the back */
.card-slide-away {
    /* Adjusted to start from the new higher position */
    transform: translateY(-250px) translateX(140px) rotate(25deg) scale(0.9) !important;
    opacity: 0;
}
/* Elegant Bouncing Scroll Indicator */
.scroll-indicator {
    position: sticky; bottom: -15px; left: 50%;
    color: #ff4b6e; opacity: 0.6; font-size: 1.2rem;
    animation: bounce 2s infinite; transition: opacity 0.3s ease;
    pointer-events: none; margin-top: 10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

@media (hover: hover) and (pointer: fine) { .letter-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); } }

/* FULL SCREEN MODALS */
.modal-hidden { opacity: 0; pointer-events: none; visibility: hidden; }

.modal-card::-webkit-scrollbar { display: none; }
.close-modal { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 1.5rem; color: #888; cursor: pointer; }
#modal-text { font-family: 'Playfair Display', serif; font-size: 1.2rem; line-height: 1.8; color: #880e4f; text-align: center; white-space: pre-wrap; }

/* FINAL SECTION */
.final-section { display: flex; justify-content: center; margin-top: 60px; }
.glowing-text { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: #b71c1c; margin-bottom: 30px; line-height: 1.3; }
.btn-group { position: relative; height: 50px; display: flex; justify-content: center; gap: 15px; }
.yes-btn { padding: 12px 40px; font-size: 1.1rem; border: none; border-radius: 50px; background: #ff4b6e; color: white; box-shadow: 0 8px 20px rgba(255, 75, 110, 0.4); cursor: pointer; transition: transform 0.2s; position: relative; z-index: 5; font-family: 'Quicksand'; font-weight: 600; }
.no-btn { padding: 12px 30px; font-size: 1.1rem; border: 1px solid #ddd; border-radius: 50px; background: rgba(255,255,255,0.8); color: #666; cursor: pointer; position: relative; transition: transform 0.1s; font-family: 'Quicksand'; }

/* EXTRAS & ORGANIC ANIMATIONS */
.music-btn { position: fixed; bottom: 25px; right: 25px; width: 50px; height: 50px; background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #ff4b6e; box-shadow: 0 5px 20px rgba(0,0,0,0.1); cursor: pointer; z-index: 100; border: 1px solid rgba(255,255,255,0.5); }
.floating-hearts { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.heart-bg { position: absolute; bottom: -10vh; color: rgba(255, 75, 110, 0.15); animation: floatUp linear infinite, sway ease-in-out infinite alternate; }
@keyframes floatUp { 0% { bottom: -10vh; opacity: 1; } 100% { bottom: 110vh; opacity: 0; } }
@keyframes sway { 0% { transform: translateX(-20px) rotate(-10deg); } 100% { transform: translateX(20px) rotate(10deg); } }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.pulse-heart { font-size: 3rem; color: #ff4b6e; margin-top: 20px; animation: heartbeat 1.5s infinite; }

/* Responsive adjustments */
/* Responsive adjustments */
@media screen and (max-width: 600px) { 
    h1 { font-size: 2.8rem; } 
    .timeline-container::after { left: 20px; } 
    .timeline-card { width: 100%; padding-left: 50px; padding-right: 0; } 
    
    /* FIX 1: Add 'right: auto' to safely overwrite the desktop 'right: -7px' rule */
.timeline-card::after, .right::after { 
        left: 11px; /* <--- FIXED HERE */
        right: auto; 
    }
    /* FIX 2: Add 'left: 0' to snap the .right cards back to the left margin */
    .left, .right { text-align: left; left: 0; } 
}

/* =========================================
   THE ULTIMATE CELEBRATION UX
   ========================================= */

/* 1. The Ethereal Halo Background */
#celebration-overlay { 
    position: fixed; inset: 0; z-index: 10000; 
    /* Replaces the cheap black overlay with a warm, glowing frost */
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(253, 246, 245, 0.85) 100%); 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); 
    display: flex; justify-content: center; align-items: center; 
    padding: 20px; transition: all 1s ease;
}
/* This tells the overlay to actually reveal itself when JavaScript triggers it */
#celebration-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 2. The Final Masterpiece Card */
.celebration-glass-card {
    position: relative; width: 100%; max-width: 500px; padding: 50px 40px;
    text-align: center; border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    border: 1px solid rgba(255, 255, 255, 1);
    
    /* Complex layered shadows for a rose-gold inner reflection */
    box-shadow: 
        0 40px 80px rgba(255, 75, 110, 0.15), 
        inset 0 0 40px rgba(255, 255, 255, 0.8), 
        inset 0 0 10px rgba(255, 182, 193, 0.4); 
    
    /* The cinematic entrance animation */
    transform: translateY(40px) scale(0.95); opacity: 0;
    transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#celebration-overlay.visible .celebration-glass-card {
    transform: translateY(0) scale(1); opacity: 1;
}

/* 3. Typographic Hierarchy */
.celebration-title {
    font-family: 'Playfair Display', serif; font-size: 2.4rem;
    background: linear-gradient(45deg, #b71c1c, #ff4b6e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 15px; font-weight: 700; line-height: 1.2;
}

.celebration-divider {
    width: 50px; height: 3px; background: rgba(255, 75, 110, 0.4);
    margin: 0 auto 25px auto; border-radius: 5px;
}

/* Scrollable Celebration Text */
#celebration-text {
    font-family: 'Quicksand', sans-serif; font-size: 1.15rem; color: #555;
    line-height: 1.8; margin-bottom: 35px; font-weight: 500;
    max-height: 40vh; /* Restricts height to enable scrolling on small devices */
    overflow-y: auto; 
    padding-right: 15px; /* Prevents text from hugging the scrollbar */
    text-align: left; /* Left-align makes long text much easier to read */
}

/* Custom elegant scrollbar for the celebration text */
#celebration-text::-webkit-scrollbar { width: 4px; }
#celebration-text::-webkit-scrollbar-thumb { background: rgba(255, 75, 110, 0.4); border-radius: 10px; }

.final-heart { 
    font-size: 3rem; color: #ff4b6e; 
    filter: drop-shadow(0 0 15px rgba(255,75,110,0.5)); 
}

/* =========================================
   PHASE 3: SCROLL-LINKED STORYTELLING
   ========================================= */
/* 1. Make the timeline line dynamic */
.timeline-container::after {
    bottom: auto; /* Override your previous 'bottom: 0' rule */
    height: var(--line-progress, 0%);
    background: linear-gradient(to bottom, #ff4b6e, rgba(255, 75, 110, 0.1));
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 2. The Magnetic Ping Keyframes */
@keyframes magneticPing {
    0% { box-shadow: 0 0 0 0 rgba(255, 75, 110, 0.8); }
    70% { box-shadow: 0 0 0 20px rgba(255, 75, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 75, 110, 0); }
}

/* 3. The class injected by JS when a card hits the center of the screen */
.timeline-card.ping-active::after {
    animation: magneticPing 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    background: #ff4b6e; /* Fills in the dot to show it's active */
    border-color: white;
}

/* =========================================
   PHASE 5: THE CLIMAX (LIQUID GLASS & ACTIONS)
   ========================================= */
   
/* 1. The Magnetic "Yes" Button Glow */
@keyframes magneticGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(255, 75, 110, 0.4); transform: scale(1); }
    50% { box-shadow: 0 8px 30px rgba(255, 75, 110, 0.8), 0 0 15px rgba(255, 75, 110, 0.6); transform: scale(1.03); }
}
.yes-btn {
    animation: magneticGlow 2.5s infinite ease-in-out;
}

/* 2. Smooth Liquid Bubble Physics */
.bubble {
    transition: transform 0.3s ease-out; 
    will-change: transform;
}

/* 3. The Ghost Trail for the "No" Button */
.ghost-trail {
    position: absolute;
    top: 0; 
    left: 0;
    pointer-events: none; /* User can't interact with the ghosts */
    opacity: 0.6;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.ghost-fade {
    opacity: 0;
    transform: scale(0.6) !important; /* Shrinks as it fades */
}