* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #161e30;
    color: #e2e8f0;
    font-family: -apple-system, sans-serif;
}

#CHART_LIST {
    padding: 10px 8px 60px 8px;
}

.Title_Img {
    border-bottom: 1px solid #5d6488;
}
.Title_Img img {
    width: 100%;
    display: block;
}
.Chart_Sticky_Top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #161e30;
    margin: -10px -8px 0;
}

/* 설치된 툴바 상단 간격은 section 패딩 대신 여기서 복원 */
.toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 8px 10px;
}

.toolbar-left { width: 100%; }

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

#searchInput {
    width: 100%;
    padding: 9px 12px;
    border-radius: 4px;
    border: 1px solid #5d6488;
    background: #040b1b;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
}
#searchInput::placeholder { color: #64748b; }
#searchInput:focus { border-color: #3b82f6; }

/* ===== 정렬 버튼 ===== */
.sort-btn {
    padding: 7px 10px;
    border-radius: 4px;
    border: 1px solid #5d6488;
    background: #040b1b;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.sort-btn:hover  { border-color: #3b82f6; color: #e2e8f0; }
.sort-btn.active { border-color: #3b82f6; color: #fff; }
.sort-btn .arrow { font-size: 11px; min-width: 10px; text-align: center; }

/* ===== 버튼 ===== */
.button_right {
    display: flex;
    margin-left: auto;
    gap: 6px;
}
.btn_style {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    border: 1px solid #5d6488;
    background: #040b1b;
    font-size: 12px;
    cursor: pointer;
}
.btn_style2 {
    width: 33px;
    height: 33px;
    border-radius: 4px;
    border: 1px solid #0033ac;
    background: #004cff;
}
.btn_style img {
    filter: grayscale(100%);
    margin-top: 2px;
}
.btn_style2 img {
    margin-top: 2px;
}
.btn_style:hover {
    border: 1px solid #0033ac;
    background: #004cff;
    transition: background-color 0.7s ease;
}
.btn_style:hover img {
    filter: grayscale(0%);
    transition: filter 0.7s ease;
}

/* ===== 행 ===== */
.chart-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #040b1b;
    border: 1px solid #5d6488;
    border-radius: 5px;
    padding: 10px 12px;
    margin-bottom: 6px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s;
}
.chart-row:active { border-color: #3b82f6; }

/* 왼쪽 */
.row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 100px;
    min-width: 0;
}
.row-left img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.row-symbol {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-korname {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 중앙 차트 */
.row-chart {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.row-chart canvas {
    display: block;
    width: 100%;
    max-width: 200px;
    height: 44px;
}

/* 오른쪽 */
.row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 80px;
    min-width: 0;
}
.row-price {
    font-size: 13px;
    font-weight: bold;
    color: #e2e8f0;
    white-space: nowrap;
}
.row-rate {
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.up   { color: #00ff00; }
.dn   { color: #ff0000; }
.flat { color: #94a3b8; }

.no-result {
    text-align: center;
    color: #64748b;
    padding: 40px 0;
    font-size: 13px;
}

/* ===== 로딩 ===== */
#load-indicator {
    text-align: center;
    padding: 12px 0;
    color: #64748b;
    font-size: 13px;
    display: none;
}
#scroll-trigger { height: 1px; }

/* ===== 스크롤바 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #5d6488; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }
* { scrollbar-width: thin; scrollbar-color: #5d6488 #0f172a; }