        :root {
            --exam-primary: #6366f1;
            --exam-primary-dark: #4f46e5;
            --exam-danger: #ef4444;
            --exam-success: #10b981;
            --exam-warning: #f59e0b;
            --exam-bg: #f8fafc;
            --exam-card: #ffffff;
            --exam-text: #0f172a;
            --exam-text-muted: #64748b;
            --exam-border: #e2e8f0;
        }

        .exam-wrapper * {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .exam-wrapper {
            background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
            min-height: 100vh;
            padding: 2rem 0;
        }

        /* Header with Timer */
        .exam-header-top {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1rem 0;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .exam-timer-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        .exam-timer-box {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            font-weight: 700;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .exam-timer-box.warning {
            background: var(--exam-warning);
            animation: pulse 1.5s infinite;
        }

        .exam-timer-box.critical {
            background: var(--exam-danger);
            animation: shake 0.5s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-3px);
            }

            75% {
                transform: translateX(3px);
            }
        }

        .exam-progress-stats {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            font-weight: 600;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        /* Main Container */
        .exam-main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            gap: 2rem;
            align-items: flex-start;
        }

        .exam-content {
            flex: 1;
            background: var(--exam-card);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 1px solid var(--exam-border);
        }

        /* Welcome Screen */
        .welcome-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            align-items: start;
        }

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

        .welcome-header i {
            font-size: 4rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 1rem;
        }

        .welcome-header h2 {
            font-size: 2rem;
            font-weight: 800;
            color: var(--exam-text);
            margin-bottom: 0.5rem;
        }

        .welcome-header p {
            color: var(--exam-text-muted);
            font-size: 1.1rem;
        }

        .student-info {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .input-group label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--exam-text);
        }

        .input-group input {
            width: 100%;
            padding: 1rem;
            border: 2px solid var(--exam-border);
            border-radius: 12px;
            font-size: 1rem;
            transition: all 0.3s;
        }

        .input-group input:focus {
            outline: none;
            border-color: var(--exam-primary);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }

        .instruction-card {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-left: 4px solid var(--exam-primary);
            padding: 2rem;
            border-radius: 12px;
        }

        .instruction-card h4 {
            color: var(--exam-primary-dark);
            margin-bottom: 1.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .instruction-card ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .instruction-card li {
            padding: 0.37rem 0;
            color: var(--exam-text);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .instruction-card li i {
            color: var(--exam-primary);
        }

        .btn-start {
            width: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1.2rem 2rem;
            border: none;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            margin-top: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.3s;
        }

        .btn-start:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        }

        /* Question Screen */
        .question-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 2px solid var(--exam-border);
        }

        .question-number {
            font-size: 0.95rem;
            color: var(--exam-text-muted);
            font-weight: 600;
            background: var(--exam-bg);
            padding: 0.5rem 1rem;
            border-radius: 8px;
        }

        .question-marks {
            font-size: 0.9rem;
            color: var(--exam-success);
            font-weight: 600;
            background: rgba(16, 185, 129, 0.1);
            padding: 0.5rem 1rem;
            border-radius: 8px;
        }

        .question-text {
            font-size: 1.35rem;
            font-weight: 600;
            line-height: 1.6;
            margin-bottom: 2rem;
            color: var(--exam-text);
        }

        .options {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .option-label {
            display: flex;
            align-items: center;
            padding: 1.25rem 1.5rem;
            border: 2px solid var(--exam-border);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1.05rem;
            background: var(--exam-card);
            position: relative;
        }

        .option-label:hover {
            background: #f8fafc;
            border-color: var(--exam-primary);
            transform: translateX(4px);
        }

        .option-label.selected {
            border-color: var(--exam-primary);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.02) 100%);
            font-weight: 600;
        }

        .option-label input[type="radio"] {
            width: 20px;
            height: 20px;
            margin-right: 1rem;
            cursor: pointer;
            accent-color: var(--exam-primary);
        }

        .option-letter {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            background: var(--exam-bg);
            border-radius: 8px;
            font-weight: 700;
            margin-right: 1rem;
            color: var(--exam-text-muted);
            transition: all 0.3s;
        }

        .option-label.selected .option-letter {
            background: var(--exam-primary);
            color: white;
        }

        /* Navigation Buttons */
        .nav-buttons {
            margin-top: 2.5rem;
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .btn {
            padding: 1rem 2rem;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

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

        .btn-primary:hover {
            background: var(--exam-primary-dark);
        }

        .btn-secondary {
            background: var(--exam-bg);
            color: var(--exam-text);
            border: 2px solid var(--exam-border);
        }

        .btn-secondary:hover {
            background: #e2e8f0;
        }

        .btn-danger {
            background: var(--exam-danger);
            color: white;
            margin-left: auto;
        }

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

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

        /* Sidebar */
        .sidebar {
            width: 320px;
            background: var(--exam-card);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 1px solid var(--exam-border);
            position: sticky;
            top: 2rem;
        }

        .sidebar-header h4 {
            color: var(--exam-text);
            font-weight: 700;
            font-size: 1.1rem;
            margin: 0 0 1.5rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .palette-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 1.5rem;
        }

        .palette-btn {
            aspect-ratio: 1;
            border: 2px solid var(--exam-border);
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
            color: var(--exam-text);
            font-size: 0.95rem;
        }

        .palette-btn:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .palette-btn.active {
            background: var(--exam-primary);
            color: white;
            border-color: var(--exam-primary-dark);
            transform: scale(1.12);
        }

        .palette-btn.answered {
            background: var(--exam-success);
            color: white;
            border-color: #059669;
        }

        .palette-btn.visited {
            background: #e0e7ff;
            border-color: #c7d2fe;
            color: var(--exam-primary-dark);
        }

        .sidebar-stats {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            padding: 1rem;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-radius: 12px;
        }

        .stat-item {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            font-size: 0.9rem;
        }

        .stat-label {
            color: var(--exam-text-muted);
        }

        .stat-value {
            font-weight: 700;
            color: var(--exam-text);
        }

        /* Result Screen */
        .result-container {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 1rem;
        }

        .result-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            align-items: start;
        }

        .result-left {
            background: var(--exam-card);
            border-radius: 24px;
            padding: 3rem;
            text-align: center;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
            border: 1px solid var(--exam-border);
            position: relative;
            overflow: hidden;
        }

        .result-left::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .result-right {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .result-icon {
            font-size: 5rem;
            margin-bottom: 1.5rem;
        }

        .result-icon.pass {
            color: var(--exam-success);
            animation: scaleIn 0.6s ease;
        }

        .result-icon.fail {
            color: var(--exam-warning);
            animation: scaleIn 0.6s ease;
        }

        @keyframes scaleIn {
            0% {
                transform: scale(0);
                opacity: 0;
            }

            50% {
                transform: scale(1.2);
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .result-left h2 {
            font-size: 2.2rem;
            font-weight: 800;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .student-name {
            font-size: 1.4rem;
            color: var(--exam-text-muted);
            margin-bottom: 2rem;
        }

        .score-big {
            font-size: 5rem;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 1.5rem 0;
            line-height: 1;
        }

        .percentage {
            font-size: 2rem;
            font-weight: 700;
            color: var(--exam-text);
            margin-bottom: 1rem;
        }

        .result-status {
            display: inline-block;
            padding: 0.75rem 2rem;
            border-radius: 50px;
            font-weight: 700;
            font-size: 1.1rem;
            margin: 1.5rem 0;
        }

        .result-status.pass {
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
        }

        .result-status.fail {
            background: rgba(245, 158, 11, 0.1);
            color: #d97706;
        }

        .result-info-card {
            background: var(--exam-card);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 1px solid var(--exam-border);
        }

        .result-info-card h3 {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--exam-text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .result-info-card h3 i {
            color: var(--exam-primary);
        }

        .result-details {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .detail-card {
            background: var(--exam-bg);
            padding: 1.25rem;
            border-radius: 12px;
            border: 1px solid var(--exam-border);
            text-align: center;
            transition: all 0.3s;
        }

        .detail-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        }

        .detail-label {
            font-size: 0.85rem;
            color: var(--exam-text-muted);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }

        .detail-value {
            font-size: 1.8rem;
            font-weight: 800;
            color: var(--exam-text);
        }

        .detail-card.correct .detail-value {
            color: var(--exam-success);
        }

        .detail-card.wrong .detail-value {
            color: var(--exam-danger);
        }

        .detail-card.time .detail-value {
            color: var(--exam-primary);
        }

        .detail-card.percent .detail-value {
            color: var(--exam-warning);
        }

        .exam-summary {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-radius: 20px;
            padding: 2rem;
            border: 1px solid var(--exam-border);
        }

        .exam-summary h3 {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--exam-text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .exam-summary h3 i {
            color: var(--exam-primary);
        }

        .summary-item {
            display: flex;
            justify-content: space-between;
            padding: 1rem 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

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

        .summary-label {
            color: var(--exam-text-muted);
            font-weight: 500;
        }

        .summary-value {
            font-weight: 700;
            color: var(--exam-text);
        }

        .result-footer {
            margin-top: 2rem;
            text-align: center;
            color: var(--exam-text-muted);
            font-size: 0.95rem;
        }

        .result-footer i {
            color: var(--exam-primary);
            margin-right: 0.5rem;
        }

        /* Responsive */
        @media (max-width: 992px) {
            .exam-main {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                position: static;
            }

            .welcome-container {
                grid-template-columns: 1fr;
            }

            .result-wrapper {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .exam-timer-container {
                flex-direction: column;
                gap: 1rem;
            }

            .exam-timer-box,
            .exam-progress-stats {
                width: 100%;
                justify-content: center;
            }

            .palette-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .result-details {
                grid-template-columns: 1fr;
            }

            .result-left {
                padding: 2rem 1.5rem;
            }

            .score-big {
                font-size: 3.5rem;
            }
        }

        .fade-in {
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

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

        .option-label {
            padding: 0.5rem;
        }

       .question-header{
            padding-bottom: 0.5rem;
            margin-bottom: 0.5rem;
        }