/* [v35.108] Design System v35.108 - Premium Dashboard Edition */

:root {
    --primary-blue: #3182f6;
    --primary-blue-soft: #e8f3ff;
    --primary-orange: #ff8c00;
    --primary-orange-soft: #fff4e8;
    --success-green: #2ecc71;
    --danger-red: #f04452;
    --bg-main: #f2f4f6;
    --bg-card: #ffffff;
    --text-main: #191f28;
    --text-sub: #4e5968;
    --text-light: #8b95a1;
    --border-light: #e5e8eb;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
    
    /* [v35.108] Dynamic Brand Colors */
    --primary-brand: var(--primary-blue);
    --primary-brand-soft: var(--primary-blue-soft);
}

/* [v35.108] Pension Theme Overrides */
body.pension-theme {
    --primary-brand: var(--primary-orange);
    --primary-brand-soft: var(--primary-orange-soft);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: 'Noto Sans KR', sans-serif; margin: 0; line-height: 1.5; word-break: keep-all; }

/* Base Layout & Spacing */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 40px; /* 좌우 넉넉한 여백 확보 */
    width: 100%;
}

.container.wide { max-width: 1280px; }
.container.full-wide { max-width: 98%; padding: 0 20px; }

/* 0. Header & Nav Fix */
[data-ui="header"] { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light); 
    position: sticky; top: 0; z-index: 1000; 
}
[data-ui="header-inner"] { 
    padding: 12px 40px; 
    max-width: 1280px; 
    margin: 0 auto; 
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    [data-ui="header-inner"] { padding: 12px 20px; }
}
[data-ui="header-row"] { display: flex; justify-content: space-between; align-items: center; }
[data-ui="logo"] { font-weight: 900; font-size: 1.2rem; color: var(--primary-brand); text-decoration: none; letter-spacing: -0.5px; }

[data-ui="nav-links"] { display: flex; gap: 6px; align-items: center; }

/* 로또/연금 서비스 스위처 */
[data-ui="site-switcher"] { 
    display: flex; align-items: center; padding: 2px 4px; 
    background: #f1f3f5; border-radius: 12px; margin-right: 15px; 
    border: 1px solid #e5e8eb; 
}
[data-ui="switcher-btn"] { 
    padding: 6px 12px; font-size: 0.75rem; font-weight: 800; 
    text-decoration: none; border-radius: 9px; display: flex; 
    align-items: center; gap: 4px; transition: all 0.2s; color: #8b95a1; 
}
[data-ui="switcher-btn"][data-active="true"] { 
    background: white; box-shadow: 0 2px 6px rgba(0,0,0,0.08); color: var(--primary-brand); 
}

/* 네비게이션 버튼 */
[data-ui="nav-btn"] { 
    padding: 10px 16px; border-radius: 10px; font-size: 0.85rem; 
    font-weight: 700; color: var(--text-sub); text-decoration: none; 
    transition: all 0.2s; 
}
[data-ui="nav-btn"]:hover { background: #f2f4f6; color: var(--primary-brand); }
[data-ui="nav-btn"][data-active="true"] { background: var(--primary-brand); color: white; }

@media (max-width: 992px) {
    [data-ui="header-row"] { flex-direction: column; gap: 10px; }
    [data-ui="site-switcher"] { margin-right: 0; }
    [data-ui="nav-btn"] { padding: 8px 10px; font-size: 0.75rem; }
}

/* 1. Dashboard Welcome Guide */
.dashboard-welcome-guide {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--radius-lg);
    padding: 45px;
    margin-bottom: 50px;
    border: 1px solid rgba(49, 130, 246, 0.1);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}
.dashboard-welcome-guide::after { content: "MATRIX CDM"; position: absolute; right: -20px; bottom: -10px; font-size: 5rem; font-weight: 900; color: var(--primary-brand); opacity: 0.03; pointer-events: none; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 30px; }
.guide-card { padding: 25px; border-radius: 16px; background: white; border: 1px solid #f1f3f5; transition: 0.3s; }
.guide-card:hover { transform: translateY(-5px); border-color: var(--primary-brand); }
.guide-card h3 { color: var(--primary-brand); margin: 0 0 12px 0; font-size: 1.1rem; }
.guide-card p { font-size: 0.9rem; color: var(--text-sub); line-height: 1.7; margin: 0; }

/* 2. Analysis Report Cards */
.indicator-detail-row {
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 35px;
    border: 1px solid #edf2f7;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
    overflow: hidden;
}
.indicator-header-row { padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1f3f5; background: #fafbfc; }
.indicator-label { font-size: 1.25rem; font-weight: 900; color: #1e293b; letter-spacing: -0.5px; }
.header-value-info { text-align: right; }
.current-value { font-size: 1.8rem; font-weight: 900; color: var(--primary-brand); margin-right: 4px; }
.header-value-info small { color: var(--text-light); font-size: 0.9rem; }

/* 3. Visual & Text Area (반응형 최적화) */
.indicator-visual-area { 
    display: flex; 
    flex-wrap: wrap; /* 폭이 좁아지면 아래로 */
    gap: 30px; 
    background: #fcfcfd; 
    padding: 30px; 
    border-radius: 20px; 
    margin: 24px 30px; 
    border: 1px solid #f1f5f9; 
}
.chart-box, .table-box { 
    flex: 1; 
    min-width: 320px; /* 700px 이하에서 두 줄로 전환 유도 */
    background: white; 
    padding: 25px; 
    border-radius: 16px; 
    border: 1px solid #e2e8f0; 
}
.chart-box { flex: 1.5; }
@media (max-width: 768px) {
    .indicator-visual-area { margin: 15px; padding: 15px; gap: 15px; }
    .chart-box, .table-box { min-width: 100%; }
}
.box-header { color: #64748b; font-size: 0.8rem; font-weight: 800; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; margin-bottom: 20px; display: block; }

.indicator-text-area { padding: 0 30px 35px; }
.ai-insight-content { background: white; padding: 25px; border-radius: 16px; font-size: 1rem; line-height: 1.9; color: #334155; border: 1px solid #f1f5f9; text-align: justify; }
.ai-strategy-tip { margin-top: 25px; background: #eff6ff; color: #1e40af; border-left: 6px solid #3b82f6; padding: 25px; border-radius: 12px; font-size: 0.95rem; }

/* 4. Badges & Balls */
.status-badge { padding: 4px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; margin-left: 15px; }
[data-status="safe"] { background: #e7f9ed; color: #1ea54c; }
[data-status="warning"] { background: #fff5e6; color: #ff9500; }
[data-status="danger"] { background: #fff2f2; color: var(--danger-red); }

[data-ui="ball-container"] {
    display: flex !important;
    flex-flow: row nowrap !important; /* 줄바꿈 절대 방지 */
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
}

[data-ui="ball"] { 
    width: 28px; height: 28px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-weight: 800; 
    font-size: 0.75rem; 
    flex-shrink: 0; 
}
[data-size="mini"] [data-ui="ball"] { width: 22px; height: 22px; font-size: 0.65rem; }
[data-color="yellow"] { background: #f1c40f; }
[data-color="blue"] { background: #3498db; }
[data-color="red"] { background: #e74c3c; }
[data-color="gray"] { background: #95a5a6; }
[data-color="green"] { background: #2ecc71; }
.table-responsive {
    width: 100%;
    overflow: auto;
    /* [v35.108] 대시보드 가독성을 위해 테이블 최대 높이를 약 20줄 분량(640px)으로 제한합니다.
       기존 780px에서 축소하여 한 화면에 더 많은 정보를 효율적으로 배치합니다. */
    max-height: 640px; 
    background: white;
}

[data-ui="table"] th { text-align: left; padding: 8px 12px; color: #94a3b8; font-weight: 700; border-bottom: 1px solid #f1f3f5; background: white; }
[data-ui="table"] td { padding: 8px 12px; border-bottom: 1px solid #f8fafc; background: white; }

/* [v35.108] Billboard Mode: Vertical Header & High Density */
[data-ui="table"].billboard-mode { font-size: 11px; }
[data-ui="table"].billboard-mode th,
[data-ui="table"].billboard-mode td { padding: 4px 6px; text-align: center; }

[data-ui="table"].billboard-mode th.vertical-header {
    height: 160px;
    position: sticky;
    top: 0;
    z-index: 55;
    padding: 0;
    vertical-align: middle;
    min-width: 35px;
    background: #f8fafc; /* 배경색 추가 */
}

[data-ui="table"].billboard-mode th.vertical-header .header-content {
    position: absolute;
    bottom: 80px; /* 160px의 절반인 80px로 위치시켜 중앙 정렬 */
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transform-origin: center center;
    white-space: nowrap;
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: left;
    width: 160px; /* 텍스트 가로 공간 확보 */
}

[data-ui="table"].billboard-mode td[data-sticky="true"],
[data-ui="table"].billboard-mode th[data-sticky="true"] {
    background: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

/* [v35.108] Premium Dashboard Multi-Sticky (Grid Based) */
.indicator-detail-row.sticky-threshold {
    position: sticky;
    z-index: 200;
    width: 100%;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
    background: white;
}

[data-row-index="head"] { top: 72px; z-index: 210 !important; } /* 상단 네비게이션(72px) 바로 아래 */
[data-row-index="0"] { top: 232px; z-index: 204; } /* 72 + 160(Header) = 232px */
[data-row-index="1"] { top: 266px; z-index: 203; } /* 232 + 34 = 266px */
[data-row-index="2"] { top: 298px; z-index: 202; } /* 266 + 32 = 298px */
[data-row-index="3"] { top: 330px; z-index: 201; box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important; }

/* 분석 중인 번호 표시 영역 (스티키 헤더 내부) */
#analysis-target-balls-sticky {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* 프리미엄 리스트 컨테이너 여백 조정 */
.indicator-detail-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 그리드 내 세로 헤더 텍스트 위치 정밀 보정 */
.indicator-detail-row.sticky-threshold .vertical-header .header-content {
    bottom: 12px;
    left: 14px;
}

/* [v35.108] Table Sticky Headers & Rows */
[data-ui="table"] thead th {
    position: sticky;
    top: 0;
    z-index: 150; /* 지표 헤더가 가장 위에 옵니다. */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background: white;
}

/* [v35.108] 임계치 다중 고정 (Multi-Sticky Layers) */
.sticky-threshold td {
    position: sticky;
    z-index: 140; /* 헤더보다는 아래, 데이터 행보다는 위 */
    background: white;
}

/* 각 행별로 높이에 맞게 위에서부터 배치합니다. */
/* index 0: 안전Max (Top: 160px) */
[data-row-index="0"] td { top: 160px; z-index: 144; }
/* index 1: 골드Max (Top: 160 + 34 = 194px) */
[data-row-index="1"] td { top: 194px; z-index: 143; }
/* index 2: 골드Min (Top: 194 + 32 = 226px) */
[data-row-index="2"] td { top: 226px; z-index: 142; }
/* index 3: 안전Min (Top: 226 + 32 = 258px) */
[data-row-index="3"] td { top: 258px; z-index: 141; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* 스티키 컬럼(회차, 날짜 등)이 상단 고정 영역과 만날 때의 처리 */
[data-row-index] td[data-sticky="true"] {
    z-index: 160 !important; /* 상단 고정 행의 왼쪽 컬럼들은 더 높은 우선순위 */
}
thead th[data-sticky="true"] {
    z-index: 170 !important; /* 지표 헤더의 왼쪽 컬럼들이 최상위 */
}

[data-sticky="true"] {
    position: sticky !important;
    left: 0;
    z-index: 60 !important;
}

/* 6. Combination Page Specifics */
[data-ui="selection-layout-container"] { 
    display: flex; gap: 40px; justify-content: center; align-items: flex-start; padding: 20px 0;
}

[data-ui="lotto-paper"] {
    background: white; border: 2px solid #eef2f6; border-radius: 24px; padding: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}

[data-ui="number-grid"] {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}

[data-ui="select-ball"] {
    width: 42px; height: 42px; border: 1px solid #edf2f7; background: #fff;
    border-radius: 12px; font-weight: 700; color: #4a5568; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-size: 0.95rem;
}
[data-ui="select-ball"]:hover { border-color: var(--primary-brand); color: var(--primary-brand); background: var(--primary-brand-soft); }
[data-status="selected-manual"] { 
    background: var(--primary-brand) !important; color: white !important; 
    border-color: var(--primary-brand) !important; font-weight: 800; transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
}

[data-ui="btn"] {
    padding: 14px 20px; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: all 0.2s; border: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
[data-type="auto"] { background: var(--primary-brand-soft); color: var(--primary-brand); }
[data-type="reset"] { background: #f2f2f7; color: #8e8e93; }
[data-type="analyze"] { 
    background: var(--primary-brand); color: white; width: 100%; margin-top: 20px; font-size: 1rem;
}
[data-type="analyze"]:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }

[data-ui="result-summary"] {
    background: white; border: 1px solid var(--border-light); border-radius: 24px;
    padding: 30px; display: flex; align-items: center; gap: 30px; margin-bottom: 30px;
}

[data-ui="score-badge"] {
    width: 100px; height: 100px; border-radius: 50%; border: 8px solid var(--primary-brand-soft);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: white; flex-shrink: 0; font-weight: 900; color: var(--primary-brand);
}
#combination-score { font-size: 2.2rem; line-height: 1; }

/* Mobile */
@media (max-width: 1100px) {
    [data-ui="selection-layout-container"] { flex-direction: column; align-items: center; }
}

/* 7. Analysis Result Cards (Combination Page) */
.analysis-result-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.result-card-item {
    background: white;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease-out both;
}

.result-card-item:hover {
    border-color: var(--primary-brand-soft);
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    transform: translateX(5px);
}

.result-card-item .item-info {
    flex: 0 0 140px;
}

.result-card-item .item-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 4px;
}

.result-card-item .item-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #1e293b;
}

.result-card-item .item-value-box {
    flex: 0 0 100px;
    text-align: center;
}

.result-card-item .item-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary-brand);
}

.result-card-item .item-status {
    flex: 0 0 80px;
    display: flex;
    justify-content: center;
}

.result-card-item .item-insight {
    flex: 1;
    font-size: 0.9rem;
    color: #4e5968;
    line-height: 1.6;
    padding-left: 20px;
    border-left: 1px solid #f1f3f5;
}

@media (max-width: 850px) {
    .result-card-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .result-card-item .item-info, .result-card-item .item-value-box, .result-card-item .item-status { flex: none; width: 100%; text-align: left; }
    .result-card-item .item-status { justify-content: flex-start; }
    .result-card-item .item-insight { padding-left: 0; border-left: none; border-top: 1px solid #f1f3f5; pt: 12px; }
}

/* 8. Mini Indicator Cards (Main Page Summary) */
[data-ui="indicator-card"] {
    display: flex !important;
    flex-direction: column !important; /* 내부 요소는 수직(라벨/수치)으로 배치하여 폭 절약 */
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 12px !important;
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid #edf2f7 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    min-width: 100px !important;
    flex: 1 1 auto !important;
}

[data-ui="indicator-card"]:hover {
    transform: translateY(-3px) !important;
    border-color: var(--primary-brand);
    box-shadow: 0 8px 20px rgba(49, 130, 246, 0.1) !important;
}

[data-ui="indicator-card"] [data-ui="label"] {
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
    text-align: center !important;
}

[data-ui="indicator-card"] [data-ui="value-group"] {
    display: flex !important;
    align-items: baseline !important;
    gap: 2px !important;
    margin-bottom: 6px !important;
}

[data-ui="indicator-card"] [data-ui="value"] {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    color: var(--text-main) !important;
}

[data-ui="indicator-card"] [data-ui="unit"] {
    font-size: 0.6rem !important;
    color: #cbd5e1 !important;
}

[data-ui="indicator-card"] [data-ui="badge"] {
    font-size: 0.6rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 900 !important;
    min-width: 35px !important;
    text-align: center !important;
}

/* 상태별 미세 배경 강조 */
[data-ui="indicator-card"][data-status="warning"] { background: #fffdf5 !important; border-color: #fef3c7 !important; }
[data-ui="indicator-card"][data-status="danger"] { background: #fffafb !important; border-color: #fee2e2 !important; }

/* [v35.108] Premium Table Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Ensure sticky columns are visible on top of rows */
.custom-scrollbar table th[style*="position: sticky"],
.custom-scrollbar table td[style*="position: sticky"] {
    box-shadow: 4px 0 8px rgba(0,0,0,0.08);
}


/* [v35.108] Full-Wide Layout & Sticky Integration */
.container.full-wide { width: 100%; max-width: 100%; padding: 0 20px; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--border-light); background: white; }

.history-table th, .history-table td { white-space: nowrap; padding: 12px 15px; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); font-size: 0.85rem; text-align: center; }
.history-table [data-sticky="true"] { position: sticky; left: 0; background: white; z-index: 10; border-right: 2px solid var(--border-light); }
.history-table [data-col="1"] { left: 0; z-index: 12; width: 60px; min-width: 60px; }
.history-table [data-col="2"] { left: 60px; z-index: 11; width: 100px; min-width: 100px; }
.history-table [data-col="3"] { left: 160px; z-index: 10; width: 220px; min-width: 220px; border-right: 3px solid #edf2f7; }

/* Sticky Header & Threshold Rows Layering */
.history-table thead th { position: sticky; top: 0; z-index: 80; background: #f8fafc; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.sticky-threshold td { position: sticky; z-index: 60; }
.sticky-threshold [data-sticky="true"] { z-index: 75; }

/* Vertical Header Support (Compact & Precise) */
.vertical-header { vertical-align: bottom; height: 160px; padding: 0 !important; width: 35px !important; min-width: 35px !important; max-width: 35px !important; position: sticky; overflow: visible; }
/* [v35.110] Advanced Indicator Tooltip System */
.indicator-tooltip {
    position: fixed;
    z-index: 2000;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 24px;
    border-radius: 20px;
    font-size: 0.85rem;
    line-height: 1.7;
    width: 420px;
    max-width: 90vw;
    max-height: 70vh;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(15px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
}

.indicator-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 툴팁 내부 마크다운 스타일링 */
.indicator-tooltip h2 { font-size: 1.1rem; color: #fff; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 800; }
.indicator-tooltip h3 { font-size: 0.95rem; color: #60a5fa; margin: 15px 0 8px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.indicator-tooltip p { margin: 8px 0; color: #cbd5e1; }
.indicator-tooltip strong { color: #fff; font-weight: 900; }
.indicator-tooltip ul { margin: 8px 0; padding-left: 18px; list-style-type: none; }
.indicator-tooltip li { position: relative; margin-bottom: 6px; color: #cbd5e1; }
.indicator-tooltip li::before { content: "•"; position: absolute; left: -14px; color: #3182f6; font-weight: 900; }
.indicator-tooltip hr { border: none; border-top: 1px solid rgba(255,255,255,0.05); margin: 20px 0; }

.indicator-tooltip .tooltip-header {
    margin: -24px -24px 20px;
    padding: 16px 24px;
    background: rgba(49, 130, 246, 0.1);
    border-bottom: 1px solid rgba(49, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.indicator-tooltip .tooltip-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: #60a5fa;
}

.indicator-tooltip .tooltip-footer {
    margin-top: 25px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

/* 커스텀 스크롤바 */
.indicator-tooltip::-webkit-scrollbar { width: 5px; }
.indicator-tooltip::-webkit-scrollbar-track { background: transparent; }
.indicator-tooltip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.indicator-tooltip::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* 세로형 헤더 호버 시 시각적 피드백 */
.vertical-header:hover {
    background: rgba(49, 130, 246, 0.05) !important;
    cursor: help;
}

/* [v35.110] Advanced Indicator Tooltip System */
.indicator-tooltip {
    position: fixed;
    z-index: 2000;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 24px;
    border-radius: 20px;
    font-size: 0.85rem;
    line-height: 1.7;
    width: 420px;
    max-width: 90vw;
    max-height: 70vh;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(15px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
}

.indicator-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 툴팁 내부 마크다운 스타일링 */
.indicator-tooltip h2 { font-size: 1.1rem; color: #fff; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 800; }
.indicator-tooltip h3 { font-size: 0.95rem; color: #60a5fa; margin: 15px 0 8px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.indicator-tooltip p { margin: 8px 0; color: #cbd5e1; }
.indicator-tooltip strong { color: #fff; font-weight: 900; }
.indicator-tooltip ul { margin: 8px 0; padding-left: 18px; list-style-type: none; }
.indicator-tooltip li { position: relative; margin-bottom: 6px; color: #cbd5e1; }
.indicator-tooltip li::before { content: "•"; position: absolute; left: -14px; color: #3182f6; font-weight: 900; }
.indicator-tooltip hr { border: none; border-top: 1px solid rgba(255,255,255,0.05); margin: 20px 0; }

.indicator-tooltip .tooltip-header {
    margin: -24px -24px 20px;
    padding: 16px 24px;
    background: rgba(49, 130, 246, 0.1);
    border-bottom: 1px solid rgba(49, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.indicator-tooltip .tooltip-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: #60a5fa;
}

.indicator-tooltip .tooltip-footer {
    margin-top: 25px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

/* 커스텀 스크롤바 */
.indicator-tooltip::-webkit-scrollbar { width: 5px; }
.indicator-tooltip::-webkit-scrollbar-track { background: transparent; }
.indicator-tooltip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.indicator-tooltip::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* 세로형 헤더 호버 시 시각적 피드백 */
.vertical-header:hover {
    background: rgba(49, 130, 246, 0.05) !important;
    cursor: help;
}
