/* ==============================================
   WILL YOU BE MY VALENTINE?
   Style principal - Thème romantique
   ============================================== */

/* ----- Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Tenor Sans', sans-serif;
    background: linear-gradient(135deg, #2d0a16 0%, #4a1228 25%, #6b1d3a 50%, #8c2848 60%, #a03050 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ----- Floating Hearts Background ----- */
.hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hearts-bg .heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.2;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% { opacity: 0.2; }
    90% { opacity: 0.2; }
    100% {
        transform: translateY(-10vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* ----- Main Card ----- */
.card {
    position: relative;
    z-index: 10;
    background: #fdf8f4;
    border-radius: 20px;
    padding: 3.5rem 2.5rem 3rem;
    max-width: 480px;
    width: 90vw;
    text-align: center;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35),
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    border: 1px solid rgba(160, 68, 90, 0.08);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ----- Question Screen ----- */
.question-screen h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    color: #5c1a2e;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.question-screen h1 .name {
    display: block;
    font-size: clamp(2.6rem, 7.5vw, 3.4rem);
    font-style: italic;
    color: #8c2848;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.question-screen .hearts-emoji {
    font-size: 2rem;
    display: block;
    margin: 0.8rem 0 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ----- Buttons Container ----- */
.buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 80px;
    position: relative;
}

.buttons.merged .btn-no-wrapper {
    width: 0;
    overflow: hidden;
    margin: 0;
}

.btn-no-wrapper {
    position: relative;
    width: 108px;
    height: 52px;
    flex-shrink: 0;
    transition: width 1.2s ease-in-out;
}

/* ----- YES Button ----- */
.btn-yes {
    padding: 16px 52px;
    font-family: 'Tenor Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #fdf8f4;
    background: linear-gradient(135deg, #8c2848, #6b1d3a);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow:
        0 8px 28px rgba(107, 29, 58, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.btn-yes:hover {
    transform: scale(1.1);
    box-shadow:
        0 12px 35px rgba(107, 29, 58, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-yes:active {
    transform: scale(1.05);
}

/* YES Button Animations */
.btn-yes.pulse-attract {
    animation: yesPulseSoft 0.8s ease-in-out infinite;
}

@keyframes yesPulseSoft {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.22); }
}

.btn-yes.neon-glow {
    animation: yesNeon 0.8s ease-in-out infinite;
}

@keyframes yesNeon {
    0%, 100% {
        transform: scale(1.05);
        box-shadow:
            0 0 10px rgba(140, 40, 72, 0.6),
            0 0 25px rgba(140, 40, 72, 0.4),
            0 0 50px rgba(140, 40, 72, 0.2),
            0 0 80px rgba(140, 40, 72, 0.1);
    }
    50% {
        transform: scale(1.22);
        box-shadow:
            0 0 15px rgba(140, 40, 72, 0.8),
            0 0 35px rgba(140, 40, 72, 0.6),
            0 0 70px rgba(140, 40, 72, 0.35),
            0 0 110px rgba(140, 40, 72, 0.2),
            0 0 150px rgba(140, 40, 72, 0.1);
    }
}

.btn-yes.neon-hearts {
    animation: yesNeon 0.8s ease-in-out infinite;
}

/* ----- NO Button ----- */
.btn-no {
    padding: 14px 36px;
    font-family: 'Tenor Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #b8a0a8;
    background: #ffffff;
    border: 1.5px solid #d4c0c8;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                font-size 0.2s ease,
                padding 0.2s ease,
                opacity 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ----- Shockwave Effect ----- */
.shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid rgba(140, 40, 72, 0.6);
    background: radial-gradient(circle, rgba(140, 40, 72, 0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: shockwaveExpand 0.8s ease-out forwards;
}

.shockwave:nth-child(2) {
    animation-delay: 0.15s;
    border-color: rgba(140, 40, 72, 0.4);
}

.shockwave:nth-child(3) {
    animation-delay: 0.3s;
    border-color: rgba(140, 40, 72, 0.2);
}

@keyframes shockwaveExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* ----- Celebration Screen ----- */
.celebration-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.celebration-screen.active {
    display: flex;
    animation: celebrationAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes celebrationAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration-screen .yay-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    animation: pulse 1s ease-in-out infinite;
}

.celebration-screen .yay {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.8rem, 9vw, 4.5rem);
    font-weight: 700;
    color: #6b1d3a;
    text-shadow: none;
}

.celebration-screen .yay-hearts {
    font-size: 2.5rem;
}

.celebration-screen .subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #5c1a2e;
    font-weight: 400;
    font-style: italic;
    margin-top: 0.3rem;
    letter-spacing: 0.03em;
}

.celebration-screen .gif-container {
    width: 260px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    margin: 1rem 0;
    box-shadow: 0 8px 28px rgba(45, 10, 22, 0.12);
    background: #f0e4e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celebration-screen .gif-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.celebration-screen .love-msg {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: clamp(1.5rem, 4.5vw, 2rem);
    color: #8c2848;
    margin-top: 0.3rem;
    font-weight: 400;
}

.celebration-screen .subtitle-bottom {
    font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    color: #5c1a2e;
    font-weight: 400;
    margin-top: 0.3rem;
    font-style: normal;
    letter-spacing: 0.02em;
}

/* ----- Confetti Hearts ----- */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-heart {
    position: absolute;
    top: -10%;
    font-size: 1.5rem;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

/* ----- Mini Hearts (emanating from YES button) ----- */
.mini-heart {
    position: absolute;
    pointer-events: none;
    font-size: 0.9rem;
    animation: miniHeartFloat 1.5s ease-out forwards;
    z-index: 1;
}

@keyframes miniHeartFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: translate(var(--tx), var(--ty)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx) * 1.8), calc(var(--ty) * 1.8)) scale(0.6);
    }
}

/* ----- Close Button ----- */
.btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #8c2848;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.5;
    z-index: 50;
}

.btn-close:hover {
    opacity: 1;
    background: rgba(140, 40, 72, 0.06);
}

/* ----- Copyright ----- */
.copyright {
    position: fixed;
    bottom: 16px;
    right: 20px;
    font-family: 'Tenor Sans', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
    z-index: 50;
}

/* ----- Utility Classes ----- */
.hidden {
    display: none !important;
}
