/* Basic Reset */
* { box-sizing: border-box; }

body { 
    margin: 0; 
    font-family: Arial, sans-serif; 
    background: #f5f5f5; 
    color: #333; 
}

.container { 
    max-width: 800px; 
    margin: 20px auto; 
    padding: 0 20px; 
}

/* Exam Header */
.exam-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 6px;
}

.counter {
    font-size: 14px;
}

/* Question */
.question {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.question > div:first-child {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.question > div:nth-child(2) {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Options - CRITICAL FOR RADIO BUTTONS */
.options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.options li {
    margin: 10px 0;
}

.options label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    transition: all 0.2s ease;
}

.options label:hover {
    border-color: #3498db;
    background: #f8f9ff;
}

.options input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
    cursor: pointer;
    /* Ensure radio button is visible */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.options label span {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

/* Selected state */
.options input[type="radio"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

.options label:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #f0f8ff;
}

/* Answer Actions */
.answer-actions {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.answer-actions .btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.answer-actions .btn:hover:not(:disabled) {
    background: #2980b9;
}

.answer-actions .btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#answerStatus {
    margin-left: 15px;
    font-weight: 500;
}

/* Navigation */
.nav {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.nav .btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.nav .btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
}

.nav .btn:disabled {
    border-color: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* Footer */
.footer-actions {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

.footer-actions .btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.footer-actions .btn:hover {
    background: #229954;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover:not(:disabled) {
    background: #2980b9;
}

.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Other elements */
.instructions, .card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group { margin-bottom: 15px; }
label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type=text], select { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    background: white; 
}

/* Responsive */
@media (max-width: 600px) {
    .container { padding: 0 15px; }
    .exam-header { flex-direction: column; gap: 15px; text-align: center; }
    .nav { flex-direction: column; }
    .options label { padding: 12px; }
}
