     :root {
            --primary-color: #3b82f6;
            --secondary-color: #64748b;
            --success-color: #10b981;
            --warning-color: #f59e0b;
            --danger-color: #ef4444;
            --accent-color: #8b5cf6;
            --bg-color: #f8fafc;
            --card-bg: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #475569;
            --text-tertiary: #94a3b8;
            --border-color: #e2e8f0;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --radius-sm: 0.375rem;
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            --radius-xl: 1rem;
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--bg-color);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 1rem;
        }

        /* Header Styles */
        header {
            background: var(--card-bg);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow-sm);
        }

        nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 2rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            color: var(--text-primary);
            font-weight: 700;
            font-size: 1.25rem;
        }

        .logo-icon {
            font-size: 1.5rem;
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 2rem;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-secondary);
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: var(--radius-md);
            transition: all 0.2s ease;
        }

        .nav-links a:hover,
        .nav-links a.active {
            background: var(--primary-color);
            color: white;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .user-details {
            display: flex;
            flex-direction: column;
        }

        .user-name {
            font-weight: 600;
            font-size: 0.875rem;
        }

        .user-badge {
            font-size: 0.75rem;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .logout-btn {
            background: var(--danger-color);
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .logout-btn:hover {
            background: #dc2626;
        }

        /* Mobile Navigation */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-primary);
            cursor: pointer;
            padding: 0.5rem;
        }

        .mobile-nav-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .mobile-nav-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .mobile-nav-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 300px;
            height: 100vh;
            background: var(--card-bg);
            z-index: 999;
            transition: right 0.3s ease;
            box-shadow: var(--shadow-lg);
            overflow-y: auto;
        }

        .mobile-nav-menu.open {
            right: 0;
        }

        .mobile-nav-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .mobile-nav-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 700;
        }

        .mobile-close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-primary);
            cursor: pointer;
            padding: 0.25rem;
        }

        .mobile-nav-content {
            padding: 1rem;
        }

        .mobile-nav-links {
            list-style: none;
            margin-bottom: 2rem;
        }

        .mobile-nav-links a {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            text-decoration: none;
            color: var(--text-secondary);
            border-radius: var(--radius-md);
            margin-bottom: 0.5rem;
            transition: all 0.2s ease;
        }

        .mobile-nav-links a:hover,
        .mobile-nav-links a.active {
            background: var(--primary-color);
            color: white;
        }

        .mobile-user-section {
            border-top: 1px solid var(--border-color);
            padding-top: 1rem;
        }

        .mobile-user-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        /* Test Container */
        .test-container {
            max-width: 900px;
            margin: 0 auto;
            background: var(--card-bg);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
        }

        .test-header {
            background: linear-gradient(135deg, var(--primary-color), #2563eb);
            color: white;
            padding: 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .test-title h2 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        .security-badge {
            background: rgba(255, 255, 255, 0.2);
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 600;
        }

        .timer {
            background: rgba(255, 255, 255, 0.2);
            padding: 1rem 1.5rem;
            border-radius: var(--radius-lg);
            font-size: 1.5rem;
            font-weight: 700;
            font-family: 'Courier New', monospace;
            min-width: 120px;
            text-align: center;
            border: 2px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
        }

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

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

        .progress-container {
            padding: 1.5rem 2rem;
            border-bottom: 1px solid var(--border-color);
        }

        .progress-text {
            text-align: center;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-secondary);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--border-color);
            border-radius: 9999px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-color), #2563eb);
            border-radius: 9999px;
            transition: width 0.3s ease;
        }

        .test-content {
            padding: 2rem;
        }

        /* Question Styles */
        .question-container {
            animation: slideIn 0.3s ease;
        }

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

        .question-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .question-number {
            color: var(--text-tertiary);
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }

        .question-category {
            display: inline-block;
            padding: 0.5rem 1rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .question-text {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1rem;
            line-height: 1.4;
        }

        .answer-input-container {
            margin: 2rem 0;
            text-align: center;
        }

        .answer-input {
            width: 100%;
            max-width: 300px;
            padding: 1rem 1.5rem;
            font-size: 1.25rem;
            border: 2px solid var(--border-color);
            border-radius: var(--radius-lg);
            text-align: center;
            transition: all 0.2s ease;
            background: var(--card-bg);
            font-weight: 600;
        }

        .answer-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .answer-input:invalid {
            border-color: var(--danger-color);
        }

        /* Mobile Keypad */
        .mobile-keypad {
            display: none;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
            max-width: 300px;
            margin: 1rem auto 0;
            padding: 1rem;
            background: var(--bg-color);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-color);
        }

        .keypad-btn {
            aspect-ratio: 1;
            font-size: 1.25rem;
            font-weight: 600;
            border: 1px solid var(--border-color);
            background: var(--card-bg);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 50px;
        }

        .keypad-btn:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

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

        .keypad-btn.delete {
            background: var(--danger-color);
            color: white;
            border-color: var(--danger-color);
        }

        .keypad-btn.delete:hover {
            background: #dc2626;
        }

        .keypad-btn.clear {
            background: var(--warning-color);
            color: white;
            border-color: var(--warning-color);
        }

        .keypad-btn.clear:hover {
            background: #d97706;
        }

        .navigation-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 3rem;
            gap: 1rem;
            flex-wrap: wrap;
        }

        /* Button Styles */
        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: var(--radius-md);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
        }

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

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

        .btn.primary:hover:not(:disabled) {
            background: #2563eb;
        }

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

        .btn.secondary:hover:not(:disabled) {
            background: #475569;
        }

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

        .btn.success:hover:not(:disabled) {
            background: #059669;
        }

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

        .btn.danger:hover:not(:disabled) {
            background: #dc2626;
        }

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

        .btn.warning:hover:not(:disabled) {
            background: #d97706;
        }

        /* Alert Styles */
        #alertContainer {
            position: fixed;
            top: 100px;
            right: 20px;
            z-index: 1000;
            max-width: 400px;
        }

        .alert {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-bottom: 0.5rem;
            box-shadow: var(--shadow-md);
            animation: slideInRight 0.3s ease;
            transition: all 0.3s ease;
        }

        .alert.success {
            border-color: var(--success-color);
            background: #f0fdf4;
            color: #166534;
        }

        .alert.warning {
            border-color: var(--warning-color);
            background: #fffbeb;
            color: #92400e;
        }

        .alert.error {
            border-color: var(--danger-color);
            background: #fef2f2;
            color: #991b1b;
        }

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

        /* Security Overlay */
        .security-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(239, 68, 68, 0.95);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            color: white;
            text-align: center;
        }

        .security-message {
            background: rgba(255, 255, 255, 0.1);
            padding: 2rem;
            border-radius: var(--radius-xl);
            max-width: 500px;
            margin: 1rem;
        }

        /* Dialog Styles */
        .dialog-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .dialog-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .dialog {
            background: var(--card-bg);
            border-radius: var(--radius-xl);
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: var(--shadow-lg);
            animation: dialogSlideIn 0.3s ease;
        }

        @keyframes dialogSlideIn {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .dialog-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }

        .dialog-icon {
            font-size: 1.5rem;
        }

        .dialog-icon.warning {
            color: var(--warning-color);
        }

        .dialog-icon.danger {
            color: var(--danger-color);
        }

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

        .dialog-title {
            font-weight: 700;
            font-size: 1.125rem;
        }

        .dialog-content {
            padding: 1.5rem;
        }

        .dialog-message {
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }

        .dialog-actions {
            display: flex;
            gap: 1rem;
            justify-content: flex-end;
        }

        /* Loading Styles */
        .loading-container {
            text-align: center;
            padding: 3rem 2rem;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 3px solid var(--border-color);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 1.5rem;
        }

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

        .loading-text {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .loading-subtext {
            color: var(--text-tertiary);
        }

        /* Message Styles */
        .message {
            text-align: center;
            padding: 2rem;
            border-radius: var(--radius-lg);
            margin: 2rem 0;
        }

        .message.success {
            background: #f0fdf4;
            border: 2px solid var(--success-color);
            color: #166534;
        }

        .message.error {
            background: #fef2f2;
            border: 2px solid var(--danger-color);
            color: #991b1b;
        }

        .message.warning {
            background: #fffbeb;
            border: 2px solid var(--warning-color);
            color: #92400e;
        }

        .date-banner {
            background: linear-gradient(135deg, var(--success-color), #059669);
            color: white;
            padding: 1rem;
            border-radius: var(--radius-lg);
            font-weight: 600;
            text-align: center;
            margin-bottom: 1.5rem;
        }

        /* Utility Classes */
        .fade-in {
            animation: fadeIn 0.5s ease;
        }

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

        /* Responsive Design */
        @media (max-width: 768px) {
            .nav-links,
            .user-info {
                display: none;
            }

            .mobile-menu-toggle {
                display: block;
            }

            .mobile-nav-overlay {
                display: block;
            }

            .container {
                padding: 1rem;
            }

            nav {
                padding: 1rem;
            }

            .test-header {
                padding: 1.5rem;
                text-align: center;
            }

            .test-header h2 {
                font-size: 1.25rem;
            }

            .timer {
                font-size: 1.25rem;
                padding: 0.75rem 1rem;
            }

            .test-content {
                padding: 1.5rem;
            }

            .question-text {
                font-size: 1.25rem;
            }

            .navigation-buttons {
                flex-direction: column;
                align-items: stretch;
            }

            .navigation-buttons > div {
                text-align: center;
                order: 1;
            }

            .navigation-buttons > button {
                width: 100%;
            }

            .mobile-keypad {
                display: grid;
            }

            #alertContainer {
                left: 20px;
                right: 20px;
                max-width: none;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0.5rem;
            }

            .test-container {
                border-radius: 0;
                margin: 0;
            }

            .answer-input {
                font-size: 1.125rem;
                padding: 0.875rem 1.25rem;
            }

            .keypad-btn {
                min-height: 45px;
                font-size: 1.125rem;
            }
        }