* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #040b1b; color: #94a3b8; font-family: 'Inter', sans-serif; overflow: hidden; }
.top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #040b1b;
    border-bottom: 1px solid #0b1627;
    height: 44px;
}
.market-select {
    background: #0e1521;
    border: 1px solid #1e293b;
    color: #38bdf8;
    font-size: 15px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}
.market-select option { background: #0e1521; }
.top-label { font-size: 11px; color: #334155; letter-spacing: 2px; margin-left: auto; }
.stat-sep { width: 1px; height: 22px; background: #1e293b; flex-shrink: 0; }
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-lbl { font-size: 9px; color: #475569; letter-spacing: 0.5px; white-space: nowrap; }
.stat-val { font-size: 12px; font-weight: 600; color: #94a3b8; white-space: nowrap; }
.chart-wrap { position: relative; cursor: grab; }
.chart-wrap.dragging { cursor: grabbing; }
canvas { display: block; }
.legend {
    position: absolute;
    top: 10px;
    left: 12px;
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: #475569;
    pointer-events: none;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 2px; }
.bar-tooltip {
    position: absolute;
    pointer-events: none;
    display: none;
    background: rgba(10, 18, 35, 0.95);
    border: 1px solid #1e3a5f;
    border-radius: 6px;
    padding: 7px 11px;
    font-size: 12px;
    line-height: 1.7;
    color: #94a3b8;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
@keyframes statFlash {
    0%   { background: rgba(56, 189, 248, 0.22); border-radius: 4px; }
    100% { background: transparent; }
}
.stat-flash { animation: statFlash 0.6s ease-out; }
#control-bars {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 5px 16px;
    background: #040b1b;
    border-bottom: 1px solid #0b1627;
}
.ctrl-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ctrl-label {
    font-size: 10px;
    color: #475569;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
#drag-bar {
    width: 400px;
    height: 18px;
    background: #0a1223;
    border: 1px solid #1e293b;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
}
#drag-bar.dragging { cursor: grabbing; }
#size-thumb {
    position: absolute;
    width: 30px;
    height: 100%;
    background: #2a3458;
    border-radius: 9px;
    cursor: grab;
}
#size-thumb.dragging { cursor: grabbing; }
#scroll-bar-wrap {
    width: 400px;
    height: 18px;
    background: #0a1223;
    border: 1px solid #1e293b;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
#scroll-thumb {
    position: absolute;
    height: 100%;
    background: #2a3458;
    border-radius: 9px;
    cursor: grab;
    min-width: 20px;
}
#scroll-thumb.dragging { cursor: grabbing; }
#btn-reset {
    height: 18px;
    padding: 0 10px;
    background: #0e1521;
    border: 1px solid #1e293b;
    border-radius: 4px;
    color: #475569;
    font-size: 10px;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
#btn-reset:hover { color: #94a3b8; border-color: #38bdf8; }
.btn-zoom { height: 18px; padding: 0 8px; background: #0e1521; border: 1px solid #1e293b; border-radius: 4px; color: #475569; font-size: 10px; cursor: pointer; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.btn-zoom:hover { color: #94a3b8; border-color: #38bdf8; }
.ctrl-sep { width: 1px; height: 18px; background: #1e293b; flex-shrink: 0; }
.cnt-val { font-size: 12px; font-weight: 600; }