:root {
    --primary-color: #ff4d6d;
    --secondary-color: #ff8fa3;
    --bg-gradient-start: #fff0f3;
    --bg-gradient-end: #ffccd5;
    --text-color: #590d22;
    --btn-yes-bg: linear-gradient(135deg, #ff4d6d 0%, #e01e37 100%);
    --btn-yes-shadow: 0 10px 20px rgba(255, 77, 109, 0.4);
    --btn-no-bg: rgba(255, 255, 255, 0.8);
    --btn-no-text: #808080;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Modern Mobile */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Fredoka One", cursive;
    background: radial-gradient(
        circle at center,
        var(--bg-gradient-start),
        var(--bg-gradient-end)
    );
    overflow: hidden;
    position: relative;
    touch-action: none;
}

/* Subtle Grain Texture */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* --- STICKER STYLES --- */
.sticker {
    position: absolute;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 5;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Top Corners - Me building courage */
.sticker-corner-left {
    top: 20px;
    left: 20px;
    width: 100px;
    animation: bob 3s ease-in-out infinite;
}

.sticker-corner-right {
    top: 20px;
    right: 20px;
    width: 100px;
    animation: bob 3.5s ease-in-out infinite reverse;
}

/* Main Center - Me asking */
.sticker-main {
    position: relative;
    width: 140px;
    margin-bottom: 10px;
    animation: gentlePulse 2s infinite ease-in-out;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Near YES Button - Hopeful */
.sticker-yes {
    position: absolute;
    bottom: -5px;
    left: -50px;
    /* Position relative to the button container or button */
    width: 70px;
    transform: rotate(-10deg);
    z-index: 25;
    animation: wiggle 2s ease-in-out infinite;
}

/* Success Sticker - Us together */
.sticker-success {
    position: relative;
    /* Override absolute */
    width: 200px;
    margin-bottom: 20px;
    animation: scaleUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Jump Sticker - Bottom Right */
.sticker-jump {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 120px;
    z-index: 20;
    animation: jump 2s infinite ease-in-out;
}

@keyframes jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animations */
@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentlePulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

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

@keyframes wiggle {
    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Existing Styles Below */

.bg-heart {
    position: absolute;
    color: rgba(255, 77, 109, 0.4);
    font-size: 20px;
    pointer-events: none;
    z-index: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(110vh) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

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

.container {
    text-align: center;
    z-index: 10;
    padding: 1rem;
    max-width: 90%;
    width: 100%;
    position: relative;
}

h1 {
    font-family: "Pacifico", cursive;
    font-size: 4rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 0px rgba(255, 255, 255, 0.8);
    animation: bounceIn 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
    line-height: 1.1;
    letter-spacing: 1px;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

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

.subtext {
    font-size: 1.2rem;
    color: #a4133c;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
    min-height: 1.5em;
    transition: transform 0.2s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

/* Wrapper for Yes button to hold the sticker */
.btn-yes-wrapper {
    position: relative;
}

button {
    font-family: "Fredoka One", cursive;
    font-size: 1.5rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    white-space: nowrap;
    touch-action: manipulation;
}

.btn-yes {
    background: var(--btn-yes-bg);
    color: white;
    animation: pulse 1.5s infinite;
    z-index: 20;
    box-shadow: var(--btn-yes-shadow);
    border: 2px solid white;
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

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

.btn-no {
    background-color: var(--btn-no-bg);
    color: var(--btn-no-text);
    border: 2px solid #ffccd5;
    transition: all 0.3s ease;
    z-index: 15;
    backdrop-filter: blur(5px);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 240, 243, 0.98);
    /* Slightly more opaque for the story ending */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-text {
    font-family: "Pacifico", cursive;
    font-size: 2rem;
    color: var(--text-color);
    text-align: center;
    animation: slideUp 0.8s ease forwards;
    padding: 0 20px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Footer Styles */
.footer {
    position: fixed;
    bottom: 10px;
    bottom: 10px;
    width: 100%;
    text-align: center;
    left: 0;
    /* Removed transform for better text flow */
    font-family: "Fredoka One", cursive;
    font-size: 1rem;
    color: rgba(89, 13, 34, 0.6);
    /* Semi-transparent text color */
    pointer-events: none;
    z-index: 10;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4);
}

/* Cursor Trail & Burst Particles */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: fadeOut 1s forwards;
    z-index: 100;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.taunt {
    position: absolute;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    pointer-events: none;
    animation: fadeUpAndOut 1s forwards;
    white-space: nowrap;
    z-index: 30;
}

@keyframes fadeUpAndOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .subtext {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    button {
        font-size: 1.1rem;
        padding: 12px 25px;
    }

    .buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* Resize stickers for mobile */
    .sticker-corner-left,
    .sticker-corner-right {
        width: 70px;
        top: 10px;
    }

    .sticker-main {
        width: 110px;
    }

    /* Move YES sticker to be more compact */
    .sticker-yes {
        width: 50px;
        left: -35px;
        bottom: 0px;
    }

    .btn-yes {
        width: 80%;
        max-width: 300px;
    }

    /* Mobile override for jump sticker */
    .sticker-jump {
        width: 80px;
        bottom: 10px;
        right: 10px;
    }
    /* Mobile override for jump sticker */
    .sticker-jump {
        width: 80px;
        bottom: 10px;
        right: 10px;
    }

    .footer {
        font-size: 0.8rem;
        padding-bottom: 20px;
    }
}
