/**
 * KAITRUST AI 백과사전 - 용어 상세 섹션 스타일
 * @version 3.0.0
 * @description 고도화된 용어 페이지 6개 섹션 스타일링 - 다크/라이트 모드 완전 지원
 */

/* ===== 다크 모드 기본 (DEFAULT) ===== */

/* 기본 섹션 컨테이너 */
.term-section {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8)) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #f1f5f9 !important;
}

.term-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.15);
}

/* 섹션 제목 - 다크 모드에서 밝은 색 */
.section-title,
.term-section h2,
.term-section h3,
.term-section h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.term-section h3 {
    font-size: 1.2rem;
}

.term-section h4 {
    font-size: 1.1rem;
}

/* 모든 텍스트 - 다크 모드에서 밝은 색 */
.term-section p,
.term-section li,
.term-section span,
.term-section div,
.detail-content p,
.detail-content li,
.detail-content span {
    color: #e2e8f0 !important;
    line-height: 1.8;
}

.term-section p {
    margin-bottom: 1rem;
}

.term-section li {
    margin-bottom: 0.5rem;
}

/* 강조 텍스트 */
.term-section strong {
    color: #c4b5fd !important;
    font-weight: 600;
}

/* ===== 상세 설명 섹션 ===== */
.detail-content p {
    color: #e2e8f0 !important;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.detail-content p:last-child {
    margin-bottom: 0;
}

/* ===== 코드 블록 ===== */
.code-block {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.code-block pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: #e2e8f0;
}

/* 코드 언어 라벨 */
.code-block[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    color: #ffffff !important;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(168, 85, 247, 0.3);
    border: none;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.copy-btn:hover {
    background: rgba(168, 85, 247, 0.5);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: rgba(34, 197, 94, 0.5);
}

/* ===== 대화 탭 시스템 ===== */
.conv-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.conv-tab {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: transparent;
    color: #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.conv-tab:hover,
.conv-tab.active {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
    border-color: rgba(168, 85, 247, 0.5);
}

.conv-tab.active {
    font-weight: 500;
}

/* 대화 아이콘 */
.conv-tab[data-type="meeting"]::before { content: "🏢"; }
.conv-tab[data-type="interview"]::before { content: "🎯"; }
.conv-tab[data-type="review"]::before { content: "💻"; }

.conv-content {
    display: none;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.conv-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.conv-content p {
    margin: 0.5rem 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
}

.conv-content strong {
    color: #a855f7;
}

/* 역할별 색상 구분 */
.conv-content .role-senior { color: #f59e0b; }
.conv-content .role-junior { color: #38bdf8; }
.conv-content .role-interviewer { color: #a855f7; }
.conv-content .role-candidate { color: #34d399; }
.conv-content .role-pm { color: #f472b6; }
.conv-content .role-dba { color: #fb923c; }

/* ===== 주의사항 리스트 ===== */
.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 8px 8px 0;
    color: #cbd5e1;
    transition: all 0.2s;
}

.warning-list li:hover {
    background: rgba(245, 158, 11, 0.15);
    transform: translateX(3px);
}

.warning-list li:last-child {
    margin-bottom: 0;
}

/* 심각도별 색상 */
.warning-list li.critical {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.warning-list li.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* ===== 관련 용어 그리드 ===== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.related-link {
    display: block;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: #a5b4fc;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.related-link:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* ===== 리소스 리스트 (더 배우기) ===== */
.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.2s;
}

.resource-list a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* 리소스 타입 아이콘 */
.resource-list .type-official::before { content: "📘"; margin-right: 0.5rem; }
.resource-list .type-video::before { content: "🎬"; margin-right: 0.5rem; }
.resource-list .type-blog::before { content: "📝"; margin-right: 0.5rem; }
.resource-list .type-book::before { content: "📚"; margin-right: 0.5rem; }
.resource-list .type-tool::before { content: "🛠️"; margin-right: 0.5rem; }
.resource-list .type-community::before { content: "👥"; margin-right: 0.5rem; }

/* 리소스 메타 정보 */
.resource-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: auto;
}

/* ===== 난이도 배지 ===== */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.difficulty-beginner {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.difficulty-intermediate {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.difficulty-advanced {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ===== 장애 사례 (Phase 1.5) ===== */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.incident-item {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.incident-item:hover {
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.incident-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.incident-company {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.incident-year {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.incident-title {
    color: #f1f5f9;
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
}

.incident-body p {
    color: #cbd5e1;
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.incident-body strong {
    color: #f87171;
}

.incident-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
}

.incident-source:hover {
    text-decoration: underline;
}

/* ===== 이해도 퀴즈 (Phase 1.5) ===== */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-item {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.quiz-question {
    color: #f1f5f9;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.quiz-question strong {
    color: #a5b4fc;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-options label:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.quiz-options input[type="radio"] {
    accent-color: #a855f7;
    width: 18px;
    height: 18px;
}

.quiz-feedback {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.quiz-feedback .correct {
    color: #4ade80;
}

.quiz-feedback .wrong {
    color: #f87171;
}

.quiz-submit {
    align-self: flex-start;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.quiz-result {
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: #4ade80;
    text-align: center;
    font-size: 1.1rem;
}

/* ===== 커뮤니티 (Phase 1.5 / Phase 2) ===== */
.community-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-question {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.btn-question:hover {
    background: rgba(59, 130, 246, 0.3);
}

.btn-suggest {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.btn-suggest:hover {
    background: rgba(34, 197, 94, 0.3);
}

.community-note {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

/* Phase 2: 댓글 시스템 */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #a855f7;
}

.comment-form button {
    align-self: flex-end;
    padding: 0.5rem 1.5rem;
    background: #a855f7;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: #a855f7;
    font-weight: 500;
}

.comment-date {
    color: #64748b;
    font-size: 0.85rem;
}

.comment-content {
    color: #cbd5e1;
    line-height: 1.6;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .term-section {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .conv-tabs {
        gap: 0.4rem;
    }

    .conv-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 다크/라이트 모드 대응 ===== */
@media (prefers-color-scheme: light) {
    .term-section {
        background: linear-gradient(145deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.8));
        border-color: rgba(168, 85, 247, 0.15);
    }

    .section-title {
        color: #1e293b;
    }

    .detail-content p,
    .conv-content p,
    .warning-list li {
        color: #475569;
    }

    /* 코드 블록은 라이트 모드에서도 다크 배경 유지 */
    .code-block {
        background: #1e293b;
        border: 1px solid #334155;
    }

    .code-block pre,
    .code-block code {
        color: #e2e8f0;
    }
}

/* ===== ASCII 다이어그램 스타일 ===== */
.ascii-diagram,
.scope-diagram,
.annex-diagram,
[class*="-diagram"] {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.4;
    color: #e2e8f0;
    border: 1px solid rgba(168, 85, 247, 0.2);
    margin: 1rem 0;
    font-size: 0.85rem;
}

/* 라이트 모드에서 다이어그램 - 다크 배경 유지 */
@media (prefers-color-scheme: light) {
    .ascii-diagram,
    .scope-diagram,
    .annex-diagram,
    [class*="-diagram"] {
        background: #1e293b;
        color: #e2e8f0;
        border: 1px solid #334155;
    }
}

/* ===== 프린트 스타일 ===== */
@media print {
    .term-section {
        background: white;
        border: 1px solid #e2e8f0;
        page-break-inside: avoid;
    }

    .copy-btn,
    .conv-tabs {
        display: none;
    }

    .conv-content {
        display: block !important;
        border: 1px solid #e2e8f0;
        margin-bottom: 1rem;
    }

    .conv-content::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
}

/* ===== 라이트 모드 완전 지원 (body.light-mode) ===== */

/* 기본 섹션 컨테이너 - 라이트 모드 */
body.light-mode .term-section {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .term-section:hover {
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15) !important;
    border-color: #c4b5fd !important;
}

/* 섹션 제목 - 라이트 모드 */
body.light-mode .section-title,
body.light-mode .term-section h2,
body.light-mode .term-section h3,
body.light-mode .term-section h4 {
    color: #1e293b !important;
}

/* 모든 텍스트 - 라이트 모드 */
body.light-mode .term-section p,
body.light-mode .term-section li,
body.light-mode .term-section span,
body.light-mode .term-section div,
body.light-mode .detail-content p,
body.light-mode .detail-content li,
body.light-mode .detail-content span {
    color: #334155 !important;
}

/* 강조 텍스트 - 라이트 모드 */
body.light-mode .term-section strong {
    color: #7c3aed !important;
}

/* 코드 블록 - 라이트 모드 (다크 유지) */
body.light-mode .code-block {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.light-mode .code-block code,
body.light-mode .code-block pre {
    color: #e2e8f0 !important;
}

body.light-mode .code-label {
    color: #7c3aed !important;
}

/* 복사 버튼 - 라이트 모드 */
body.light-mode .copy-btn {
    color: #ffffff !important;
    background: rgba(124, 58, 237, 0.3) !important;
    color: #ffffff !important;
}

body.light-mode .copy-btn:hover {
    background: rgba(124, 58, 237, 0.5) !important;
}

/* 하이라이트 박스 - 라이트 모드 */
body.light-mode .highlight-box,
body.light-mode .concept-box,
body.light-mode .feature-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .highlight-box h4,
body.light-mode .concept-box h4,
body.light-mode .feature-card h4 {
    color: #7c3aed !important;
}

body.light-mode .highlight-box p,
body.light-mode .concept-box p,
body.light-mode .feature-card p,
body.light-mode .feature-card li {
    color: #334155 !important;
}

/* 유스케이스 그리드 - 라이트 모드 */
body.light-mode .use-case-grid .use-case-item,
body.light-mode .use-case-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .use-case-item h4,
body.light-mode .use-case-item .title {
    color: #7c3aed !important;
}

body.light-mode .use-case-item p,
body.light-mode .use-case-item .desc {
    color: #475569 !important;
}

/* 경고 박스 - 라이트 모드 */
body.light-mode .warning-box,
body.light-mode .warning-item {
    background: rgba(251, 191, 36, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

body.light-mode .warning-box .warning-title,
body.light-mode .warning-item .warning-title {
    color: #b45309 !important;
}

body.light-mode .warning-box p,
body.light-mode .warning-item p {
    color: #92400e !important;
}

/* 대화 탭 - 라이트 모드 */
body.light-mode .conv-tab {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .conv-tab:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-mode .conv-tab.active {
    background: #7c3aed !important;
    color: white !important;
    border-color: #7c3aed !important;
}

/* 대화 콘텐츠 - 라이트 모드 */
body.light-mode .conv-content,
body.light-mode .conversation-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 3px solid #7c3aed !important;
}

body.light-mode .conv-content p,
body.light-mode .conversation-box .text {
    color: #334155 !important;
}

body.light-mode .conversation-box .speaker {
    color: #7c3aed !important;
}

/* 관련 용어 태그 - 라이트 모드 */
body.light-mode .related-term-link,
body.light-mode .related-term-tag {
    background: #f1f5f9 !important;
    color: #7c3aed !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .related-term-link:hover,
body.light-mode .related-term-tag:hover {
    background: #ede9fe !important;
    border-color: #c4b5fd !important;
}

/* 더 배우기 링크 - 라이트 모드 */
body.light-mode .learn-more-item a,
body.light-mode .term-section a {
    color: #7c3aed !important;
}

body.light-mode .term-section a:hover {
    color: #5b21b6 !important;
}

/* 용어 상세 헤더 - 라이트 모드 */
body.light-mode .term-detail-header {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .term-detail-header h1,
body.light-mode .term-title {
    color: #1e293b !important;
    background: linear-gradient(135deg, #1e293b, #7c3aed) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.light-mode .term-detail-header p,
body.light-mode .term-english {
    color: #64748b !important;
}

body.light-mode .term-description p {
    color: #334155 !important;
}

/* 브레드크럼 - 라이트 모드 */
body.light-mode .breadcrumb a {
    color: #7c3aed !important;
}

body.light-mode .breadcrumb span {
    color: #64748b !important;
}

body.light-mode .breadcrumb .current {
    color: #1e293b !important;
}

/* 카테고리 배지 - 라이트 모드 */
body.light-mode .term-category-badge {
    background: rgba(124, 58, 237, 0.1) !important;
    color: #7c3aed !important;
}

/* 그래프 비주얼 - 라이트 모드 */
body.light-mode .graph-visual {
    background: #1e293b !important;
    color: #00f5ff !important;
}

/* 경고 리스트 - 라이트 모드 */
body.light-mode .warning-list li {
    background: rgba(251, 191, 36, 0.1) !important;
    color: #92400e !important;
}

/* 리소스 리스트 - 라이트 모드 */
body.light-mode .resource-list li {
    border-bottom-color: #e2e8f0 !important;
}

body.light-mode .resource-list a {
    color: #7c3aed !important;
}

body.light-mode .resource-meta {
    color: #64748b !important;
}

/* 관련 용어 그리드 - 라이트 모드 */
body.light-mode .related-grid .related-link {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #7c3aed !important;
}

body.light-mode .related-grid .related-link:hover {
    background: #ede9fe !important;
    border-color: #c4b5fd !important;
}

/* 장애 사례 - 라이트 모드 */
body.light-mode .incident-item {
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

body.light-mode .incident-title {
    color: #1e293b !important;
}

body.light-mode .incident-body p {
    color: #475569 !important;
}

/* 퀴즈 - 라이트 모드 */
body.light-mode .quiz-item {
    background: rgba(99, 102, 241, 0.05) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

body.light-mode .quiz-question {
    color: #1e293b !important;
}

body.light-mode .quiz-options label {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

body.light-mode .quiz-options label:hover {
    background: rgba(99, 102, 241, 0.1) !important;
}

/* 커뮤니티 버튼 - 라이트 모드 */
body.light-mode .community-btn {
    border: 1px solid currentColor !important;
}

body.light-mode .community-note {
    color: #64748b !important;
}

/* ASCII 다이어그램 - 라이트 모드 (다크 유지) */
body.light-mode .ascii-diagram,
body.light-mode .scope-diagram,
body.light-mode .annex-diagram,
body.light-mode [class*="-diagram"] {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

/* 액션 버튼 - 라이트 모드 */
body.light-mode .btn-secondary {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

body.light-mode .btn-secondary:hover {
    background: #f1f5f9 !important;
    border-color: #c4b5fd !important;
    color: #7c3aed !important;
}

/* ===== 추가 누락 클래스 - 라이트 모드 ===== */

/* section-content 클래스 */
body.light-mode .section-content,
body.light-mode .section-content p,
body.light-mode .section-content li,
body.light-mode .section-content span {
    color: #334155 !important;
}

body.light-mode .section-content ul,
body.light-mode .section-content ol {
    color: #334155 !important;
}

/* 대화 아이템 (고영향 AI 등에서 사용) */
body.light-mode .conv-item {
    background: #f8fafc !important;
    border-left: 3px solid #7c3aed !important;
}

body.light-mode .conv-context {
    color: #7c3aed !important;
}

body.light-mode .conv-quote {
    color: #334155 !important;
}

/* 케이스 스터디 */
body.light-mode .case-study {
    background: #f8fafc !important;
    border-left: 4px solid #7c3aed !important;
}

body.light-mode .case-study-title {
    color: #1e293b !important;
}

body.light-mode .case-study-meta {
    color: #64748b !important;
}

body.light-mode .case-study-content {
    color: #334155 !important;
}

body.light-mode .case-study-impact {
    background: rgba(124, 58, 237, 0.1) !important;
}

body.light-mode .case-study-impact strong {
    color: #7c3aed !important;
}

/* 퀴즈 옵션 */
body.light-mode .quiz-option {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

body.light-mode .quiz-option:hover {
    border-color: #c4b5fd !important;
    background: #ede9fe !important;
}

body.light-mode .quiz-explanation {
    background: #f8fafc !important;
}

body.light-mode .quiz-explanation p {
    color: #475569 !important;
}

/* 체크리스트 */
body.light-mode .checklist-container {
    background: #f8fafc !important;
}

body.light-mode .checklist-item {
    border-bottom-color: #e2e8f0 !important;
}

body.light-mode .checklist-icon {
    color: #7c3aed !important;
}

body.light-mode .checklist-text {
    color: #334155 !important;
}

/* 코드 탭 */
body.light-mode .code-tab {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

body.light-mode .code-tab:hover,
body.light-mode .code-tab.active {
    background: rgba(124, 58, 237, 0.2) !important;
    color: #7c3aed !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

/* 비교 테이블 */
body.light-mode .comparison-table {
    border-color: #e2e8f0 !important;
}

body.light-mode .comparison-table th {
    background: rgba(124, 58, 237, 0.1) !important;
    color: #7c3aed !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .comparison-table td {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .comparison-table tr:hover td {
    background: #f8fafc !important;
}

/* 더 배우기 링크 */
body.light-mode .learn-link {
    background: #f8fafc !important;
    color: #475569 !important;
}

body.light-mode .learn-link:hover {
    background: #f1f5f9 !important;
    color: #7c3aed !important;
}

/* 난이도 배지 - 라이트 모드 */
body.light-mode .difficulty-badge {
    border: 1px solid currentColor !important;
}

body.light-mode .difficulty-beginner {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #15803d !important;
}

body.light-mode .difficulty-intermediate {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #1d4ed8 !important;
}

body.light-mode .difficulty-advanced {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}

/* 장애 사례 추가 스타일 */
body.light-mode .incident-company {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}

body.light-mode .incident-year {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

body.light-mode .incident-source {
    color: #7c3aed !important;
}

/* 역할별 색상 - 라이트 모드 */
body.light-mode .conv-content .role-senior { color: #b45309 !important; }
body.light-mode .conv-content .role-junior { color: #0369a1 !important; }
body.light-mode .conv-content .role-interviewer { color: #7c3aed !important; }
body.light-mode .conv-content .role-candidate { color: #059669 !important; }
body.light-mode .conv-content .role-pm { color: #db2777 !important; }
body.light-mode .conv-content .role-dba { color: #ea580c !important; }

/* 퀴즈 결과 - 라이트 모드 */
body.light-mode .quiz-result {
    background: rgba(34, 197, 94, 0.1) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    color: #15803d !important;
}

/* 퀴즈 제출 버튼 - 라이트 모드 (유지) */
body.light-mode .quiz-submit {
    background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
    color: white !important;
}

/* 커뮤니티 버튼 색상 - 라이트 모드 */
body.light-mode .btn-question {
    background: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: #1d4ed8 !important;
}

body.light-mode .btn-suggest {
    background: rgba(34, 197, 94, 0.15) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    color: #15803d !important;
}

/* 댓글 시스템 - 라이트 모드 */
body.light-mode .comment-form textarea {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-mode .comment-form textarea:focus {
    border-color: #7c3aed !important;
}

body.light-mode .comment-item {
    background: #f8fafc !important;
}

body.light-mode .comment-author {
    color: #7c3aed !important;
}

body.light-mode .comment-date {
    color: #64748b !important;
}

body.light-mode .comment-content {
    color: #334155 !important;
}

/* ===== 다이어그램 라이트 모드 ===== */
body.light-mode .scope-diagram,
body.light-mode .ascii-diagram,
body.light-mode .diagram-box {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ===== term-detail-section 라이트 모드 (인라인 style 속성 덮어쓰기) ===== */
body.light-mode .term-detail-section {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-mode .term-detail-section h2,
body.light-mode .term-detail-section h3,
body.light-mode .term-detail-section h4 {
    color: #1e293b !important;
}

body.light-mode .term-detail-section p,
body.light-mode .term-detail-section li,
body.light-mode .term-detail-section span {
    color: #334155 !important;
}
