/* SOC Analyst MITRE ATT&CK Quiz Styles */

/* ========================================
   TERMINAL / LOG DISPLAY
   ======================================== */

.log-display {
    background: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', monospace;
    margin-bottom: 1.5rem;
}

.log-display-header {
    background: #313244;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #45475a;
}

.log-display-dots {
    display: flex;
    gap: 6px;
}

.log-display-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.log-display-dot.red { background: #f38ba8; }
.log-display-dot.yellow { background: #f9e2af; }
.log-display-dot.green { background: #a6e3a1; }

.log-display-title {
    font-size: 12px;
    color: #a6adc8;
    margin-left: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.log-display-body {
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
    color: #cdd6f4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-display-body .log-key {
    color: #89b4fa;
}

.log-display-body .log-value {
    color: #a6e3a1;
}

.log-display-body .log-comment {
    color: #6c7086;
    font-style: italic;
}

.log-display-body .log-warning {
    color: #f9e2af;
}

.log-display-body .log-danger {
    color: #f38ba8;
}

.log-display-body .log-highlight {
    color: #fab387;
    font-weight: 600;
}

.log-display-body .log-cmd {
    color: #94e2d5;
}

.log-display-body .log-prompt {
    color: #74c7ec;
}

/* ========================================
   SCENARIO HEADER
   ======================================== */

.scenario-header-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.scenario-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    background: #dbeafe;
    color: #1d4ed8;
}

.scenario-label i {
    font-size: 0.75rem;
}

.scenario-title-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.scenario-description-text {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.scenario-variation {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #92400e;
    font-weight: 500;
}

.scenario-variation i {
    margin-right: 0.5rem;
    color: #d97706;
}

/* ========================================
   ANSWER SELECTION SYSTEM
   ======================================== */

.answer-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.answer-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.answer-section.completed {
    border-color: #10b981;
    background: #f0fdf4;
}

.answer-section.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.answer-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.answer-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

.answer-section.completed .answer-section-number {
    background: #10b981;
    color: white;
}

.answer-section.active .answer-section-number {
    background: #3b82f6;
    color: white;
}

.answer-section-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.answer-section-check {
    color: #10b981;
    font-size: 1.125rem;
    display: none;
}

.answer-section.completed .answer-section-check {
    display: block;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

.answer-option:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.answer-option.selected {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.answer-option.correct {
    background: #f0fdf4;
    border-color: #10b981;
    color: #065f46;
}

.answer-option.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.answer-option.correct-answer {
    background: #f0fdf4;
    border-color: #10b981;
    color: #065f46;
}

.answer-option-radio {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all 0.15s ease;
}

.answer-option.selected .answer-option-radio {
    border-color: #3b82f6;
    background: #3b82f6;
}

.answer-option.selected .answer-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.answer-option.correct .answer-option-radio {
    border-color: #10b981;
    background: #10b981;
}

.answer-option.correct .answer-option-radio::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
}

.answer-option.incorrect .answer-option-radio {
    border-color: #ef4444;
    background: #ef4444;
}

.answer-option.incorrect .answer-option-radio::after {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
}

.answer-option-text {
    flex: 1;
}


/* Placeholder "find in MITRE" option: empty-box look (intermediate quiz) */
.answer-option--find-mitre {
    border-style: dashed;
    background: #fafafa;
    color: #6b7280;
}
.answer-option--find-mitre .answer-option-text {
    font-style: italic;
}
.answer-option--find-mitre:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ========================================
   FREE-TEXT INPUT (Medium / Hard quizzes)
   ======================================== */

.free-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.free-text-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #4338ca;
    line-height: 1.5;
}

.free-text-hint i {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 2px;
    color: #6366f1;
}

.free-text-hint a {
    color: #4338ca;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(67, 56, 202, 0.3);
    text-underline-offset: 2px;
}

.free-text-hint a:hover {
    color: #3730a3;
    text-decoration-color: rgba(55, 48, 163, 0.6);
}

.free-text-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.free-text-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.free-text-input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.free-text-input:disabled {
    opacity: 0.85;
    cursor: not-allowed;
}

.free-text-input.correct {
    border-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

.free-text-input.incorrect {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.free-text-result {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: feedbackSlideIn 0.3s ease;
}

.free-text-result.correct {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.free-text-result.correct i {
    color: #10b981;
}

.free-text-result.incorrect {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.free-text-result.incorrect i {
    color: #ef4444;
}

.free-text-result i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */

.submit-answer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    margin-top: 1.5rem;
}

.submit-answer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.submit-answer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   QUESTION FEEDBACK
   ======================================== */

.soc-feedback {
    background: #fff;
    border-radius: 16px;
    margin-top: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    animation: feedbackSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.soc-feedback.feedback-correct {
    border-top: 4px solid #10b981;
}

.soc-feedback.feedback-incorrect {
    border-top: 4px solid #ef4444;
}

.soc-feedback.feedback-partial {
    border-top: 4px solid #f59e0b;
}

.soc-feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.soc-feedback-result {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.soc-feedback-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.soc-feedback-icon.correct {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.soc-feedback-icon.incorrect {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.soc-feedback-icon.partial {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.soc-feedback-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.soc-feedback-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.soc-feedback.feedback-correct .soc-feedback-title { color: #059669; }
.soc-feedback.feedback-incorrect .soc-feedback-title { color: #dc2626; }
.soc-feedback.feedback-partial .soc-feedback-title { color: #d97706; }

.soc-feedback-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
}

.soc-feedback-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    background: #f3f4f6;
    color: #374151;
}

/* Answer Key Toggle */
.answer-key-toggle-wrap {
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.answer-key-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4338ca;
    transition: all 0.2s ease;
}

.answer-key-toggle:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.answer-key-toggle .toggle-icon {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.answer-key-toggle .toggle-icon.open {
    transform: rotate(180deg);
}

/* Answer Key Section */
.answer-key {
    padding: 0 1.5rem 1.5rem;
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}

.answer-key.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.answer-key-section {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.answer-key-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answer-key-label .correct-icon {
    color: #10b981;
}

.answer-key-label .incorrect-icon {
    color: #ef4444;
}

.answer-key-value {
    font-size: 0.9375rem;
    color: #1e293b;
    line-height: 1.6;
}

.answer-key-value strong {
    color: #0f172a;
}

/* Evidence List */
.evidence-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.evidence-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.evidence-list li::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #6366f1;
    font-size: 0.75rem;
    top: 3px;
}

/* ========================================
   RESULTS SCREEN - SOC SPECIFIC
   ======================================== */

.soc-results {
    text-align: center;
    padding: 2rem;
}

/* Score Ring */
.score-ring-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.score-ring {
    position: relative;
    width: 180px;
    height: 180px;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 10;
}

.score-ring-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease;
}

.score-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-ring-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.score-ring-total {
    font-size: 1rem;
    color: #6b7280;
}

.score-ring-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Rating Badge */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.rating-badge i {
    font-size: 1.25rem;
}

.rating-badge.expert {
    background: #d1fae5;
    color: #059669;
}

.rating-badge.proficient {
    background: #dbeafe;
    color: #2563eb;
}

.rating-badge.competent {
    background: #fef3c7;
    color: #d97706;
}

.rating-badge.developing {
    background: #fee2e2;
    color: #dc2626;
}

/* Section Breakdown */
.section-breakdown {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.section-breakdown h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.breakdown-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}

.breakdown-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.breakdown-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-align: right;
}

/* Tactic Heat Map */
.tactic-heatmap {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.tactic-heatmap h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tactic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.tactic-cell {
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
    transition: transform 0.15s ease;
}

.tactic-cell:hover {
    transform: scale(1.05);
}

.tactic-cell.mastered {
    background: #d1fae5;
    color: #065f46;
}

.tactic-cell.familiar {
    background: #dbeafe;
    color: #1e40af;
}

.tactic-cell.learning {
    background: #fef3c7;
    color: #92400e;
}

.tactic-cell.missed {
    background: #fee2e2;
    color: #991b1b;
}

.tactic-cell.not-tested {
    background: #f3f4f6;
    color: #9ca3af;
}

/* ========================================
   QUIZ PROGRESS BAR (SOC variant)
   ======================================== */

.soc-progress {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.soc-progress-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.soc-progress-bar-wrap {
    flex: 1;
    max-width: 300px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 1rem;
}

.soc-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.soc-progress-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .log-display-body {
        font-size: 11px;
        padding: 12px 14px;
    }

    .soc-progress {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .soc-progress-bar-wrap {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .breakdown-row {
        grid-template-columns: 100px 1fr 50px;
        gap: 0.5rem;
    }

    .tactic-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .soc-feedback-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .soc-feedback-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .soc-feedback-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .answer-option {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .scenario-title-text {
        font-size: 1.125rem;
    }
}
