:root {
    --bg-color: #0a0505;
    --primary-red: #8a1c1c;
    --bright-red: #ff3333;
    --soft-pink: #ffadad;
    --text-color: #f0f0f0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    width: 100vw;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Background Effects */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-red);
    top: -50px;
    left: -50px;
    animation: floatOrb 10s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #4a0e0e;
    bottom: -100px;
    right: -100px;
    animation: floatOrb 12s infinite ease-in-out reverse;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 30px);
    }
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.screen.active-screen {
    opacity: 1;
    pointer-events: auto;
}

.content-container {
    text-align: center;
    padding: 1.5rem;
    max-width: 600px;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

/* Animations */
.fade-text-line {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
    margin-bottom: 1rem;
}

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

/* Buttons */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 1.2rem 2.8rem;
    /* Larger touch target */
    border-radius: 50px;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 15px;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), #5e1111);
    color: white;
    box-shadow: 0 4px 15px rgba(138, 28, 28, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(138, 28, 28, 0.6);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 28, 28, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(138, 28, 28, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(138, 28, 28, 0);
    }
}

.hidden-btn {
    opacity: 0;
    animation: fadeIn 1s forwards 3.5s;
}

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

/* Questions Screen */
.question-text {
    font-size: 2rem;
    margin-bottom: 3rem;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tease-text {
    height: 1.5rem;
    margin-top: 2rem;
    color: var(--soft-pink);
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s;
}

/* No Button Special Behaviors */
.btn-secondary.dodging {
    position: absolute;
    transition: left 0.2s ease, top 0.2s ease;
}

/* Final Screen */
.final-proposal {
    font-size: 3rem;
    color: var(--bright-red);
    margin: 2rem 0;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
}

.big-glow {
    font-size: 1.5rem;
    padding: 1.5rem 4rem;
    box-shadow: 0 0 20px var(--primary-red);
    animation: heartbeat 1.5s infinite;
}

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

    50% {
        transform: scale(1.05);
    }

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

.tiny-no {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    opacity: 0.7;
}

/* Success Screen */
.success-title {
    font-size: 3.5rem;
    background: linear-gradient(to right, #ffadad, #ff3333);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.instruction {
    margin-top: 2rem;
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

/* Particle/Heart Animation */
.heart {
    position: absolute;
    color: var(--primary-red);
    opacity: 0.6;
    animation: floatUp 4s linear forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .content-container {
        padding: 1rem;
    }

    .question-text {
        font-size: 1.8rem;
        /* Slightly larger for readability */
        margin-bottom: 2rem;
    }

    .final-proposal {
        font-size: 2.2rem;
    }

    .success-title {
        font-size: 2.5rem;
    }

    /* Stack buttons on very small screens if needed, or just make them take more space */
    .buttons-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
        min-height: 200px;
        /* Reserve space for movement */
        position: relative;
    }

    .final-footer {
        margin-bottom: 2rem;
    }

    button {
        width: 80%;
        /* Easy to hit with thumb */
        max-width: 300px;
        margin: 5px 0;
        padding: 1.2rem;
    }

    /* Make sure No button doesn't look like a primary action initially, or keep it consistent */
    #btn-no,
    #btn-final-no {
        width: auto;
        /* Keep No button smaller or erratic */
        min-width: 120px;
    }
}