/* ============================================
   🎨 EXAMINATION SYSTEM - PREMIUM THEME
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --info-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-gradient: linear-gradient(135deg, #0c3547 0%, #1a1a2e 100%);
    --card-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --card-hover-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ===== GLOBAL ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ANIMATED CLASSES ===== */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.4s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }
.delay-6 { animation-delay: 0.6s; opacity: 0; }

/* ===== APP BAR ===== */
.mud-appbar {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #01579b 100%) !important;
    background-size: 200% 200% !important;
    animation: gradientShift 8s ease infinite !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

.mud-appbar .mud-typography {
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* ===== DRAWER / SIDEBAR ===== */
.mud-drawer {
    background: linear-gradient(180deg, #f8f9fa 0%, #e8eaf6 100%) !important;
    border-right: 3px solid transparent !important;
}

.mud-nav-link {
    border-radius: 12px !important;
    margin: 4px 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-nav-link:hover {
    background: linear-gradient(135deg, #667eea20, #764ba220) !important;
    transform: translateX(5px) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
}

.mud-nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.mud-nav-link.active .mud-nav-link-icon {
    color: white !important;
}

.mud-navgroup-title {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 1.5px !important;
    color: #667eea !important;
    padding-left: 16px !important;
}

/* ===== CARDS ===== */
.mud-card {
    border-radius: 16px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--card-shadow) !important;
    overflow: hidden !important;
}

.mud-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--card-hover-shadow) !important;
}

/* ===== STAT CARDS (Dashboard) ===== */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.5s ease;
}

.stat-card:hover::before {
    transform: scale(2);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2) !important;
}

.stat-card-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.stat-card-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
}

.stat-card-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
}

.stat-card-warning {
    background: linear-gradient(135deg, #F2994A 0%, #F2C94C 100%) !important;
    color: white !important;
}

.stat-card-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    color: white !important;
}

.stat-card-error {
    background: linear-gradient(135deg, #f5576c 0%, #ff6b6b 100%) !important;
    color: white !important;
}

.stat-card .stat-number {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: countUp 0.8s ease-out;
}

.stat-card .stat-label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .stat-icon {
    font-size: 3rem !important;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    bottom: 15px;
}

/* ===== EXAM CARDS (Student) ===== */
.exam-card {
    border-radius: 20px !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transition: height 0.3s ease;
}

.exam-card:hover::before {
    height: 6px;
}

.exam-card:hover {
    transform: translateY(-12px) !important;
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.25) !important;
}

.exam-card .exam-subject-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 12px;
}

.exam-card .exam-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #555;
    font-size: 0.9rem;
}

.exam-card .exam-info-item .mud-icon-root {
    color: #667eea;
}

/* ===== BUTTONS ===== */
.mud-button-root.mud-button-filled {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

.mud-button-root.mud-button-filled:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25) !important;
}

.mud-button-root.mud-button-filled:active {
    transform: translateY(0) !important;
}

.btn-gradient-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.btn-start-exam {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
    border-radius: 14px !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-start-exam:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 35px rgba(17, 153, 142, 0.4) !important;
}

/* ===== TABLES ===== */
.mud-table {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: var(--card-shadow) !important;
}

.mud-table-head .mud-table-cell {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
    padding: 16px !important;
}

.mud-table-body .mud-table-row {
    transition: all 0.3s ease !important;
}

.mud-table-body .mud-table-row:hover {
    background: linear-gradient(135deg, #667eea08, #764ba208) !important;
    transform: scale(1.002) !important;
}

.mud-table-body .mud-table-cell {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* ===== CHIPS ===== */
.mud-chip {
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.chip-pass {
    background: linear-gradient(135deg, #11998e, #38ef7d) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3) !important;
}

.chip-fail {
    background: linear-gradient(135deg, #f5576c, #ff6b6b) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3) !important;
}

/* ===== HOME PAGE ===== */
.home-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px !important;
    padding: 60px 40px !important;
    color: white;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.home-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.home-hero h3 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 16px !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.home-hero p {
    font-size: 1.2rem !important;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== TIMER (Take Exam) ===== */
.timer-chip {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    padding: 10px 24px !important;
    border-radius: 14px !important;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}

.timer-danger {
    background: linear-gradient(135deg, #f5576c, #ff6b6b) !important;
    color: white !important;
    animation: pulse 0.5s infinite !important;
}

/* ===== PAGE CONTAINER ===== */
.page-container {
    animation: fadeInUp 0.5s ease-out;
}

/* ===== LOADING CONTAINER ===== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    animation: fadeInUp 0.5s ease-out;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .stat-card .stat-number {
        font-size: 1.8rem !important;
    }
    
    .home-hero {
        padding: 30px 20px !important;
    }
    
    .home-hero h3 {
        font-size: 1.6rem !important;
    }
}
