body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: #0056b3;
}

ul {
    list-style: disc;
    margin-left: 20px;
}

/* Hyperlink styling */
.question-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}

.question-link:hover {
    color: #0056b3;
    text-decoration: none;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal Content Box */
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    max-height: 80vh; /* Limit height */
    overflow-y: auto; /* Enable scrolling for tall content */
}

/* Modal close button */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Question Content */
#modal-question-id {
    font-size: 1.2em;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 10px;
}

#modal-question-text {
    font-size: 1.1em;
    margin-bottom: 15px;
}

#modal-choices-container { /* New container for choices */
    margin-bottom: 20px;
}

.choice-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start; /* Align input and label */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.choice-item:hover {
    background-color: #f0f0f0;
}

.choice-item input[type="radio"],
.choice-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px; /* Adjust alignment for radio/checkbox */
    flex-shrink: 0; /* Prevent shrinking */
}

.choice-item label {
    flex-grow: 1;
    cursor: pointer;
}

#submit-answer-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#submit-answer-button:hover {
    background-color: #0056b3;
}

#submit-answer-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.feedback-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    display: none; /* Hidden by default */
}

.feedback-correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#modal-correct-answer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #007bff;
    font-weight: bold;
    color: #28a745; 
    font-size: 1.0em;
    display: none; /* Hidden by default, shown after submit */
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}