/* Custom Animations */
@keyframes float {

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

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

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Retro Terminal Styles */
#terminal-screen {
    background-color: #050505;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
}

.crt-overlay {
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 3px, 3px 100%;
    animation: flicker 0.15s infinite;
}

#terminal-content {
    text-shadow: 0 0 5px rgba(34, 197, 94, 0.8);
}

.terminal-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.highlight-gold {
    color: #fbbf24;
    text-shadow: 0 0 10px #fbbf24, 0 0 20px #b91c1c;
}

.highlight-red {
    color: #ef4444;
    text-shadow: 0 0 10px #ef4444;
}

@keyframes flicker {
    0% {
        opacity: 0.97;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.98;
    }
}

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

.cmd-block {
    animation: slideIn 0.2s ease-out;
}

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

    50% {
        transform: scale(1.1);
    }

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

@keyframes lift {
    0% {
        transform: translateY(0);
    }

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

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

@keyframes goal {
    0% {
        transform: rotate(0);
    }

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

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-roar {
    animation: roar 1s ease-in-out infinite;
}

.animate-lift {
    animation: lift 1s ease-in-out infinite;
}

.animate-goal {
    animation: goal 1s ease-in-out infinite;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Button Styles - Converted from Tailwind @apply for browser compatibility */
.btn-primary {
    width: 100%;
    background: linear-gradient(to right, #b91c1c, #dc2626);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s;
    border-bottom: 4px solid #7f1d1d;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.02);
    background: linear-gradient(to right, #dc2626, #ef4444);
}

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

.btn-secondary {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

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

.btn-option {
    width: 100%;
    background-color: rgba(31, 41, 55, 0.5);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    cursor: pointer;
}

.btn-option:hover {
    background-color: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
}

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

.btn-option.selected {
    background-color: #eab308;
    border-color: #facc15;
    color: black;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.btn-option.correct {
    background-color: #22c55e;
    border-color: #4ade80;
    color: white;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.btn-option.wrong {
    background-color: #ef4444;
    border-color: #f87171;
    color: white;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* Shake Animation for Wrong Answer */
@keyframes shake {

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

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

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}