/* Modern Test System Animations & Effects */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Test Card Styles */
.test-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.test-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.test-card:hover::before {
    left: 100%;
}

/* Category Badge */
.category-badge {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.category-badge:hover::after {
    width: 200px;
    height: 200px;
}

/* Progress Bar Animation */
.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

/* Timer Animation */
.timer-container {
    animation: pulse 2s infinite;
}

.timer-warning {
    animation: bounce 1s infinite;
    color: #ff9800;
}

.timer-danger {
    animation: pulse 0.5s infinite;
    color: #f44336;
}

/* Question Card */
.question-card {
    animation: slideInRight 0.5s ease-out;
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Answer Option */
.answer-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.answer-option:hover {
    transform: translateX(8px);
    background: rgba(63, 81, 181, 0.05);
}

.answer-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.02);
}

.answer-option.correct {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    animation: pulse 0.5s;
}

.answer-option.incorrect {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    animation: bounce 0.5s;
}

/* Result Card */
.result-card {
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.result-passed {
    border-left: 5px solid #4caf50;
}

.result-failed {
    border-left: 5px solid #f44336;
}

/* Score Circle Animation */
.score-circle {
    position: relative;
    animation: rotate 1s ease-out;
}

/* Drag & Drop Area */
.drop-zone {
    border: 2px dashed #ccc;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.05);
}

.drop-zone.drag-over {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.02);
}

/* Loading Spinner */
.spinner-wrapper {
    animation: fadeIn 0.3s;
}

.spinner {
    animation: rotate 1s linear infinite;
}

/* Stats Card */
.stats-card {
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Floating Action Button */
.fab-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fab-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Tooltip */
.custom-tooltip {
    animation: fadeIn 0.2s;
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.gradient-bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Stagger Animation for Lists */
.stagger-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
