        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
             --tirtiary-color: #00c04b;
            --accent-color: #4895ef;
            --correct-color: #4caf50;
            --incorrect-color: #f44336;
            --neutral-color: #f8f9fa;
            --text-color: #343a40;
            --light-text: #6c757d;
            --unanswered-color: #e6f2ff;
            --vh: 1vh;
        }
        
        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: var(--text-color);
            background-color: #f0f2f5;
            min-height: 100vh;
            min-height: calc(var(--vh, 1vh) * 100);
            
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            cursor: default;
        }
        
        .container {
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
            padding: 1rem;
            min-height: calc(var(--vh, 1vh) * 100 - 2rem);
            display: flex;
            flex-direction: column;
        }
        
        header {
            text-align: center;
            margin-bottom: 1.5rem;
            padding: 1.5rem 1rem;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        header h1 {
            margin: 0;
            font-size: clamp(1.3rem, 4vw, 2rem);
        }
        
        header p {
            margin-top: 0.5rem;
            font-size: clamp(0.9rem, 2.5vw, 1rem);
            opacity: 0.9;
        }
        
 .controls {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1.5rem;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 0.75rem 1rem;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.95rem;
            font-weight: 600;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            white-space: nowrap;
        }
        
        .btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .btn:active {
            transform: translateY(0);
        }
        
        .btn:disabled {
            background-color: #cccccc;
            color: #666666;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .btn-group {
            display: flex;
            gap: 0.5rem;
        }
        
        .progress-container {
            background-color: #e9ecef;
            border-radius: 20px;
            height: 8px;
            width: 100%;
            margin-bottom: 1.5rem;
            overflow: hidden;
        }
        
        .progress-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
            transition: width 0.4s ease;
        }
        
        .quiz-card {
            background-color: white;
            border-radius: 10px;
            padding: 1.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            margin-bottom: 1.5rem;
            transition: all 0.3s ease;
            width: 100%;
        }
        
        .quiz-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }
        
        .question-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .question-number {
            font-size: 1rem;
            color: var(--accent-color);
            font-weight: 600;
        }
        
        .question-text {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            word-wrap: break-word;
        }
        
        .options-container {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }
        
        .option {
            padding: 0.75rem;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            word-wrap: break-word;
        }
        
        .option:hover {
            border-color: var(--accent-color);
            background-color: #f8f9fc;
        }
        
        .option.selected {
            border-color: var(--primary-color);
            background-color: rgba(67, 97, 238, 0.1);
        }
        
        .option.correct {
            border-color: var(--correct-color);
            background-color: rgba(76, 175, 80, 0.1);
        }
        
        .option.incorrect {
            border-color: var(--incorrect-color);
            background-color: rgba(244, 67, 54, 0.1);
        }
        
        .option-text {
            margin-left: 0.75rem;
            flex: 1;
        }
        
        .feedback-container {
            padding: 1rem;
            border-radius: 8px;
            margin-top: 1.5rem;
            display: none;
            word-wrap: break-word;
        }
        
        .feedback-container.correct {
            background-color: rgba(76, 175, 80, 0.1);
            border: 1px solid var(--correct-color);
            color: var(--correct-color);
        }
        
        .feedback-container.incorrect {
            background-color: rgba(244, 67, 54, 0.1);
            border: 1px solid var(--incorrect-color);
            color: var(--incorrect-color);
        }
        
        .explanation {
            margin-top: 1rem;
            font-size: 0.95rem;
            color: var(--text-color);
        }
        
        .results-container {
            text-align: center;
            padding: 1.5rem;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            display: none;
            width: 100%;
        }
        
        .results-header {
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        
        .score-container {
            margin: 1.5rem 0;
        }
        
        .score-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: conic-gradient(var(--primary-color) 0%, var(--accent-color) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            position: relative;
        }
        
        .score-circle::before {
            content: "";
            position: absolute;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: white;
        }
        
        .score-value {
            position: relative;
            font-size: 2rem;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .summary-list {
            list-style: none;
            padding: 0;
            text-align: left;
            max-width: 100%;
            margin: 1.5rem auto;
        }
        
        .summary-item {
            padding: 0.75rem;
            border-radius: 8px;
            margin-bottom: 0.75rem;
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .summary-item.correct {
            background-color: rgba(76, 175, 80, 0.1);
        }
        
        .summary-item.incorrect {
            background-color: rgba(244, 67, 54, 0.1);
        }
        
        .summary-item.unanswered {
            background-color: var(--unanswered-color);
        }
        
        .summary-question {
            font-weight: 600;
            flex: 1;
            min-width: 60%;
            word-wrap: break-word;
        }
        
        .summary-answer {
            font-weight: 600;
            white-space: nowrap;
        }
        
        .summary-answer.correct {
            color: var(--correct-color);
        }
        
        .summary-answer.incorrect {
            color: var(--incorrect-color);
        }
        
        .hidden {
            display: none;
        }
        
        .timer {
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--light-text);
            white-space: nowrap;
        }
        
        .submit-exam-btn {
            background-color: var(--accent-color);
            margin-top: 1rem;
            width: 100%;
        }
        
        .submit-exam-btn1:hover {
            background-color: var(--tirtiary-color);
        }
           .submit-exam-btn1 {
            background-color: var(--accent-color);
            margin-top: 1rem;
            width: 20%;
        }
        
        .submit-exam-btn:hover {
            background-color: var(--secondary-color);
        }
        
        .warning-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .warning-modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .warning-content {
            background-color: white;
            padding: 1.5rem;
            border-radius: 10px;
            max-width: 90%;
            width: 100%;
            text-align: center;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }
        
        .warning-title {
            font-size: 1.3rem;
            color: var(--incorrect-color);
            margin-bottom: 1rem;
        }
        
        .warning-text {
            margin-bottom: 1.5rem;
        }
        
        .warning-buttons {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .btn-cancel {
            background-color: var(--light-text);
        }
        
        .question-detail {
            margin-top: 1rem;
            padding: 1rem;
            background-color: #f8f9fa;
            border-radius: 8px;
        }
        
        .question-detail .question-text {
            font-size: 1.1rem;
            margin-bottom: 1rem;
        }
        
        .question-detail .options-list {
            list-style-type: none;
            padding: 0;
        }
        
        .question-detail .option-item {
            padding: 0.5rem;
            margin-bottom: 0.5rem;
            border-radius: 4px;
        }
        
        .question-detail .option-item.correct {
            background-color: rgba(76, 175, 80, 0.2);
            border-left: 3px solid var(--correct-color);
        }
        
        .question-detail .option-item.selected-incorrect {
            background-color: rgba(244, 67, 54, 0.2);
            border-left: 3px solid var(--incorrect-color);
        }
        
        .question-detail .explanation {
            margin-top: 1rem;
            padding: 0.75rem;
            background-color: #e9ecef;
            border-radius: 4px;
            font-size: 0.9rem;
        }
        
        .marks-display {
            font-size: 1.2rem;
            margin-top: 0.5rem;
            font-weight: bold;
        }   /* New styles for view mode switch */
        .view-mode-container {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            gap: 0.5rem;
        }
        
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: var(--primary-color);
        }
        
        input:focus + .slider {
            box-shadow: 0 0 1px var(--primary-color);
        }
        
        input:checked + .slider:before {
            transform: translateX(24px);
        }
        
        .mode-label {
            font-size: 0.9rem;
            color: var(--text-color);
            font-weight: 500;
        }
        
        /* Styles for all questions view */
        .all-questions-container {
            display: none;
        }
        
        .all-questions-container.active {
            display: block;
        }
        
        .question-block {
            background-color: white;
            border-radius: 10px;
            padding: 1.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            margin-bottom: 1.5rem;
            transition: all 0.3s ease;
            width: 100%;
        }
        
        .question-block:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }
        
        .question-block .question-text {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            word-wrap: break-word;
        }
         /* New styles for view mode switch */
        .view-mode-container {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            gap: 0.5rem;
        }
        
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: var(--primary-color);
        }
        
        input:focus + .slider {
            box-shadow: 0 0 1px var(--primary-color);
        }
        
        input:checked + .slider:before {
            transform: translateX(24px);
        }
        
        .mode-label {
            font-size: 0.9rem;
            color: var(--text-color);
            font-weight: 500;
        }
        
        /* Styles for all questions view */
        .all-questions-container {
            display: none;
        }
        
        .all-questions-container.active {
            display: block;
        }
        
        .question-block {
            background-color: white;
            border-radius: 10px;
            padding: 1.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            margin-bottom: 1.5rem;
            transition: all 0.3s ease;
            width: 100%;
        }
        
        .question-block:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }
        
        .question-block .question-text {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            word-wrap: break-word;
        }
        @media (max-width: 768px) {
            .container {
                padding: 0.75rem;
                min-height: calc(var(--vh, 1vh) * 100 - 1.5rem);
            }
            
            header {
                padding: 1rem;
                margin-bottom: 1rem;
            }
            
            /* Adjust font sizes using clamp() for better responsiveness */
            .question-text {
                font-size: clamp(1rem, 4vw, 1.1rem);
            }
            
            .option-text {
                font-size: clamp(0.9rem, 3vw, 1rem);
            }
            
            .btn {
                font-size: clamp(0.85rem, 3vw, 0.9rem);
                padding: 0.7rem;
            }
            
            .score-circle {
                width: clamp(90px, 25vw, 100px);
                height: clamp(90px, 25vw, 100px);
            }
            
            .score-circle::before {
                width: clamp(70px, 20vw, 80px);
                height: clamp(70px, 20vw, 80px);
            }
            
            .score-value {
                font-size: clamp(1.4rem, 6vw, 1.6rem);
            }
        }
        
        @media (max-width: 480px) {
            .container {
                padding: 0.5rem;
                min-height: calc(var(--vh, 1vh) * 100 - 1rem);
            }
            
            .btn {
                padding: 0.6rem;
            }
        }

        /* Add this new media query for very small devices */
        @media (max-width: 360px) {
            .question-text {
                font-size: 0.95rem;
            }
            
            .option {
                padding: 0.5rem;
            }
            
            .btn {
                padding: 0.5rem 0.4rem;
            }
        }