/* SmartExam AI Custom Styles */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

/* General Styles */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Timer Styles */
.timer-warning {
    color: #f59e0b;
    animation: pulse 1s infinite;
}

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

/* Question Styles */
.question-card {
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Option Styles */
.option-label {
    transition: all 0.2s ease;
    cursor: pointer;
}

.option-label:hover {
    background-color: #f3f4f6;
    border-color: #6366f1;
}

.option-label.selected {
    background-color: #e0e7ff;
    border-color: #4f46e5;
}

.option-label.selected .option-check {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* Progress Bar */
.progress-step {
    position: relative;
    z-index: 1;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active::after {
    background: #4f46e5;
}

.progress-step.completed::after {
    background: #10b981;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.badge-silver {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.badge-bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

/* Leaderboard Styles */
.leaderboard-item {
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(10px);
    background-color: #f9fafb;
}

.leaderboard-rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.leaderboard-rank-2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.leaderboard-rank-3 {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Certificate Styles */
.certificate {
    background: white;
    border: 20px solid #4f46e5;
    padding: 40px;
    position: relative;
}

.certificate::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #e5e7eb;
    pointer-events: none;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Responsive Tables */
@media (max-width: 768px) {
    .responsive-table {
        border: 0;
    }
    
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
    }
    
    .responsive-table td {
        display: block;
        text-align: right;
        padding: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .responsive-table td:last-child {
        border-bottom: 0;
    }
    
    .responsive-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
    }
}