/* =================================================================
   개념 학습 문서 스타일시트 (document.css) v4.0 Final
   - 최종판: 모든 단원(1~8) 공통 적용 및 전체 스타일 완성
   - 작성자: 머신러닝 스승
   ================================================================= */

/* ----------------------------------------------
   1. 기본 및 레이아웃 (Base & Layout)
---------------------------------------------- */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.8;
    word-break: keep-all;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
}

/* ----------------------------------------------
   2. 타이포그래피 (Typography)
---------------------------------------------- */
.document-header {
    margin-bottom: 4rem;
}
.document-header .subtitle {
    font-size: 1.2rem;
    color: #495057;
}

h1, h2, h3 {
    font-weight: 900;
    color: #0056b3;
    letter-spacing: -0.05em;
}
h1 {
    font-size: 3rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #0056b3;
    margin-bottom: 1rem;
}
h2 {
    font-size: 2.2rem;
    border-left: 5px solid #0056b3;
    padding-left: 1rem;
    margin-top: 4.5rem;
    margin-bottom: 1.5rem;
}
h3 {
    font-size: 1.7rem;
    color: #004085;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}
.emphasis-text { /* 8단원 추가 */
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 2rem 0;
}
.emphasis-text strong { color: #b91c1c; }

/* 목록 스타일 */
ul, ol {
    padding-left: 0;
    margin: 1.5rem 0;
}
ul li, ol li {
    margin-bottom: 1rem;
}
ol { list-style-type: decimal; padding-left: 1.5rem; }
.icon-list { list-style-type: none; }
.icon-list li { padding-left: 2.5rem; position: relative; }
.icon-list .fa-solid { position: absolute; left: 0; top: 0.4rem; font-size: 1.2em; }
.item-green .fa-solid { color: #22c55e; }
.item-red .fa-solid { color: #ef4444; }
.item-blue .fa-solid { color: #3b82f6; }
.list-bullet-blue { list-style-type: none; }
.list-bullet-blue li { position: relative; padding-left: 1.5rem; }
.list-bullet-blue li::before { content: '🔹'; position: absolute; left: 0; top: 0.1rem; }

code {
    background-color: #e9ecef; color: #c92a2a;
    padding: 0.3em 0.6em; border-radius: 6px;
    font-family: 'D2Coding', 'Consolas', monospace;
    font-size: 0.95em; border: 1px solid #dee2e6;
}
.formula { /* 8단원 추가 */
    font-weight: 700; font-size: 1.1rem;
}

strong {
    color: #0056b3;
    font-weight: 700;
}

/* ----------------------------------------------
   3. 컴포넌트 (Components)
---------------------------------------------- */
.info-box, .warning-box, .example-box, .warning-box-red {
    border-radius: 12px; padding: 2.5rem;
    margin: 2.5rem 0; border-left-width: 5px;
    border-left-style: solid; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.info-box h3, .warning-box h3, .example-box h3, .warning-box-red h3 {
    margin-top: 0; margin-bottom: 1rem;
}

.info-box { background-color: #e7f5ff; border-color: #1c7ed6; }
.info-box h3 { color: #1864ab; }
.warning-box { background-color: #fff4e6; border-color: #ff8c00; }
.warning-box h3 { color: #d97706; }
.example-box { background-color: #f1f3f5; border-color: #868e96; }
.example-box h3 { color: #495057; }
.example-box h3 .fa-solid { color: #868e96; }
.warning-box-red { background-color: #ffe8e8; border-color: #d94848; } /* 8단원 추가 */
.warning-box-red h3 { color: #b32d2d; }

/* 오차 행렬 테이블 (8단원 추가) */
.confusion-matrix {
    width: 100%; border-collapse: collapse;
    margin: 2.5rem 0; font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.confusion-matrix th, .confusion-matrix td {
    border: 1px solid #dee2e6; padding: 1rem;
    text-align: center; vertical-align: middle;
}
.confusion-matrix th { background-color: #f1f3f5; font-weight: 700; }
.confusion-matrix td strong { font-size: 1.1rem; display: block; margin-bottom: 0.25rem; }
.confusion-matrix td small { font-size: 0.85rem; color: #495057; }
.cm-tp { background-color: #dcfce7; color: #166534; } /* True Positive */
.cm-fn { background-color: #ffedd5; color: #9a3412; } /* False Negative */
.cm-fp { background-color: #fee2e2; color: #991b1b; } /* False Positive */
.cm-tn { background-color: #dbeafe; color: #1e40af; } /* True Negative */

/* ----------------------------------------------
   4. 꼬리말 (Footer)
---------------------------------------------- */
footer {
    text-align: center; margin-top: 5rem;
    padding-top: 2rem; border-top: 2px solid #e9ecef;
}
footer p { color: #6c757d; margin: 0; }
footer .copyright { font-size: 0.875rem; margin-top: 0.5rem; }