/* Ailit Quiz Generator */

#ailit-quiz-wrap {
    margin: 40px 0;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
}

/* 버튼 */
.ailit-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.ailit-btn:active { transform: scale(0.98); }
.ailit-btn-primary {
    background: #4f46e5;
    color: #fff;
}
.ailit-btn-primary:hover { background: #4338ca; }
.ailit-btn-secondary {
    background: #e5e7eb;
    color: #374151;
    margin-top: 16px;
}
.ailit-btn-secondary:hover { background: #d1d5db; }

/* 로딩 */
#ailit-quiz-loading {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}
.ailit-loading-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: ailit-spin 0.8s linear infinite;
}
@keyframes ailit-spin { to { transform: rotate(360deg); } }

/* 퀴즈 타이틀 */
.ailit-quiz-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

/* 문항 */
.ailit-question {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.ailit-question-text {
    margin: 0 0 12px;
    font-size: 15px;
    color: #111827;
    line-height: 1.6;
}
.ailit-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ailit-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 14px;
    color: #374151;
}
.ailit-option:hover { background: #f0f4ff; border-color: #a5b4fc; }
.ailit-option input[type="radio"] { margin: 0; cursor: pointer; }
.ailit-option input[type="radio"]:checked + span { color: #4f46e5; font-weight: 600; }

/* 제출 버튼 영역 */
.ailit-quiz-actions { margin-top: 8px; }

/* 에러 */
.ailit-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-top: 12px;
}

/* 결과 */
.ailit-result-header {
    text-align: center;
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.ailit-grade-good  { background: #d1fae5; color: #065f46; }
.ailit-grade-mid   { background: #fef3c7; color: #92400e; }
.ailit-grade-low   { background: #fee2e2; color: #991b1b; }

.ailit-score {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
}
.ailit-score span { font-size: 24px; font-weight: 600; }
.ailit-grade-label { font-size: 20px; font-weight: 700; margin: 6px 0 4px; }

.ailit-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ailit-result-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}
.ailit-result-list li.correct { background: #f0fdf4; border: 1px solid #bbf7d0; }
.ailit-result-list li.wrong   { background: #fff7f7; border: 1px solid #fecaca; }
.ailit-result-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.ailit-explanation { color: #6b7280; }
