/* --- 1. GLOBAL STYLES --- */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: 'Borel', cursive;
    background-color: #ffe6e6;
    text-align: center;
    position: relative;
    overflow: hidden; /* Prevents scrollbars from background hearts */
}

.borel-regular {
    font-family: "Borel", cursive;
    font-weight: 400;
    font-style: normal;
}

h1 {
    color: #d63384;
    font-size: 3rem;
}

button {
    font-family: 'Borel', cursive;
    padding: 15px 25px;
    font-size: 1.2rem;
    margin: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* --- 2. ENVELOPE STYLES --- */
/* --- ENVELOPE CONTAINER (The Screen) --- */
.heart-seal {
    /* Increase this number until it looks right to you */
    width: 900px; 
    height: 900px;
    
    /* This ensures the image isn't squished */
    object-fit: contain; 
    
    /* Keeps it on top of the flap */
    z-index: 3; 
    
/* Pushes the seal down. Increase this number to move it lower */
    margin-top: 110px; 
    
    /* Ensure these are here to keep it centered horizontally */
    display: block;
    margin-left: auto;
    margin-right: auto;
    
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    
    /* Adds a little 'pop' so it looks like a physical seal */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    
    pointer-events: none;
}

#letter-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffc1cc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* --- THE ENVELOPE BODY --- */
#envelope {
    width: 450px; 
    height: 300px;
    background-color: #d63384;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-radius: 0 0 10px 10px;
    
    /* Animation & Transition Setup */
    transition: all 0.3s ease;
    transform-origin: center;
    animation: gentle-shiver 3s infinite ease-in-out;
}

/* --- THE ENVELOPE FLAP (The Triangle) --- */
.envelope-flap {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    /* Calculations: width (450) / 2 = 225 */
    border-left: 225px solid transparent;
    border-right: 225px solid transparent;
    border-top: 150px solid #b02a6b; 
    z-index: 2;
}

/* --- THE HEART SEAL --- */
.heart-seal {
    font-size: 4rem;
    z-index: 3;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

/* --- HOVER EFFECTS --- */
#envelope:hover {
    transform: scale(1.05); /* Grows the envelope */
    animation: shake 0.5s infinite; /* Switches to excited shake */
    box-shadow: 0 20px 40px rgba(214, 51, 132, 0.4);
}

/* --- ANIMATIONS --- */

/* Suble shiver for when the mouse is NOT hovering */
@keyframes gentle-shiver {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

/* Bigger shake for when she hovers over it */
/* We keep scale(1.05) inside so it stays big while shaking */
@keyframes shake {
    0% { transform: scale(1.05) rotate(0deg); }
    25% { transform: scale(1.05) rotate(2deg); }
    50% { transform: scale(1.05) rotate(0deg); }
    75% { transform: scale(1.05) rotate(-2deg); }
    100% { transform: scale(1.05) rotate(0deg); }
}

/* Floating 'Click Me' text animation */
.click-me {
    position: absolute;
    /* Pushes it 60px above the top of the envelope */
    top: -70px; 
    left: 50%;
    transform: translateX(-50%);
    
    /* Text Styling */
    color: #d63384;
    font-size: 1.8rem; /* Made it bigger */
    font-weight: bold;
    white-space: nowrap; /* Prevents text from wrapping to a second line */
    
    /* The "Tag" look */
    background-color: white;
    padding: 10px 25px;
    border: 3px solid #d63384; /* The border you asked for */
    border-radius: 50px; /* Makes it a pill shape */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    
    /* Animation */
    animation: bounceAbove 2s infinite ease-in-out;
    z-index: 5;
}

@keyframes bounceAbove {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* --- 3. LETTER STYLES --- */
#letter-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    border: 2px dashed #d63384;
    text-align: center;
}

#letter-content p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #333;
}

#openBtn {
    background-color: #d63384;
    color: white;
    margin-top: 20px;
}

/* --- 4. VALENTINE QUIZ & BUTTONS --- */
.container {
    margin-top: 20px;
}

#yesBtn {
    background-color: #28a745;
    color: white;
}

#noBtn {
    background-color: #dc3545;
    color: white;
}

.fullscreen-yes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    font-size: 5rem !important; 
    z-index: 9999;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celebration {
    display: none;
}

img {
    width: 200px;
    margin-bottom: 20px;
}


/* Container to keep the GIF and the caption aligned */
.gif-container {
    position: relative;
    display: inline-block;
    margin-top: 20px;
}

#finalGif {
    width: 300px; /* Made it a bit bigger for visibility */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.caption-wrapper {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow {
    font-size: 5rem;
    color: #d63384;
    line-height: 1;
    margin-bottom: -4px;
}

.caption-text {
    background-color: white;
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid #d63384;
    color: #d63384;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 3px 3px 0px #ffc1cc;
}

.highlight-text {
    color: #d63384;
    /* This creates a solid 5px white 'border' around every letter */
    /* -webkit-text-stroke is the magic trick here */
    -webkit-text-stroke: 5px white;
    paint-order: stroke fill; /* Ensures the pink color stays on top of the white stroke */
    
    /* This ensures the emoji doesn't look weird with the stroke */
    filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.1));
    
    /* Zero layout changes: */
    margin: 0;
    padding: 0;
}

/* --- 5. BACKGROUND DECORATION --- */
.heart-background {
    position: absolute;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}