/* TIMER VISUAL */
.timer-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 8px;
    border-radius: 999px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 214, 10, 0.3);
}

#timer-label {
    /* Override existing styles specifically for this new layout if needed */
    font-size: 0.9rem !important;
    background: transparent !important;
    padding: 0 !important;
    width: 35px !important;
    text-align: right;
}

#timer-label::before {
    content: none !important;
    /* Remove old icon from ::before if it conflicts */
}

/* NEW: Track container that fills the space */
.timer-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.timer-bar {
    /* No flex: 1 here, otherwise width is ignored */
    height: 100%;
    width: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 1s linear, background 0.3s;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.timer-bar.warning {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(255, 214, 10, 0.4);
}

.timer-bar.danger {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 75, 92, 0.4);
    animation: pulseDanger 0.5s infinite alternate;
}

@keyframes pulseDanger {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.6;
    }
}

/* SHAKE ANIMATION FOR WRONG ANSWER */
@keyframes shakeScreen {
    0% {
        transform: translate(0, 0) rotate(0);
    }

    10% {
        transform: translate(-5px, -5px) rotate(-1deg);
    }

    20% {
        transform: translate(5px, 5px) rotate(1deg);
    }

    30% {
        transform: translate(-5px, 5px) rotate(0deg);
    }

    40% {
        transform: translate(5px, -5px) rotate(1deg);
    }

    50% {
        transform: translate(-5px, 0) rotate(-1deg);
    }

    100% {
        transform: translate(0, 0) rotate(0);
    }
}

.shake-effect {
    animation: shakeScreen 0.5s ease-in-out;
}