@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

.animate-pulse-green {
    animation: pulse-green 2s infinite;
}

.animate-spin-slow {
    animation: spin-slow 1s linear infinite;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #059669;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin-slow 1s linear infinite;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #064e3b;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Card hover effects */
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Button ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.ripple:active:after {
    width: 200px;
    height: 200px;
}

/* Question card animation */
.question-enter {
    animation: fade-in 0.4s ease-out;
}

/* Progress bar */
.progress-bar {
    transition: width 0.3s ease;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Active navigation item */
.nav-item.active {
    background-color: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.nav-item.active i {
    color: #059669;
}

/* Sidebar transitions */
#mobileSidebar {
    transition: transform 0.3s ease-in-out;
}

/* Desktop sidebar hover effect */
.nav-item:hover i {
    transform: translateX(3px);
}

.nav-item i {
    transition: transform 0.2s ease;
}
/* Timer Styles */
.timer-container {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 50px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.timer-icon {
    font-size: 1.2rem;
    color: #ffd700;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.timer-warning {
    animation: timer-pulse 1s infinite;
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.timer-critical {
    animation: timer-shake 0.5s infinite;
    background: linear-gradient(135deg, #991b1b, #dc2626);
}

@keyframes timer-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes timer-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.timer-expired {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    animation: timer-pulse 0.5s infinite;
}