  :root {
            --navbar-bg: #2E7D32;
            --hero-bg: #4CAF50;
            --body-bg: #e8f5e9;
            --btn-bg: #2E7D32;
            --text-dark: #333;
            --text-light: #fff;
            --sidebar-answered: #1E88E5;
            --sidebar-unanswered: #e0e0e0;
            --sidebar-current-border: #1565C0;
            --warning-yellow: #F9A825;
            --danger-red: #D32F2F;
            --correct-green: #2E7D32;
            --incorrect-red: #C62828;
            --card-bg: #fff;
            --shadow: 0 2px 12px rgba(0,0,0,0.1);
            --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
            --radius: 10px;
            --radius-sm: 5px;
            --transition: 0.3s;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: 'Arial', sans-serif;
            background-color: #e8f5e9;
            color: #333;
            margin: 0;
            padding: 0;
            line-height: 1.6;
            min-height: 100vh;
        }
        .navbar {
            background-color: #2E7D32;
            color: #fff;
            padding: 12px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        .navbar .brand { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.5px; }
        .navbar .timer-display {
            font-size: 1.4rem;
            font-weight: 700;
            font-family: 'Courier New', monospace;
            padding: 6px 16px;
            border-radius: 20px;
            background: rgba(255,255,255,0.15);
            min-width: 90px;
            text-align: center;
            transition: all 0.4s;
        }
        .navbar .timer-display.warning-yellow {
            background: #F9A825; color: #333; animation: pulse-yellow 1s infinite;
        }
        .navbar .timer-display.warning-red {
            background: #D32F2F; color: #fff; animation: pulse-red 0.6s infinite;
        }
        @keyframes pulse-yellow {
            0%,100%{ box-shadow: 0 0 0 0 rgba(249,168,37,0.6); }
            50%{ box-shadow: 0 0 0 14px rgba(249,168,37,0); }
        }
        @keyframes pulse-red {
            0%,100%{ box-shadow: 0 0 0 0 rgba(211,47,47,0.7); }
            50%{ box-shadow: 0 0 0 16px rgba(211,47,47,0); }
        }
        .hero {
            background-color: #4CAF50;
            color: white;
            padding: 20px;
            text-align: center;
            border-radius: 10px;
            margin: 30px auto;
            max-width: 800px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.2);
        }
        .hero h1 { font-size: 2rem; margin-bottom: 10px; }
        .hero .set-details { font-size: 1rem; opacity: 0.9; margin-bottom: 6px; }
        .hero .set-meta {
            display: flex;
            justify-content: center;
            gap: 30px;
            flex-wrap: wrap;
            margin: 16px 0;
        }
        .hero .meta-item {
            background: rgba(255,255,255,0.2);
            padding: 10px 18px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 1rem;
        }
        .hero .meta-item span { display: block; font-size: 1.6rem; font-weight: 700; }
        .hero .btn-start {
            display: inline-block;
            width: auto;
            min-width: 200px;
            padding: 14px 40px;
            background: #fff;
            color: #2E7D32;
            border: 2px solid #fff;
            border-radius: 30px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .hero .btn-start:hover {
            background: #2E7D32;
            color: #fff;
            border-color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.25);
        }
        .hero .btn-start:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
        button {
            width: 100%;
            padding: 12px;
            background: #2E7D32;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.3s;
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        button:hover { background: #1B5E20; }
        button:active { transform: scale(0.98); }
        button.btn-nav { width: auto; padding: 10px 22px; border-radius: 25px; font-size: 0.95rem; }
        button.btn-submit {
            width: auto;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 1rem;
            background: #F57C00;
            letter-spacing: 1px;
        }
        button.btn-submit:hover { background: #E65100; }
        button:disabled { opacity: 0.55; cursor: not-allowed; }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.55);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            animation: fadeIn 0.2s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .modal-dialog {
            background: #fff;
            border-radius: 16px;
            padding: 30px 28px;
            max-width: 450px;
            width: 90%;
            box-shadow: 0 20px 50px rgba(0,0,0,0.3);
            text-align: center;
            animation: slideUp 0.25s ease;
        }
        @keyframes slideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .modal-dialog .warning-icon { font-size: 3.5rem; margin-bottom: 10px; }
        .modal-dialog h3 { font-size: 1.4rem; color: #D32F2F; margin-bottom: 8px; }
        .modal-dialog p { font-size: 0.95rem; color: #555; margin-bottom: 10px; line-height: 1.5; }
        .modal-dialog .modal-buttons { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
        .modal-dialog .modal-buttons button {
            flex: 1;
            padding: 12px 20px;
            border-radius: 30px;
            font-weight: 700;
            font-size: 0.95rem;
            letter-spacing: 0.5px;
            transition: all 0.3s;
            cursor: pointer;
        }
        .btn-cancel { background: #e0e0e0; color: #333; border: 2px solid #ccc; }
        .btn-cancel:hover { background: #d0d0d0; }
        .btn-submit-warning { background: #D32F2F; color: #fff; border: 2px solid #B71C1C; }
        .btn-submit-warning:hover { background: #B71C1C; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(211,47,47,0.4); }
        .modal-dialog .unanswered-count {
            font-weight: 700; color: #E65100; background: #FFF3E0;
            display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; margin: 6px 0;
        }

        .test-container {
            display: flex;
            gap: 20px;
            max-width: 1200px;
            margin: 20px auto;
            padding: 0 20px;
            min-height: calc(100vh - 160px);
        }
        .question-area { flex: 1; min-width: 0; }
        .question-card {
            background: #fff;
            border-radius: 10px;
            padding: 28px 24px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            margin-bottom: 16px;
            border-left: 5px solid #4CAF50;
            transition: all 0.3s;
        }
        .question-card .q-number { font-weight: 700; color: #2E7D32; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
        .question-card .q-text { font-size: 1.15rem; font-weight: 600; color: #222; margin-bottom: 18px; line-height: 1.5; }
        .options-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
        .options-list li {
            padding: 13px 16px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 10px;
            background: #fafafa;
            user-select: none;
        }
        .options-list li:hover { border-color: #4CAF50; background: #f1f8e9; box-shadow: 0 2px 8px rgba(76,175,80,0.15); }
        .options-list li.selected {
            border-color: #2E7D32;
            background: #e8f5e9;
            font-weight: 600;
            box-shadow: 0 0 0 3px rgba(46,125,50,0.2);
        }
        .options-list li .option-letter {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #e0e0e0;
            font-weight: 700;
            font-size: 0.9rem;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .options-list li.selected .option-letter { background: #2E7D32; color: #fff; }

        .nav-buttons {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 8px;
        }
        .nav-left { flex: 1; text-align: left; }
        .nav-center { flex: 0 0 auto; text-align: center; }
        .nav-right { flex: 1; text-align: right; }

        .sidebar {
            width: 260px;
            flex-shrink: 0;
            background: #fff;
            border-radius: 10px;
            padding: 20px 16px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            align-self: flex-start;
            position: sticky;
            top: 80px;
            max-height: calc(100vh - 100px);
            overflow-y: auto;
        }
        .sidebar h3 { text-align: center; color: #2E7D32; margin-bottom: 6px; font-size: 1rem; }
        .sidebar .total-questions { text-align: center; font-weight: 700; font-size: 1.3rem; color: #333; margin-bottom: 4px; }
        .sidebar .answered-count { text-align: center; font-size: 0.85rem; color: #666; margin-bottom: 14px; }
        .sidebar .answered-count strong { color: #1E88E5; }
        .sidebar .q-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
        .sidebar .q-grid .q-dot {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
            background: #e0e0e0;
            color: #555;
            min-width: 36px;
            user-select: none;
        }
        .sidebar .q-grid .q-dot.answered { background: #1E88E5; color: #fff; border-color: #1565C0; box-shadow: 0 2px 6px rgba(30,136,229,0.35); }
        .sidebar .q-grid .q-dot.current {
            border-color: #1565C0;
            box-shadow: 0 0 0 4px rgba(21,101,192,0.3);
            transform: scale(1.08);
            z-index: 2;
            position: relative;
        }
        .sidebar .q-grid .q-dot:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
        .sidebar .legend { display: flex; gap: 16px; justify-content: center; margin-top: 14px; font-size: 0.75rem; color: #666; }
        .sidebar .legend span { display: flex; align-items: center; gap: 5px; }
        .sidebar .legend .dot-sample { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
        .sidebar .legend .dot-sample.blue { background: #1E88E5; }
        .sidebar .legend .dot-sample.gray { background: #e0e0e0; }
        .results-container { max-width: 900px; margin: 20px auto; padding: 0 20px 40px; }
        .results-header {
            background: #fff;
            border-radius: 10px;
            padding: 24px 28px;
            text-align: center;
            box-shadow: 0 2px 12px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .results-header .score-circle {
            display: inline-block;
            width: 130px;
            height: 130px;
            border-radius: 50%;
            background: #e8f5e9;
            border: 6px solid #4CAF50;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin: 10px auto;
        }
        .results-header .score-circle .score-num { font-size: 2.6rem; font-weight: 700; color: #2E7D32; }
        .results-header .score-circle .score-denom { font-size: 0.95rem; color: #666; }
        .results-header .percentage { font-size: 1.3rem; font-weight: 600; color: #2E7D32; margin-top: 6px; }
        .result-card {
            background: #fff;
            border-radius: 10px;
            padding: 20px 24px;
            margin-bottom: 12px;
            box-shadow: 0 1px 8px rgba(0,0,0,0.06);
            border-left: 5px solid #e0e0e0;
            transition: all 0.3s;
        }
        .result-card.correct { border-left-color: #4CAF50; background: #f9fdf9; }
        .result-card.incorrect { border-left-color: #D32F2F; background: #fef9f9; }
        .result-card .r-q-text { font-weight: 600; margin-bottom: 10px; font-size: 1rem; }
        .result-card .r-options { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
        .result-card .r-options li { padding: 7px 12px; border-radius: 5px; background: #f5f5f5; display: flex; align-items: center; gap: 8px; }
        .result-card .r-options li.user-answer { font-weight: 700; border: 2px solid #D32F2F; background: #ffebee; }
        .result-card .r-options li.correct-answer { font-weight: 700; border: 2px solid #4CAF50; background: #e8f5e9; }
        .result-card .r-options li.both-correct { font-weight: 700; border: 2px solid #4CAF50; background: #c8e6c9; }
        .result-card .r-badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }
        .result-card .r-badge.correct-badge { background: #c8e6c9; color: #2E7D32; }
        .result-card .r-badge.incorrect-badge { background: #ffcdd2; color: #C62828; }

        .image-fallback i { margin-right: 8px; color: #ffa726; }
        @media (max-width: 640px) {
            .inline-image { max-height: 200px; }
            .option-image { max-height: 120px; }
        }
        img[src]:not([src=""]) { min-height: 40px; background: #f5f5f5; }
        @media (max-width: 768px) {
            .test-container { flex-direction: column-reverse; padding: 0 10px; margin: 10px auto; }
            .sidebar { width: 100%; position: static; max-height: none; padding: 14px 10px; border-radius: 8px; }
            .sidebar .q-grid { grid-template-columns: repeat(8, 1fr); gap: 5px; }
            .sidebar .q-grid .q-dot { font-size: 0.7rem; min-width: 28px; border-radius: 4px; }
            .hero { margin: 15px 10px; padding: 16px 14px; }
            .hero h1 { font-size: 1.4rem; }
            .hero .set-meta { gap: 12px; }
            .hero .meta-item { padding: 8px 12px; font-size: 0.85rem; }
            .hero .meta-item span { font-size: 1.2rem; }
            .navbar { padding: 10px 14px; gap: 8px; }
            .navbar .brand { font-size: 1rem; }
            .navbar .timer-display { font-size: 1.1rem; padding: 5px 12px; min-width: 70px; }
            .question-card { padding: 18px 14px; }
            .question-card .q-text { font-size: 1rem; }
            .nav-buttons { flex-wrap: wrap; gap: 8px; }
            .nav-left, .nav-right { flex: 0 0 auto; }
            .nav-center { order: 2; width: 100%; text-align: center; }
            button.btn-nav { padding: 8px 14px; font-size: 0.85rem; }
            button.btn-submit { padding: 10px 20px; font-size: 0.9rem; }
            .results-container { padding: 0 10px 30px; }
            .results-header .score-circle { width: 100px; height: 100px; }
            .results-header .score-circle .score-num { font-size: 2rem; }
            .modal-dialog { padding: 24px 18px; }
        }
        @media (max-width: 400px) {
            .sidebar .q-grid { grid-template-columns: repeat(6, 1fr); gap: 4px; }
            .sidebar .q-grid .q-dot { font-size: 0.65rem; min-width: 24px; }
            .hero .set-meta { flex-direction: column; gap: 8px; align-items: center; }
        }
