/* WSA Quiz Engine v2.0 — Exam Mode */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.wq-container { max-width: 850px; margin: 0 auto; }

/* Header */
.wq-header {
    text-align: center;
    margin-bottom: 20px;
}
.wq-header h1 {
    color: #60a5fa;
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.wq-header p {
    color: #9ca3af;
    font-size: 0.95rem;
}
.wq-progress-bar {
    background: rgba(96, 165, 250, 0.15);
    border-radius: 6px;
    height: 8px;
    margin: 15px 0 8px;
    overflow: hidden;
}
.wq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 6px;
    transition: width 0.3s;
    width: 0%;
}
.wq-progress-text {
    font-size: 0.85rem;
    color: #93c5fd;
}

/* Question Map (dot navigation) */
.wq-question-map {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}
.wq-map-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #374151;
    background: rgba(255,255,255,0.03);
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wq-map-dot:hover { border-color: #60a5fa; color: #60a5fa; }
.wq-map-dot.current { border-color: #60a5fa; background: rgba(96,165,250,0.15); color: #60a5fa; }
.wq-map-dot.answered { border-color: #60a5fa; background: #60a5fa; color: #000; }
.wq-map-dot.correct { border-color: #22c55e; background: #22c55e; color: #000; }
.wq-map-dot.incorrect { border-color: #ef4444; background: #ef4444; color: #fff; }

/* Question Card */
.wq-question-card {
    background: #12141f;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}
.wq-question-num {
    color: #93c5fd;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.wq-question-text {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Options */
.wq-options { display: flex; flex-direction: column; gap: 10px; }
.wq-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #1a1c28;
    border: 2px solid #2d3748;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.wq-option:hover:not(.disabled) { border-color: #60a5fa; background: rgba(96,165,250,0.05); }
.wq-option.selected { border-color: #60a5fa; background: rgba(96,165,250,0.1); }
.wq-option.selected .wq-option-letter { border-color: #60a5fa; background: #60a5fa; color: #000; }
.wq-option.disabled { cursor: default; }
.wq-option.correct { border-color: #22c55e; background: rgba(34,197,94,0.1); }
.wq-option.correct .wq-option-letter { border-color: #22c55e; background: #22c55e; color: #000; }
.wq-option.incorrect { border-color: #ef4444; background: rgba(239,68,68,0.1); }
.wq-option.incorrect .wq-option-letter { border-color: #ef4444; background: #ef4444; color: #fff; }

.wq-option-letter {
    width: 30px;
    height: 30px;
    border: 2px solid #4b5563;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s;
}
.wq-option-text { flex: 1; line-height: 1.4; }
.wq-check { color: #22c55e; font-size: 1.2rem; margin-left: auto; }
.wq-cross { color: #ef4444; font-size: 1.2rem; margin-left: auto; }

/* Explanation (review mode only) */
.wq-explanation {
    margin-top: 20px;
    padding: 15px;
    background: rgba(96,165,250,0.05);
    border: 1px solid rgba(96,165,250,0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.wq-explanation strong { display: block; margin-bottom: 6px; }

/* Navigation */
.wq-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.wq-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.wq-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wq-btn-primary { background: linear-gradient(135deg, #1e40af, #3b82f6); color: #fff; }
.wq-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(96,165,250,0.3); }
.wq-btn-secondary { background: transparent; border: 1px solid #374151; color: #9ca3af; }
.wq-btn-secondary:hover:not(:disabled) { border-color: #60a5fa; color: #60a5fa; }
.wq-btn-submit { background: linear-gradient(135deg, #166534, #22c55e); }

/* Results */
.wq-results { animation: wqFadeIn 0.3s ease; }
@keyframes wqFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.wq-results-header {
    text-align: center;
    padding: 30px;
    background: #12141f;
    border: 1px solid #2d3748;
    border-radius: 12px;
    margin-bottom: 25px;
}
.wq-results-icon { font-size: 3.5rem; margin-bottom: 10px; }
.wq-results-header h2 { color: #60a5fa; font-size: 1.8rem; margin-bottom: 10px; }
.wq-score { font-size: 3.5rem; font-weight: 800; margin: 10px 0; }
.wq-score.pass { color: #22c55e; }
.wq-score.fail { color: #ef4444; }
.wq-score-detail { color: #9ca3af; font-size: 1.1rem; margin-bottom: 10px; }
.wq-results-msg { color: #9ca3af; max-width: 500px; margin: 0 auto; line-height: 1.5; }

/* Review Table */
.wq-review-table-wrap {
    background: #12141f;
    border: 1px solid #2d3748;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}
.wq-review-table {
    width: 100%;
    border-collapse: collapse;
}
.wq-review-table th {
    background: #1a1c28;
    padding: 12px 15px;
    text-align: left;
    color: #93c5fd;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #2d3748;
}
.wq-review-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
.wq-review-table tr:hover td { background: rgba(96,165,250,0.05); }
.wq-row-correct td:last-child { color: #22c55e; }
.wq-row-incorrect td:last-child { color: #ef4444; }
.wq-review-q { color: #9ca3af; max-width: 400px; }

/* Results Actions */
.wq-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Footer Nav */
.wq-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}
.wq-footer a {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid #374151;
    color: #9ca3af;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}
.wq-footer a:hover { border-color: #60a5fa; color: #60a5fa; }

/* Responsive */
@media (max-width: 600px) {
    .wq-question-card { padding: 20px; }
    .wq-option { padding: 12px; }
    .wq-map-dot { width: 28px; height: 28px; font-size: 0.7rem; }
    .wq-review-q { max-width: 200px; }
}

/* Accessibility: disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wq-progress-fill,
    .wq-map-dot,
    .wq-option,
    .wq-option-letter,
    .wq-btn,
    .wq-footer a,
    .wq-results {
        animation: none !important;
        transition: none !important;
    }
}
