/* Excel Quiz Plugin — Frontend Styles */

.eq-quiz-wrap {
    max-width: 800px;
    margin: 0 auto;
    font-family: inherit;
}

.eq-quiz-title {
    font-size: 1.8em;
    margin-bottom: 24px;
    color: #1a1a2e;
    border-bottom: 3px solid #4f46e5;
    padding-bottom: 10px;
}

.eq-user-info {
    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.eq-user-info label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    color: #374151;
    flex: 1;
    min-width: 200px;
}

.eq-user-info input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    margin-top: 4px;
}

.eq-question-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.eq-question-block:hover {
    box-shadow: 0 3px 12px rgba(79, 70, 229, 0.1);
}

.eq-category {
    display: inline-block;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.eq-question-text {
    font-size: 1.05em;
    color: #111827;
    margin: 0 0 14px;
    line-height: 1.6;
}

.eq-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.eq-options li label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.95em;
    color: #374151;
}

.eq-options li label:hover {
    border-color: #4f46e5;
    background: #f5f3ff;
}

.eq-options li input[type="radio"] {
    margin-top: 2px;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.eq-options li input[type="radio"]:checked + .eq-option-key,
.eq-options li:has(input:checked) label {
    color: #4f46e5;
    border-color: #4f46e5;
    background: #f5f3ff;
}

.eq-option-key {
    font-weight: 700;
    color: #6b7280;
    min-width: 18px;
}

.eq-submit-wrap {
    text-align: center;
    margin-top: 28px;
}

.eq-submit-btn {
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.eq-submit-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.eq-submit-btn:active {
    transform: translateY(0);
}

.eq-loading {
    display: inline-block;
    margin-left: 12px;
    color: #6b7280;
    font-size: 0.9em;
}

.eq-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 500;
}

.eq-message.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.eq-message.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.eq-error { color: #dc2626; background: #fef2f2; padding: 10px 14px; border-radius: 6px; border: 1px solid #fecaca; }

/* Results Page */
.eq-results-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.eq-score-card {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    padding: 40px 24px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.eq-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 4px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.eq-score-percent {
    font-size: 2em;
    font-weight: 800;
}

.eq-grade {
    font-size: 1.6em;
    margin: 0 0 12px;
    color: #fff;
}

.eq-score-summary {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0 0 8px;
}

.eq-user-summary {
    font-size: 0.95em;
    opacity: 0.85;
    margin: 0;
}

.eq-review-section h3 {
    font-size: 1.3em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.eq-review-item {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 14px;
}

.eq-review-item.eq-correct { border-color: #6ee7b7; background: #f0fdf4; }
.eq-review-item.eq-wrong   { border-color: #fca5a5; background: #fff5f5; }

.eq-review-question {
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.eq-review-badge {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.eq-correct .eq-review-badge { background: #d1fae5; color: #065f46; }
.eq-wrong   .eq-review-badge { background: #fee2e2; color: #991b1b; }

.eq-review-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.eq-review-options li {
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #4b5563;
}

.eq-opt-correct { background: #d1fae5; color: #065f46; font-weight: 600; }
.eq-opt-wrong   { background: #fee2e2; color: #991b1b; text-decoration: line-through; }

.eq-results-actions {
    text-align: center;
    margin-top: 28px;
}

.eq-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.eq-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.eq-btn-secondary:hover {
    background: #e5e7eb;
    color: #111827;
}
