:root {
    --accent: #3aa0ff; /* primary blue */
    --accent-2: #071014; /* dark/black */
    --panel-text: #ffffff;
    --button-bg: rgba(58, 160, 255, 0.12);
    --button-border: rgba(58, 160, 255, 0.35);
}

@font-face {
    font-family: 'Rajdhani';
    src: url('/assets/critical/fonts/Rajdhani/Rajdhani-Bold.ttf') format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: 'Rajdhani';
    src: url('/assets/critical/fonts/Rajdhani/Rajdhani-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Rajdhani', sans-serif;
    background: url('assets/math-bg-streched_final.webp') no-repeat center center;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--panel-text);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    
    background-color: transparent;
}

#app {
    width: 85%;
    max-width: 650px;
    min-height: 350px;
    background: url('assets/question-frame-strched_final.png') no-repeat center center;
    background-size: 100% 100%;
    padding: 45px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: absolute;
    bottom: 60px;
    margin-top: 50px;
    /* animation: appEntrance 0.8s cubic-bezier(0.22, 0.7, 0.3, 1) forwards; */
    /* will-change: transform, opacity;
    backface-visibility: hidden; */
}

@keyframes appEntrance {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(-15%); /* This brings it to roughly 70% screen height position */
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 40px rgba(58, 160, 255, 0.25), inset 0 0 30px rgba(10,30,80,0.08), 0 20px 40px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 60px rgba(58, 160, 255, 0.35), inset 0 0 40px rgba(10,30,80,0.12), 0 20px 40px rgba(0, 0, 0, 0.5); }
}

#question-container {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#prompt {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #fff;
    text-shadow: 0 0 8px rgba(58,160,255,0.35), 0 2px 4px rgba(0,0,0,0.8);
    line-height: 1.4;
    min-height: 30px;
}

#prompt.loading {
    font-size: 0;
    color: transparent;
    visibility: hidden;
    margin: 0;
    min-height: 0;
}

#prompt:empty,
#prompt:only-child {
    display: none;
}

#options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 90%;
    margin: 5px 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn {
    background: linear-gradient(135deg, rgba(58,160,255,0.18) 0%, rgba(10,30,80,0.08) 100%);
    border: 2px solid var(--button-border);
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    box-shadow: 0 4px 12px rgba(10,30,80,0.18);
    position: relative;
    overflow: hidden;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn:hover {
    background: linear-gradient(135deg, rgba(58,160,255,0.48) 0%, rgba(10,30,80,0.12) 100%);
    border-color: #fff;
    color: #fff;
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 30px rgba(58,160,255,0.25), 0 0 20px rgba(10,30,80,0.08);
    text-shadow: 0 0 6px rgba(58,160,255,0.45);
}

.option-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 3px 10px rgba(10,30,80,0.25);
}

#input-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}

#answer-input {
    flex: 1;
    max-width: 280px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid var(--accent-2);
    background: --accent;
    color: #000;
    text-align: center;
    outline: none;
    box-shadow: inset 0 2px 10px --accent;
    min-height: 35px;
}

#submit-btn {
    flex: 0 0 auto;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    background: var(--accent);
    color: #071014;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 3px 0 #4f826a;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#submit-btn:hover {
    background: rgba(58,160,255,0.9);
    transform: translateY(-3px);
    box-shadow: 0 7px 0 rgba(5,40,80,0.6), 0 5px 18px rgba(58,160,255,0.18);
}

#submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 #4f826a;
}

/* Feedback Animations */
.correct-flash {
    animation: correctPulse 0.6s ease-out;
}

@keyframes correctPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.15) drop-shadow(0 0 10px rgba(58,160,255,0.45)); }
    100% { filter: brightness(1); }
}

.wrong-flash {
    animation: wrongShake 0.5s ease-out;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-15px); }
    40% { transform: translateX(15px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #app {
        padding: 50px 30px;
    }
    #prompt {
        font-size: 24px;
    }
    .option-btn {
        padding: 12px;
        font-size: 18px;
    }
}
