:root {
    --bg-color: #ffe6e6;
    /* Soft Pink */
    --primary-color: #ff4d4d;
    /* Red */
    --text-color: #5c3a3a;
    /* Darker Pink/Brown for text */
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* Anchor to top */
    padding-top: 15vh;
    /* Position content comfortably */
    min-height: 100vh;
    overflow: hidden;
    /* Prevent scroll when buttons grow */
    color: var(--text-color);
    position: relative;
}

/* Floating Hearts Background */
.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.heart {
    position: absolute;
    bottom: -10px;
    color: rgba(255, 77, 77, 0.3);
    font-size: 20px;
    animation: floatUp 10s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.game-container {
    text-align: center;
    width: 90%;
    max-width: 600px;
    z-index: 10;
}

img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    line-height: 1.3;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    /* Allow wrapping if needed */
}

button {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Smooth transition for size changes */
    min-height: 44px;
    /* Mobile touch target optimization */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#yes-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

#yes-btn:hover {
    background-color: #ff3333;
    transform: scale(1.05);
}

#no-btn {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: fixed;
    /* Start as fixed to ensure smooth transitions from the get-go if moved */
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

/* Initial static position override for layout, handled by JS when moved */
.buttons #no-btn {
    position: static;
    transition: all 0.3s ease;
    /* Default transition for hover effects until it moves */
}

/* Class to apply when the button starts running */
#no-btn.running {
    position: fixed;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#no-btn:hover {
    background-color: #fff0f0;
}

.hidden {
    display: none;
}

/* Success State styling */
#success-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 20px;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    img {
        max-width: 250px;
    }

    button {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

/* Impact / Squash Animation */
@keyframes impact {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.3, 0.7);
        /* Squash */
    }

    100% {
        transform: scale(1);
    }
}


.impacting {
    animation: impact 0.3s ease-out;
}

/* Reset / Pop Animation */
@keyframes pop-reset {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        /* Slight swell before pop */
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.resetting {
    animation: pop-reset 0.4s ease-in-out;
}