* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body {
    
}
.wrap {
    display: flex;
    margin: 20px auto;
    padding: 0 16px;
    gap: 16px;
}
.title-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
}
.title-area img { width: 28px; height: 28px; }
.title-area h2 { font-size: 18px; font-weight: 600; color: #e2e8f0; }
.title-area .date-info { font-size: 13px; color: #94a3b8; margin-left: auto; }
.option-bar {
    margin: 16px;
}
.option-bar label {
    border-bottom: 1px solid #222;
    padding: 0px 20px 5px 5px;
}
.option-bar label {
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.option-bar input[type="checkbox"] {
    accent-color: #10b981;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.Block_Left {
    flex: 1;
}
.chart-box {
    background: #1a1f3a;
    border: 1px solid #2a3458;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}
.chart-label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 10px;
}
.chart-label .legend-bid { color: #10b981; }
.chart-label .legend-ask { color: #f43f5e; }
canvas { width: 100%; display: block; }

/* 투블럭 */
.Block_Right {
    flex: 1;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}
.two-block .block-left {
    flex: 1;
    min-width: 0;
}
.two-block .block-right {
    flex: 1;
    min-width: 0;
}
.two-block .chart-box {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 매수/매도 비율 */
.ratio-header {
    text-align: center;
    margin-bottom: 12px;
}
.ratio-header .price {
    font-size: 22px;
    font-weight: 700;
    color: #e2e8f0;
}
.ratio-header .rate-up {
    font-size: 14px;
    color: #10b981;
    margin-left: 8px;
}
.ratio-header .rate-down {
    font-size: 14px;
    color: #f43f5e;
    margin-left: 8px;
}
.ratio-blocks {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex: 1;
}
.ratio-block {
    flex: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ratio-block .pct {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}
.ratio-block.bid { background: #10b981; }
.ratio-block.ask { background: #f43f5e; }

/* TOP 3 텍스트 */
.top3-text {
    margin-top: 12px;
}
.top3-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 13px;
    color: #cbd5e1;
}
.top3-item .rank {
    font-weight: 700;
    width: 24px;
    text-align: center;
    font-size: 14px;
}
.top3-item .rank-1 { color: #fbbf24; }
.top3-item .rank-2 { color: #94a3b8; }
.top3-item .rank-3 { color: #cd7f32; }
.top3-item .hour {
    color: #94a3b8;
    width: 44px;
}
.top3-item .vol {
    margin-left: auto;
    font-weight: 600;
}

@media (max-width: 600px) {
    .two-block { flex-direction: column; }
    .two-block .chart-box { height: auto; }
}




/* 토글 스위치 스타일 추가 */
.option-bar { display: flex; align-items: center; padding: 10px 20px; gap: 10px; }
.option-bar .opt-label { font-size: 13px; color: #94a3b8; font-weight: 500; }
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #3b82f6; }
input:checked + .slider:before { transform: translateX(20px); }