/* ================================================================
   FIGIG EXAMS - MODERN DESIGN SYSTEM
   Complete redesign with modern UI patterns
   ================================================================ */

/* ================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ================================================================ */
:root {
    /* Primary Colors */
    --primary-600: #6366f1;
    --primary-700: #4f46e5;
    --primary-800: #4338ca;

    /* Secondary Colors */
    --secondary-500: #06b6d4;
    --secondary-600: #0891b2;

    /* Accent Colors */
    --accent-pink: #ec4899;
    --accent-purple: #a855f7;

    /* Status Colors */
    --success-400: #4ade80;
    --success-500: #10b981;
    --success-600: #059669;

    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --error-400: #f87171;
    --error-500: #ef4444;
    --error-600: #dc2626;

    --info-400: #60a5fa;
    --info-500: #3b82f6;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Dark Navy for Sidebar */
    --navy-800: #1e293b;
    --navy-900: #0f172a;

    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */

    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   2. GLOBAL RESETS & BASE STYLES
   ================================================================ */
* {
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

/* ================================================================
   3. UTILITY CLASSES
   ================================================================ */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
}

.gradient-blue-cyan {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-500) 100%);
}

.gradient-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================================================
   4. BUTTON STYLES
   ================================================================ */
.btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-primary {
    background: var(--primary-600);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success-500);
    color: white;
}

.btn-success:hover {
    background: var(--success-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: var(--warning-500);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: var(--error-500);
    color: white;
}

.btn-danger:hover {
    background: var(--error-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-secondary {
    background: white;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

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

/* ================================================================
   5. CARD STYLES
   ================================================================ */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-hover-lift {
    transition: all var(--transition-base);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* ================================================================
   6. BADGE STYLES
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: var(--success-600);
}

.badge-warning {
    background: #fef3c7;
    color: var(--warning-600);
}

.badge-info {
    background: #dbeafe;
    color: var(--info-500);
}

.badge-pink {
    background: #fce7f3;
    color: var(--accent-pink);
}

.badge-purple {
    background: #f3e8ff;
    color: var(--accent-purple);
}

/* ================================================================
   7. INPUT STYLES
   ================================================================ */
.form-control, .form-select {
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: white;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

/* ================================================================
   8. ANIMATION KEYFRAMES
   ================================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================================================================
   9. LOGIN PAGE STYLES
   ================================================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.login-card {
    max-width: 480px;
    width: 100%;
    padding: var(--space-10);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 1;
    animation: scaleIn 0.5s ease-out;
}

.login-card h2 {
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.login-card .text-muted {
    color: var(--gray-600);
    margin-bottom: var(--space-8);
}

/* ================================================================
   10. MODERN APP SIDEBAR STYLES
   ================================================================ */

/* Main Sidebar Container */
.app-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%) !important;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    overflow: hidden !important;
}

.app-sidebar.collapsed {
    width: 80px !important;
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logo-container:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.logo-icon-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
}

.app-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.app-tagline {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}

.toggle-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.toggle-btn i {
    font-size: 16px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #6366f1;
    transform: translateX(4px);
    color: white;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.2);
    border-left-color: #6366f1;
    color: white;
    font-weight: 600;
}

.nav-item.active .nav-icon {
    color: #6366f1;
}

.nav-icon {
    font-size: 24px;
    min-width: 24px;
    width: 24px;
    text-align: center;
    transition: color 0.2s ease;
}

.nav-label {
    margin-left: 16px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .nav-label {
    opacity: 0;
    pointer-events: none;
}

.app-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px 12px;
}

/* User Section */
.sidebar-user {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.user-info {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .user-info {
    opacity: 0;
    pointer-events: none;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.user-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.dropdown-icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: #1e1b4b;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 8px;
    animation: slideUp 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-item i {
    font-size: 18px;
    min-width: 18px;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* Mobile Styles */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #1e1b4b;
    font-size: 24px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mobile-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
        animation: fadeIn 0.2s ease;
    }

    .app-sidebar.collapsed {
        width: 280px;
    }
}

/* Remove old sidebar styles compatibility */
.sidebar,
.nav-scrollable {
    display: none !important;
}

/* ================================================================
   MODERN HOME PAGE STYLES
   ================================================================ */

/* Container */
.modern-home-container {
    width: 100%;
    min-height: 100vh;
}

/* Hero Section */
.hero-section-modern {
    position: relative;
    min-height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Hero Background Image Support */
.hero-with-bg .hero-section-modern {
    background: transparent;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-background img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.75) 0%, rgba(168, 85, 247, 0.7) 100%);
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.6s both;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.success {
    background: #10b981;
}

.stat-icon.primary {
    background: #6366f1;
}

.stat-icon.warning {
    background: #f59e0b;
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 13px;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.6s ease 0.8s both;
    flex-wrap: wrap;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-modern {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary-modern {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary-modern:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Hero Decorations */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    animation: float 6s ease-in-out infinite;
}

.decoration-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.decoration-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: -2s;
}

.decoration-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

/* Features Section */
.features-section-modern {
    padding: 100px 40px;
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card-modern {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.feature-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 160px;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
    transition: all 0.3s ease;
}

.feature-card-modern:hover::before {
    opacity: 0.35;
    transform: scale(1.05);
}

.feature-card-modern > * {
    position: relative;
    z-index: 1;
}

.feature-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* Feature card backgrounds */
.feature-card-modern[data-feature="timed"]::before {
    background-image: url('https://images.unsplash.com/photo-1501139083538-0139583c060f?w=400&h=300&fit=crop&q=80');
}

.feature-card-modern[data-feature="progress"]::before {
    background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=300&fit=crop&q=80');
}

.feature-card-modern[data-feature="results"]::before {
    background-image: url('https://images.unsplash.com/photo-1569098644584-210bcd375b59?w=400&h=300&fit=crop&q=80');
}

.feature-card-modern[data-feature="certification"]::before {
    background-image: url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?w=400&h=300&fit=crop&q=80');
}

.feature-card-modern[data-feature="content"]::before {
    background-image: url('https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?w=400&h=300&fit=crop&q=80');
}

.feature-card-modern[data-feature="community"]::before {
    background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=400&h=300&fit=crop&q=80');
}

/* Prominent Feature Card (like exam cards) */
.feature-card-prominent {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.feature-card-prominent::before {
    display: none;
}

.feature-card-image-header {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
}

.feature-card-image-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: all var(--transition-base);
}

.feature-card-prominent:hover .feature-card-image-header img {
    transform: scale(1.1);
    opacity: 0.8;
}

.feature-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.feature-icon-wrapper-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    z-index: 2;
    box-shadow: var(--shadow-xl);
}

.feature-card-content {
    padding: 40px;
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
    font-size: 32px;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.feature-description {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

/* CTA Section */
.cta-section {
    padding: 100px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-cta-modern {
    background: white;
    color: #667eea;
    padding: 18px 40px;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-cta-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .quick-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-item {
        justify-content: center;
    }

    .section-title {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 32px;
    }
}

/* ================================================================
   11. CATALOG PAGE STYLES
   ================================================================ */
.catalog-hero {
    background: var(--gray-900);
    padding: var(--space-16) var(--space-8);
    border-radius: var(--radius-2xl);
    color: white;
    text-align: center;
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Catalog Hero Background Image */
.catalog-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.catalog-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    filter: blur(0px);
}

.catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92) 0%, rgba(168, 85, 247, 0.88) 50%, rgba(236, 72, 153, 0.85) 100%);
    z-index: 1;
    mix-blend-mode: multiply;
}

.catalog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    z-index: 2;
}

.catalog-hero > * {
    position: relative;
    z-index: 3;
}

.catalog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
}

.catalog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.catalog-filters {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 100;
    overflow: hidden;
}

/* Inline search bar fade effect when scrolled */
.inline-search-bar.faded {
    clip-path: inset(100%) !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

.catalog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.stat-box {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-box-clickable {
    cursor: pointer;
    border: 2px solid transparent;
}

.stat-box-clickable:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-600);
}

.stat-box-clickable i {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    color: var(--primary-600);
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-box-clickable:hover i {
    opacity: 1;
}

.stat-box h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-600);
    margin: 0;
}

.stat-box p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.875rem;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

@media (max-width: 1200px) {
    .exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .exam-grid {
        grid-template-columns: 1fr;
    }
}

.exam-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.exam-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-600);
}

/* Dynamic Background Image Support */
.exam-card-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
}

.exam-card-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.exam-card-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-base);
    opacity: 0.6;
}

.exam-card:hover .exam-card-header-bg img {
    transform: scale(1.1);
    opacity: 0.8;
}

.exam-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Editor Logo in Card Header */
.exam-card-logo {
    position: absolute;
    bottom: var(--space-4);
    left: var(--space-4);
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.exam-card-logo img {
    height: 24px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.exam-card-logo span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.exam-card-body {
    padding: var(--space-6);
    flex: 1;
    background: white;
    position: relative;
    z-index: 1;
}

.exam-card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.exam-badge-lock {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 10;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    flex-wrap: wrap;
}

.pagination-container .btn {
    transition: all var(--transition-base);
}

.pagination-container .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-container .btn-primary {
    box-shadow: var(--shadow-md);
}

.pagination-container .btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ================================================================
   12. EXAM TAKING PAGE STYLES
   ================================================================ */
.exam-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-6);
    padding: var(--space-4);
    max-width: 1400px;
    margin: 0 auto;
}

.exam-header {
    grid-column: 1 / -1;
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.timer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success-500);
    background: var(--gray-50);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
}

.timer-warning {
    color: var(--error-500) !important;
    animation: pulse 1s infinite;
}

.exam-body {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-out;
}

.question-card {
    margin-bottom: var(--space-6);
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.answer-option {
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.answer-option:hover {
    border-color: var(--primary-600);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

.answer-option input[type="radio"]:checked ~ .answer-text,
.answer-option input[type="checkbox"]:checked ~ .answer-text {
    font-weight: 600;
}

.exam-sidebar {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: var(--space-4);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.question-nav-btn {
    position: relative;
    padding: var(--space-3);
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
}

.question-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.question-nav-btn.current {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    box-shadow: var(--shadow-md);
}

.question-nav-btn.answered {
    background: var(--success-500);
    color: white;
    border-color: var(--success-500);
}

.question-nav-btn.flagged {
    border-color: var(--warning-500);
    background: #fef3c7;
}

/* ================================================================
   13. RESULTS PAGE STYLES
   ================================================================ */
.result-icon {
    font-size: 6rem;
    animation: scaleIn 0.5s ease-out;
}

.result-icon.success {
    color: var(--success-500);
}

.result-icon.failure {
    color: var(--error-500);
}

.stat-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.stat-label {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

.question-result-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--space-4);
    animation: fadeIn 0.5s ease-out;
}

.question-result-card.correct {
    border-left: 4px solid var(--success-500);
}

.question-result-card.incorrect {
    border-left: 4px solid var(--error-500);
}

/* ================================================================
   14. PROFILE PAGE STYLES
   ================================================================ */
.profile-avatar {
    font-size: 6rem;
    color: var(--primary-600);
    margin-bottom: var(--space-4);
}

.profile-stats .stat-item {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--gray-200);
}

/* ================================================================
   15. LOADING & SKELETON STYLES
   ================================================================ */
.spinner-border {
    animation: spin 1s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

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

/* ================================================================
   16. MODAL STYLES
   ================================================================ */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-2xl);
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: var(--space-6);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    padding: var(--space-6);
}

/* ================================================================
   17. RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 1024px) {
    .exam-container {
        grid-template-columns: 1fr;
    }

    .exam-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .catalog-hero h1 {
        font-size: 2rem;
    }

    .exam-grid {
        grid-template-columns: 1fr;
    }

    .question-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }

    .sidebar.show {
        transform: translateX(0);
    }
}

/* ================================================================
   18. MISC UTILITIES
   ================================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }
.text-success { color: var(--success-500); }
.text-danger { color: var(--error-500); }
.text-warning { color: var(--warning-500); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ================================================================
   19. SETTINGS PAGE STYLES
   ================================================================ */
.settings-page-container,
.help-page-container {
    padding: var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}

.settings-content,
.help-content {
    margin-top: var(--space-6);
}

.settings-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
    overflow: hidden;
}

.settings-card-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    color: white;
    padding: var(--space-6);
}

.settings-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.settings-card-body {
    padding: var(--space-6);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
}

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

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.setting-description {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.setting-value {
    font-weight: 500;
    color: var(--gray-700);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    border-radius: 24px;
    transition: var(--transition-base);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-600);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Save Notification */
.save-notification {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--success-500);
    color: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    z-index: 1000;
}

/* ================================================================
   20. HELP PAGE STYLES
   ================================================================ */
.quick-links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.quick-link-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.quick-link-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: white;
    font-size: 28px;
}

.quick-link-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.quick-link-card p {
    color: var(--gray-600);
    margin: 0;
}

/* FAQ Sections */
.faq-sections {
    margin-bottom: var(--space-8);
}

.faq-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
}

.faq-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-4) 0;
}

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

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.faq-question i {
    color: var(--primary-600);
    font-size: 1.25rem;
}

.faq-answer {
    padding: var(--space-4);
    color: var(--gray-700);
    line-height: 1.6;
}

.faq-answer ol,
.faq-answer ul {
    margin: var(--space-3) 0;
    padding-left: var(--space-6);
}

.faq-answer li {
    margin-bottom: var(--space-2);
}

/* Contact Support */
.contact-support-section {
    margin-top: var(--space-8);
}

.contact-support-card {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    color: white;
    text-align: center;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 40px;
}

.contact-support-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.contact-support-card > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-6);
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.contact-method {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: white;
    transition: var(--transition-base);
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-method i {
    font-size: 28px;
}

.contact-method h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-method p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.w-100 { width: 100%; }

/* ================================================================
   19. RESULTS PAGE - COMPLETE REDESIGN
   ================================================================ */

/* Page Container */
.modern-results-container {
    animation: fadeIn 0.3s ease-out;
}

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

/* Hero Section - 350px height */
.results-hero-new {
    height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.results-hero-new.hero-passed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.results-hero-new.hero-failed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.results-hero h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.results-hero .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--space-8);
    position: relative;
    z-index: 1;
}

/* Circular Progress Indicator */
.circular-progress {
    position: relative;
    display: inline-block;
    margin: var(--space-8) auto;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 12;
}

.progress-ring-circle {
    fill: none;
    stroke: white;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 628.32; /* 2 * PI * 100 */
    stroke-dashoffset: 628.32;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-percent {
    font-size: 2rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.modern-stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s ease forwards;
}

.modern-stat-card[data-delay="0"] { animation-delay: 0s; }
.modern-stat-card[data-delay="100"] { animation-delay: 0.1s; }
.modern-stat-card[data-delay="200"] { animation-delay: 0.2s; }
.modern-stat-card[data-delay="300"] { animation-delay: 0.3s; }

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--space-4);
}

.stat-icon.primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.stat-icon.success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; }
.stat-icon.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; }
.stat-icon.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

/* Performance Chart */
.performance-section {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
}

.performance-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.performance-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    height: 200px;
    padding: var(--space-4) 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary-600), var(--primary-700));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
    transition: all var(--transition-base);
    transform-origin: bottom;
    animation: barGrow 0.8s ease forwards;
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

.chart-bar:hover {
    background: linear-gradient(to top, var(--primary-700), var(--primary-800));
    transform: scaleY(1.05);
}

.chart-bar::after {
    content: attr(data-score) '%';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

/* Exam History Cards */
.history-section {
    margin-bottom: var(--space-8);
}

.history-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.history-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-4);
    border-left: 4px solid var(--gray-300);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.history-card.passed {
    border-left-color: var(--success-500);
}

.history-card.failed {
    border-left-color: var(--error-500);
}

.history-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.history-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-card.passed .history-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.history-card.failed .history-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.history-info {
    flex: 1;
}

.history-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.history-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.history-score {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.score-badge {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.history-card.passed .score-badge {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
}

.history-card.failed .score-badge {
    background: linear-gradient(135deg, var(--error-500), var(--error-600));
}

.history-actions .btn {
    white-space: nowrap;
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-hero {
        padding: var(--space-8) var(--space-4);
    }

    .results-hero h1 {
        font-size: 1.75rem;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .score-percent {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .performance-section,
    .history-section {
        padding: var(--space-6) var(--space-4);
    }

    .history-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-4);
    }

    .history-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .history-actions {
        width: 100%;
    }

    .history-actions .btn {
        width: 100%;
    }
}

/* ================================================================
   CATEGORY MODAL STYLES
   ================================================================ */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid var(--gray-200);
}

.category-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-600);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.category-icon-simple {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.category-item:hover .category-icon-simple {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-info h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.category-item .check-icon {
    font-size: 1.5rem;
    min-width: 24px;
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .category-grid {
        gap: var(--space-2);
    }

    .category-item {
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .category-icon-simple {
        width: 56px;
        height: 56px;
        min-width: 56px;
        font-size: 1.75rem;
    }

    .category-info h6 {
        font-size: 0.875rem;
    }

    .category-count {
        font-size: 0.75rem;
    }

    .category-item .check-icon {
        font-size: 1.25rem;
        min-width: 20px;
    }

    /* Adjust modal for mobile */
    .modal-dialog {
        margin: var(--space-4);
        max-width: calc(100% - var(--space-8));
    }

    .modal-body {
        padding: var(--space-4) !important;
        max-height: 70vh !important;
    }

    .modal-header h5 {
        font-size: 1.125rem;
    }
}

/* ================================================================
   VERSION SELECTION MODAL STYLES
   ================================================================ */
.version-item > div {
    padding: var(--space-4);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-item > div:hover {
    border-color: var(--primary-600);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.version-item > div:active {
    transform: scale(0.98) translateX(4px);
}

/* Mobile responsive for version items */
@media (max-width: 768px) {
    .version-item > div {
        padding: var(--space-3);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .version-item > div > div:last-child {
        align-self: flex-end;
    }
}

/* ================================================================
   DRAG AND DROP QUESTION STYLES
   ================================================================ */
.drag-drop-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
}

.drag-drop-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.drag-drop-item:hover {
    border-color: var(--primary-600);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.drag-drop-item:active {
    cursor: grabbing;
    opacity: 0.8;
}

.drag-handle {
    color: var(--gray-400);
    font-size: 1.5rem;
    cursor: grab;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-order-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.drag-content {
    flex: 1;
    font-size: 1rem;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Drag over state */
.drag-drop-item.drag-over {
    border-color: var(--primary-600);
    background: rgba(99, 102, 241, 0.05);
    border-style: solid;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .drag-drop-container {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    .drag-drop-item {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    .drag-order-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .drag-content {
        font-size: 0.875rem;
    }
}
