body {
    font-family: Arial, sans-serif;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: #f0f0f0;
}

#mode-selection-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    text-align: center;
}

#category-selection-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.quiz-container {
    width: 800px;
    max-width: 90%;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

#exam-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#timer {
    background-color: #e9ecef;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #495057;
}

.btn {
    border-radius: 5px;
    padding: 10px 20px;
    color: white;
    outline: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.btn:hover:not(:disabled) {
    opacity: 0.9;
}

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

.pause-btn {
    background-color: #ffc107;
    border-color: #ffc107;
}

.start-btn, .next-btn {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px 25px;
    background-color: #007bff;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.hide {
    display: none;
}

#question-container {
    margin-bottom: 20px;
}

#question {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.answer-btn {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #333;
    text-align: left;
}

.answer-btn.selected {
    background-color: #d0e7ff;
    border-color: #007bff;
}

.answer-btn.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.answer-btn.wrong {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.answer-btn.correct-unselected {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

#explanation-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9f7ef;
    border-radius: 5px;
    border: 1px solid #28a745;
    color: #333;
}

#explanation-container h4 {
    margin-top: 0;
    color: #28a745;
}

#explanation-container ul {
    list-style-type: none;
    padding: 0;
}

#explanation-container li {
    margin-bottom: 8px;
}

#explanation-container li strong {
    color: #007bff;
}

#explanation-container li em {
    color: #6c757d;
    font-size: 0.9em;
}

#score-container {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

#incorrect-answers-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
    max-height: 400px;
    overflow-y: auto;
}

#incorrect-answers-container h3 {
    margin-top: 0;
}

.incorrect-answer {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.selected-answer {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    padding: 5px;
    border-radius: 4px;
}

#results-summary-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

#results-summary-container h2 {
    margin-top: 0;
}

.pass {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

.fail {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2rem;
}

#progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: #007bff;
    transition: width 0.3s ease-in-out;
}

/* Drag and Drop Styles */
.drag-drop-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.drag-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    border: 1px dashed #007bff;
    border-radius: 8px;
    min-height: 80px;
    align-items: center;
    justify-content: center;
    background-color: #eaf5ff;
}

.draggable {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: grab;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.draggable:active {
    cursor: grabbing;
}

.drop-targets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.drop-zone {
    border: 2px dashed #6c757d;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.drop-zone.hover {
    border-color: #28a745;
    background-color: #e6ffe6;
}

.draggable.correct {
    background-color: #28a745;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.4);
}

.draggable.wrong {
    background-color: #dc3545;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.4);
}

.fill-in-the-blank-input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
}

.fill-in-the-blank-input.correct {
    border-color: #28a745;
    background-color: #e9f7ef;
}

.fill-in-the-blank-input.wrong {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.submit-btn {
    background-color: #28a745;
    margin-top: 15px;
    width: 100%;
}

.submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#selection-container {
    text-align: center;
    margin-bottom: 20px;
}

#selection-container h2 {
    margin-bottom: 15px;
    color: #333;
}

.selection-btn {
    background-color: #6c757d;
    margin: 0 10px;
    padding: 12px 25px;
}

.selection-btn.selected {
    background-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}
