        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

        :root {
            --primary-blue: #1e7e34;
            --button-blue: #1e7e34;
            --text-color: #333;
            --label-color: #666;
            background: linear-gradient(135deg, #000000, #333333); /* Dark Black to Dark Gray */
            --container-bg: #fff;
            --border-color: #ccc;
            --alert-bg: #fff;
            --alert-header-bg: #a40e1f;
            --alert-button-confirm: #007bff;
            --alert-button-cancel: #6c757d;
            --disabled-color: #a0a0a0;
            --disabled-bg: #e0e0e0;
            --logout-button-bg: #dc3545; /* Red for logout */
            --stats-button-bg: #f0ad4e; /* Orange for stats */
            --roadsigns-button-bg: #28a745; /* Green for road signs */
            --history-button-bg: #007bff; /* Blue for history */
            --spinner-color: var(--primary-blue);
        }
        

        body {
            font-family: 'Roboto', sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
        }

        .exam-container {
            background-color: var(--container-bg);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 30px;
            width: 100%;
            max-width: 900px;
            position: relative;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        /* Flex container for top-right controls */
        .top-right-controls {
            display: flex;
            flex-wrap: wrap; /* Allows items to wrap to a new line */
            justify-content: flex-end; /* Aligns items to the right */
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .language-switcher {
            display: flex;
            align-items: center;
            gap: 10px;
            order: -1; /* Puts language switcher first on small screens */
        }

        .language-switcher label {
            font-size: 0.9rem;
            color: var(--label-color);
        }

        .language-switcher select {
            padding: 5px 10px;
            border-radius: 5px;
            border: 1px solid var(--border-color);
            font-size: 0.9rem;
            color: var(--text-color);
            background-color: #fff;
        }

        .content-sections {
            display: flex;
            gap: 20px;
            justify-content: space-between;
        }

        .section {
            background-color: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #e9ecef;
            flex-grow: 1;
        }

        .section.large {
            flex-basis: 50%;
        }

        .section h2 {
            font-size: 1.4rem;
            font-weight: 500;
            color: var(--primary-blue);
            margin-top: 0;
            margin-bottom: 20px;
            text-transform: sentence;
        }

        .entry {
            display: flex;
            flex-direction: column;
            margin-bottom: 15px;
        }

        .label {
            font-size: 0.9rem;
            color: var(--label-color);
            margin-bottom: 3px;
        }

        .value {
            font-size: 1rem;
            font-weight: 500;
            color: var(--text-color);
        }

        .cta-section {
            margin-top: 40px;
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
        }

        .cta-button {
            background-color: var(--button-blue);
            color: white;
            padding: 15px 30px;
            font-size: 1.2rem;
            font-weight: bold;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease;
        }

        .cta-button:hover {
            background-color: #0056b3;
        }

        /* New CSS for disabled button */
        .cta-button:disabled {
            background-color: var(--disabled-bg);
            color: var(--disabled-color);
            cursor: not-allowed;
            opacity: 1;
        }

        .cta-button .checkmark {
            margin-right: 10px;
            font-size: 1.5rem;
            line-height: 1;
        }

        /* Modal/Alert Styling */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .alert-box {
            background: var(--alert-bg);
            border-radius: 5px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            width: 90%;
            max-width: 500px;
            overflow: hidden;
        }
        
        .alert-header {
            background-color: var(--alert-header-bg);
            color: white;
            padding: 15px 20px;
            font-size: 1.2rem;
            font-weight: bold;
            text-align: center;
        }

        .alert-content {
            padding: 20px;
            text-align: left;
        }

        .alert-content p {
            font-size: 1rem;
            color: #555;
            line-height: 1.6;
            margin: 0 0 20px 0;
        }

        .alert-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .alert-buttons button {
            padding: 10px 20px;
            font-size: 1rem;
            font-weight: bold;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .alert-buttons .cancel-btn {
            background-color: var(--alert-button-cancel);
            color: white;
        }

        .alert-buttons .cancel-btn:hover {
            background-color: #5a6268;
        }

        .alert-buttons .confirm-btn {
            background-color: var(--alert-button-confirm);
            color: white;
        }

        .alert-buttons .confirm-btn:hover {
            background-color: #0056b3;
        }

        /* New button styling for logout and stats */
        .top-right-controls .button {
            padding: 8px 15px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            text-decoration: none;
            text-align: center;
            transition: background-color 0.3s ease, color 0.3s ease;
            cursor: pointer;
            border: none;
        }

        .logout-button {
            background-color: var(--logout-button-bg);
            color: white;
        }

        .logout-button:hover {
            background-color: #c82333;
        }
        
        .stats-button {
            background-color: var(--stats-button-bg);
            color: white;
        }
        .roadsigns-button {
            background-color: var(--roadsigns-button-bg);
            color: white;
        }

        .history-button {
            background-color: var(--history-button-bg);
            color: white;
        }

        .history-button:hover {
            background-color: #0056b3;
        }

        .stats-button:hover {
            background-color: #d58c27;
        }

        /* Styles for the new stats modal */
        .stats-modal .alert-header {
            background-color: var(--primary-blue);
        }

        .stats-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            font-size: 1rem;
        }

        .stats-table th, .stats-table td {
            text-align: left;
            padding: 10px;
            border-bottom: 1px solid var(--border-color);
        }

        .stats-table th {
            background-color: #f1f1f1;
            font-weight: 500;
        }
        
        .stats-table tr:last-child td {
            border-bottom: none;
        }

        /* New CSS for fancy logout modal */
        .alert-header.logout-header {
            background-color: var(--logout-button-bg);
        }

        /* Spinner Styles */
        .spinner-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1001;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid var(--spinner-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .content-sections {
                flex-direction: column;
            }

            .section.large {
                flex-basis: 100%;
            }

            .top-right-controls {
                flex-direction: column;
                align-items: stretch;
                position: relative;
                top: auto;
                right: auto;
                margin-bottom: 20px;
            }

            .top-right-controls .button, .language-switcher {
                width: 100%;
            }

            .language-switcher {
                margin-bottom: 10px;
            }
        }
    