.options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.option {
    padding: 10px;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border: 3px solid transparent;
    text-align: left;
    transition: background-color 0.3s ease, border 0.4s ease-in-out;
}

.option:disabled {
    opacity: 0.5;
    color: #333;
    cursor: not-allowed;
}

.option span:nth-of-type(1) {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    text-align: center;
    line-height: 20px;
    margin-right: 10px;
    font-weight: normal;
}

.option:disabled span:nth-of-type(2) {
    position: relative;
    animation: lineThrough 0.4s ease-out forwards;
}

.option:disabled span:nth-of-type(2)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef4444;
    transform: scaleX(0);
    transform-origin: left;
    animation: drawLine 0.4s ease-out 0.2s forwards;
}

.question {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.correct {
    background-color: #4ade80;
    animation: jumpAndBounce .3s ease-in-out;
}

.incorrect {
    background-color: #f87171;
    color: #fff;
    animation: shake 1s ease-in-out;
}

.highlighted {
    animation: tada 0.8s ease-in-out;
    border: 3px dashed #4ade80;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: none;
    display: grid;
}

.progress-bar * {
    grid-row: 1;
    grid-column: 1;
}

.progress-bar-fill {
    height: inherit;
    border-radius: inherit;
    background-color: #4ade80;
    transition: width 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

@keyframes tada {
    0% {
        z-index: 100;
        transform: scale(1);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        z-index: 0;
        transform: scale(1) rotate(0);
    }
}

@keyframes jumpAndBounce {
    0% {
        z-index: 100;
        transform: scale(1);
    }
    85% {
        transform: scale(1.2);
    }
    100% {
        z-index: 0;
        transform: scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    60% {
        opacity: 1;
        transform: translateX(-20px);
    }
    80% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#multiple-choice {
    view-transition-name: game-container;
    flex: 1;
}

::view-transition-old(game-container) {
    animation: 0.5s ease-out both slideOut;
}

::view-transition-new(game-container) {
    animation: 1s ease-out both slideInBounce;
}

.game-wrapper {
    max-width: 800px;
    min-height: 300px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
}

.help-message {
    height: 24px;
    margin-bottom: 16px;
}

.help-message div {
    font-weight: 600;
    color: #ef4444;
    animation: flipIn 0.3s ease-in-out;
}

.score {
    justify-self: center;
}

.help {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.help-button {
    position: relative;
    padding: 10px 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.help-button:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.help-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.help-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.help-button .name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-button .amount {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.help-button:disabled .amount {
    background-color: #6b7280;
}

@keyframes lineThrough {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(0.98);
        filter: brightness(0.9);
    }
    100% {
        transform: scale(1);
        filter: brightness(0.8);
    }
}

@keyframes drawLine {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: rotateX(0deg);
    }
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    background: rgba(255, 0, 0, 0);
    display: block;
    visibility: visible;
}