/**
 * Reflex College Exam System - Custom Styles
 * Clean, modern, and professional design for nursing college
 */

/* ===== GLOBAL STYLES ===== */
:root {
    /* Reflex College Brand Colors */
    --primary-color: #1e4d72;        /* Deep professional blue */
    --secondary-color: #2c3e50;      /* Dark slate blue */
    --accent-color: #0066cc;         /* Bright medical blue */
    --tertiary-color: #4a90a4;      /* Light medical blue */
    --success-color: #27ae60;       /* Medical green */
    --warning-color: #f39c12;       /* Professional orange */
    --danger-color: #e74c3c;        /* Medical red */
    --light-gray: #f8f9fa;         /* Clean background */
    --medium-gray: #e9ecef;        /* Subtle borders */
    --dark-gray: #6c757d;          /* Professional text */
    --white: #ffffff;              /* Pure white */
    --text-dark: #2c3e50;          /* Professional text */
    --text-light: #6c757d;         /* Secondary text */
    --border-radius: 8px;          /* Consistent radius */
    --box-shadow: 0 4px 12px rgba(30, 77, 114, 0.15);  /* Professional shadow */
    --transition: all 0.3s ease;   /* Smooth transitions */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-gray);
    overflow-x: hidden;
    padding-bottom: 60px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-page {
    background: linear-gradient(135deg, #1e4d72 0%, #4a90a4 50%, #0066cc 100%);
    min-height: 100vh;
}

/* College Branding Section */
.college-branding {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 50%, var(--accent-color) 100%);
    color: var(--white);
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.college-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.branding-content {
    text-align: center;
    z-index: 2;
    position: relative;
    max-width: 400px;
    padding: 2rem;
}

.college-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.college-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.college-location {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.exam-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.exam-info p {
    opacity: 0.8;
    font-size: 1rem;
}

/* Main container padding for footer */
.container-fluid.vh-100 {
    padding-bottom: 60px; /* Space for fixed footer */
}

/* Login Container */
.login-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px;
    margin: 1rem;
}

.mobile-logo {
    color: var(--primary-color);
}

.mobile-logo i {
    font-size: 3rem;
}

.login-header {
    margin-bottom: 2rem;
}

.login-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--dark-gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 77, 114, 0.25);
    background-color: var(--white);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.input-group .btn-outline-secondary {
    border: 2px solid var(--medium-gray);
    border-left: none;
    color: var(--dark-gray);
}

.input-group .form-control:focus + .btn-outline-secondary {
    border-color: var(--primary-color);
}

/* Button Styles */
.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-transform: none;
    box-shadow: var(--box-shadow);
}

.btn-login:hover {
    background: linear-gradient(135deg, #163a5f 0%, #0052a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 77, 114, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Checkbox Styles */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #fdf2f2;
    color: var(--danger-color);
}

.alert-success {
    background-color: #f0f9f4;
    color: var(--success-color);
}

/* Help Section */
.login-help {
    margin-top: 2rem;
}

.help-text {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Footer for desktop */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 0;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--white);
    z-index: 1000;
}

/* Footer for mobile */
.login-footer-mobile {
    position: static;
    padding: 1rem 0;
    color: rgba(255, 255, 255, 0.8);
    background: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991.98px) {
    .login-container {
        padding: 2rem 1.5rem;
        margin: 0.5rem;
    }
    
    .college-name {
        font-size: 1.8rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .login-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .college-name {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
    
    .btn-login {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .login-footer-mobile {
        font-size: 0.85rem;
        padding: 0.75rem 0;
    }
}

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

.login-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Focus visible for accessibility */
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .login-page {
        display: none;
    }
}

@media (max-width: 768px) {
    .h-100 {
        height: auto !important;
    }
}

/* ===== NAVBAR STYLES ===== */
/* Custom Navbar Background with Animation */
.navbar-custom {
    background: #2c3e50 !important;
    position: relative;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    will-change: auto;
}

.navbar-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.7), transparent);
    animation: shimmer 6s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

.navbar-custom > * {
    position: relative;
    z-index: 2;
}

/* Shimmer Animation - Optimized to prevent scroll interference */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Custom Navbar Styles */
.navbar-brand img {
    max-height: 57px;
    width: auto;
}

.student-profile-container {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.student-profile-container:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.student-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.student-initials {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
}

.student-profile-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.student-photo-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-initials-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.75rem;
}

.student-dropdown {
    min-width: 280px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.student-dropdown .dropdown-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem;
    border: none;
}

.student-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.student-dropdown .dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.student-dropdown .dropdown-item.text-danger:hover {
    background-color: #fee;
    color: var(--danger-color);
}

/* Navbar responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-brand .brand-text {
        font-size: 1.1rem;
    }
    
    .student-profile-container {
        width: 35px;
        height: 35px;
    }
    
    .student-dropdown {
        min-width: 250px;
    }
}

/* Navigation active state */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* ===== STUDENT PROFILE PAGE STYLES ===== */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--tertiary-color) 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.profile-photo-container {
    position: relative;
    margin-bottom: 1rem;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.info-card h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--success-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
}

.info-label i {
    margin-right: 0.5rem;
    color: var(--success-color);
    width: 20px;
}

.info-value {
    color: #212529;
    text-align: right;
    font-weight: 500;
}

.badge-custom {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.profile-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Profile page responsive styles */
@media (max-width: 768px) {
    .profile-header {
        text-align: center;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
    }
}

/* ===== DASHBOARD STYLES ===== */
/* Modern Exam Card Design */
.exam-card-modern {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid #f0f0f0;
}

.exam-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Status Strip */
.exam-status-strip {
    height: 4px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.exam-status-strip.status-submitted { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.exam-status-strip.status-active { background: linear-gradient(90deg, #f39c12, #e67e22); }
.exam-status-strip.status-pending { background: linear-gradient(90deg, #3498db, #2980b9); }
.exam-status-strip.status-expired { background: linear-gradient(90deg, #e74c3c, #c0392b); }

/* Card Content */
.exam-card-content {
    padding: 1.5rem;
    padding-top: 1.75rem;
}

/* Header */
.exam-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.exam-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.exam-title-area {
    flex: 1;
    min-width: 0;
}

.exam-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.exam-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exam-status-badge.status-submitted { background: #d4edda; color: #155724; }
.exam-status-badge.status-active { background: #fff3cd; color: #856404; }
.exam-status-badge.status-pending { background: #d1ecf1; color: #0c5460; }
.exam-status-badge.status-expired { background: #f8d7da; color: #721c24; }

/* Details */
.exam-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Status Message */
.exam-status-msg {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
}

/* Action Button */
.exam-action {
    margin-top: auto;
}

.exam-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.exam-btn.btn-submitted {
    background: #27ae60;
    color: white;
}

.exam-btn.btn-submitted:hover {
    background: #229954;
    transform: translateY(-1px);
}

.exam-btn.btn-active {
    background: #f39c12;
    color: white;
}

.exam-btn.btn-active:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.exam-btn.btn-pending {
    background: #3498db;
    color: white;
}

.exam-btn.btn-pending:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.exam-btn.btn-expired {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
}

.exam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .exam-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .exam-card-content {
        padding: 1.25rem;
        padding-top: 1.5rem;
    }
    
    .exam-header {
        gap: 0.75rem;
    }
    
    .exam-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .exam-title {
        font-size: 1rem;
    }
}

/* Legacy exam card styles for fallback */
.exam-card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.exam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.exam-card .card-header {
    border-bottom: 2px solid #f8f9fa;
}

.exam-info {
    font-size: 0.9rem;
}

.exam-info i {
    width: 16px;
    text-align: center;
}

/* Exam status badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Alert modifications for exams */
.alert.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.alert small {
    margin: 0;
    font-weight: 500;
}

/* Dashboard welcome card */
.card.bg-primary .opacity-75 {
    opacity: 0.75;
}

/* Quick stats styling */
.border-end {
    border-right: 1px solid #dee2e6 !important;
}

@media (max-width: 767.98px) {
    .border-end {
        border-right: none !important;
        border-bottom: 1px solid #dee2e6 !important;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .border-end:last-child {
        border-bottom: none !important;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

/* Button improvements */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Card hover effects */
.card {
    transition: all 0.2s ease;
}

/* ===== EXAM PAGE STYLES ===== */
.exam-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-container {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.countdown-display {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin: 2rem 0;
            flex-wrap: wrap;
}

.time-segment {
            background: linear-gradient(145deg, #1a1a2e, #16213e);
            border-radius: 12px;
            padding: 1rem;
            min-width: 80px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            box-shadow: 
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 4px 8px rgba(0,0,0,0.3),
                0 0 20px rgba(0,123,255,0.2);
            border: 1px solid rgba(0,123,255,0.3);
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
}

.time-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.time-number {
            font-size: 2.5rem;
            font-weight: 700;
            color: #00ff88;
            font-family: 'Courier New', monospace;
            text-shadow: 0 0 10px rgba(0,255,136,0.5);
            display: block;
            line-height: 1;
}

.time-label {
    font-size: 0.75rem;
    color: #00aaff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: 500;
}

.countdown-label {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.countdown-warning {
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
            0%, 100% { 
                box-shadow: 
                    inset 0 1px 0 rgba(255,255,255,0.1),
                    0 4px 8px rgba(0,0,0,0.3),
                    0 0 20px rgba(255,0,0,0.5);
                border-color: rgba(255,0,0,0.5);
            }
            50% { 
                box-shadow: 
                    inset 0 1px 0 rgba(255,255,255,0.1),
                    0 4px 8px rgba(0,0,0,0.3),
                    0 0 30px rgba(255,0,0,0.8);
                border-color: rgba(255,0,0,0.8);
            }
}

.countdown-warning .time-number {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255,68,68,0.8);
}

.countdown-warning .time-label {
    color: #ff6666;
}

.exam-details-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.exam-details-card .card-body {
    padding: 2rem;
}

.exam-details-card .card-header {
    padding: 1.25rem 2rem;
}

.info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    display: inline-block;
    min-width: 100px;
}

.start-exam-btn {
    font-size: 1.5rem;
    padding: 1rem 3rem;
    border-radius: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.start-exam-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954, #1e8449);
}

.error-container {
    text-align: center;
    padding: 3rem;
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Exam page responsive styles */
@media (max-width: 768px) {
    .countdown-display {
        gap: 0.5rem;
    }
    
    .time-segment {
        min-width: 60px;
        padding: 0.75rem;
    }
    
    .time-number {
        font-size: 1.8rem;
    }
    
    .time-label {
        font-size: 0.65rem;
    }
    
    .countdown-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .start-exam-btn {
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
    }
}

/* ===== START EXAM PAGE STYLES ===== */
/* Fullscreen exam styles */
.exam-page-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
}

/* Ensure fullscreen coverage */
.exam-page-body:fullscreen,
.exam-page-body:-webkit-full-screen,
.exam-page-body:-moz-full-screen,
.exam-page-body:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.exam-container-fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

.exam-header-sticky {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.exam-content-main {
    flex: 1;
    padding: 2rem 0;
}

.question-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: none;
}

.question-number {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.question-text {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.option-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.option-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(5px);
}

.option-item.selected {
    background: #e8f5e8;
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.option-item input[type="radio"] {
    margin: 0 1rem;
    transform: scale(1.2);
}

.subjective-answer {
    width: 100%;
    min-height: 150px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.subjective-answer:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Fixed Bottom Navigation Bar */
.exam-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    border-top: 2px solid rgba(0, 123, 255, 0.1);
}

.exam-nav-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.exam-nav-btn:active {
    transform: scale(0.95);
}

.exam-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.exam-nav-prev {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.exam-nav-prev:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268, #495057);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.exam-nav-next {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-next:hover:not(:disabled) {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #1e7e34, #155724);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.timer-display {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.timer-warning {
    animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    }
    50% { 
        box-shadow: 0 4px 25px rgba(220, 53, 69, 0.6);
        transform: scale(1.05);
    }
}

.progress-indicator {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-bar-custom {
    background: linear-gradient(45deg, #28a745, #20c997);
    height: 8px;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.exam-submitted {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.submitted-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.exam-nav-next:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.exam-nav-submit {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    min-width: 90px;
}

.exam-nav-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e7e34, #155724);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.exam-nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.question-indicator {
    background: rgba(0, 123, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #007bff;
    border: 2px solid rgba(0, 123, 255, 0.2);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .exam-content-main {
        padding: 1rem;
        padding-bottom: 80px;
    }
    
    .question-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .exam-bottom-nav {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }
    
    .exam-nav-btn {
        padding: 0.5rem 0.8rem;
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    .nav-text {
        display: none;
    }
    
    .exam-nav-btn i {
        margin: 0;
    }
    
    .question-indicator {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .timer-display {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .exam-bottom-nav {
        padding: 0.5rem;
        gap: 0.3rem;
    }
    
    .exam-nav-btn {
        padding: 0.45rem 0.6rem;
        min-width: 50px;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    
    .question-indicator {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .exam-nav-center {
        flex: 0.8;
    }
}

/* ===== SCROLL PERFORMANCE OPTIMIZATIONS ===== */
/* Prevent scroll interference from animations */
.container, .container-fluid {
    will-change: auto;
}

/* Optimize transforms for better performance */
.info-card, .student-profile-container, .exam-card {
    will-change: transform;
}

/* Ensure smooth scrolling behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .navbar-custom::before {
        animation: none !important;
    }
}

/* ===== NAVBAR ENHANCEMENTS ===== */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 5px;
    border-radius: 20px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.navbar-nav .nav-link i {
    opacity: 0.8;
}

/* ===== EXAM REPORT STYLES ===== */
.stat-box {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 77, 114, 0.2);
}

.stat-box h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-box p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Report Table Styles */
#resultsTable {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

#resultsTable thead th, 
#resultsTable tfoot th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 15px;
    border: none;
}

#resultsTable tbody tr {
    transition: var(--transition);
}

#resultsTable tbody tr:hover {
    background-color: rgba(30, 77, 114, 0.05);
    transform: scale(1.001);
}

#resultsTable td {
    padding: 15px;
    vertical-align: middle;
    border-color: var(--medium-gray);
}

/* Badge Improvements */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 20px;
}

/* Percentage Badges */
.badge.bg-success {
    background: linear-gradient(135deg, var(--success-color), #2ecc71) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #f1c40f) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b) !important;
}

/* Modal Enhancements */
.modal-xl {
    max-width: 95%;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Accordion Improvements */
.accordion-item {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius) !important;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-button {
    background: var(--light-gray);
    border: none;
    color: var(--text-dark);
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 77, 114, 0.25);
}

.accordion-body {
    background: var(--white);
    padding: 20px;
}

/* Answer Option Styles */
.bg-light-success {
    background-color: rgba(39, 174, 96, 0.1) !important;
    border-color: var(--success-color) !important;
}

.bg-light-danger {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border-color: var(--danger-color) !important;
}

/* Empty State Styles */
.text-center.py-5 {
    padding: 60px 20px !important;
}

.text-center.py-5 i {
    opacity: 0.3;
}

/* Export Button */
.btn-success {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    border: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 77, 114, 0.15);
}

.card-header {
    background: var(--white);
    border-bottom: 2px solid var(--medium-gray);
    font-weight: 600;
    color: var(--primary-color);
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--primary-color);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .stat-box {
        margin-bottom: 10px;
        padding: 15px;
    }
    
    .stat-box h3 {
        font-size: 2rem;
    }
    
    #resultsTable {
        font-size: 0.85rem;
    }
    
    #resultsTable thead th,
    #resultsTable td {
        padding: 10px 8px;
    }
    
    .modal-xl {
        max-width: 98%;
    }
}

@media (max-width: 576px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-success {
        width: 100%;
    }
}