:root {
    --bg-dark: #1a1a2e;
    --border-color: #ffb703;
    --text-primary: #fb8500;
    --text-secondary: #ffffff;
    --btn-yes: #8bc34a;
    --btn-yes-hover: #7cb342;
    --btn-no: #e63946;
    --btn-no-hover: #d62828;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    z-index: -1;
}

.container {
    background: rgba(22, 33, 62, 0.9);
    padding: 40px;
    border-radius: 20px;
    border: 6px dashed var(--border-color);
    box-shadow: 0 0 30px rgba(251, 133, 0, 0.3);
    max-width: 900px;
    z-index: 10;
}

h1 {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 50px;
    color: var(--text-primary);
    text-shadow: 3px 3px #000;
}

.characters {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 60px;
    margin-bottom: 50px;
}

.character-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
}

.characters img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
    transition: all 0.3s;
}

.tear {
    position: absolute;
    bottom: 50px;
    right: 80px;
    font-size: 2rem;
    animation: dropTear 1s ease-in;
}

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

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

.characters img.happy {
    animation: happyJump 0.5s infinite alternate;
    filter: drop-shadow(0 0 20px rgba(139, 195, 74, 0.5));
}

.characters img.shake {
    animation: errorShake 0.4s;
    filter: sepia(100%) hue-rotate(300deg) saturate(300%);
}

@keyframes happyJump {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-30px) scale(1.05);
    }
}

@keyframes errorShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-15px) rotate(-5deg);
    }

    50% {
        transform: translateX(15px) rotate(5deg);
    }

    75% {
        transform: translateX(-15px) rotate(-5deg);
    }

    100% {
        transform: translateX(0);
    }
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.btn {
    font-family: 'Press Start 2P', cursive;
    padding: 20px 40px;
    font-size: 1.2rem;
    border: 4px solid #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
    position: relative;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5);
}

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

.yes-btn:hover {
    background-color: var(--btn-yes-hover);
}

.no-btn {
    background-color: var(--btn-no);
    color: white;
}

.no-btn:hover {
    background-color: var(--btn-no-hover);
}

#message-area {
    margin-top: 40px;
    font-size: 1.2rem;
    color: #ffd166;
    animation: fadeIn 1s;
    line-height: 1.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hidden {
    display: none !important;
}

.run-away {
    animation: runRight 2s forwards;
}

@keyframes runRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Quiz Styles */
.quiz-question h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.quiz-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.quiz-btn {
    font-size: 1rem;
    padding: 15px;
}

.quiz-neutral-btn {
    background-color: var(--border-color);
    color: var(--bg-dark);
}

.quiz-neutral-btn:hover {
    background-color: var(--text-primary);
    color: white;
}

#btn-q3-no {
    transition: all 0.1s;
    /* Faster transition for escaping */
}

/* Floating Emojis */
.floating-emoji {
    position: absolute;
    bottom: -50px;
    font-size: 24px;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    animation: floatUp 5s linear forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

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

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 15px;
        max-width: 90%;
    }

    h1 {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .characters {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 30px;
    }

    .character-wrapper {
        width: 150px;
        height: 150px;
    }

    .buttons {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
    }

    .quiz-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
    }

    .quiz-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .tear {
        bottom: 30px;
        right: 40px;
        font-size: 1.5rem;
    }
}