/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0b0e11;
    color: #aeaeae;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header - Single Row */
#top-bar {
    height: 50px;
    background-color: #161a1e;
    border-bottom: 1px solid #2b3139;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

#sidebar-toggle {
    background: none;
    border: none;
    color: #848e9c;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
}

#sidebar-toggle:hover {
    color: #f0b90b;
}

.app-title {
    font-size: 14px;
    font-weight: 500;
    color: #eaecef;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.control-group label {
    color: #848e9c;
}

.control-group select {
    background: #161a1e;
    color: #eaecef;
    border: 1px solid #2b3139;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.control-group input[type="number"] {
    background: #2b3139;
    border: 1px solid #474d57;
    border-radius: 4px;
    color: #eaecef;
    padding: 4px 8px;
    width: 80px;
    font-size: 12px;
}

/* === COLORFUL SLIDERS === */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

/* Heatmap Slider - Orange to Red gradient */
.slider-heatmap {
    background: linear-gradient(to right, #f7931a, #ff4444);
}

/* Bubbles Slider - Cyan to Blue gradient */
.slider-bubbles {
    background: linear-gradient(to right, #00d9ff, #0066ff);
}

/* Cutoff Slider - Green to Yellow gradient */
.slider-cutoff {
    background: linear-gradient(to right, #00ff88, #f0b90b);
}

/* Slider Thumb */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.status {
    font-size: 12px;
    color: #848e9c;
}

/* Main Content */
#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 120px;
    background-color: #161a1e;
    border-right: 1px solid #2b3139;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
    border-right: none;
}

.sidebar-header {
    padding: 12px 8px;
    border-bottom: 1px solid #2b3139;
    font-size: 11px;
    font-weight: 600;
    color: #848e9c;
    text-align: center;
}

#symbol-search {
    width: calc(100% - 16px);
    margin: 8px;
    padding: 6px 8px;
    background: #2b3139;
    border: 1px solid #474d57;
    border-radius: 4px;
    color: #eaecef;
    font-size: 11px;
}

#symbol-list {
    flex: 1;
    overflow-y: auto;
}

.symbol-item {
    padding: 10px 8px;
    cursor: pointer;
    border-bottom: 1px solid #1e2329;
    transition: background 0.2s;
    font-size: 11px;
    display: flex;
    justify-content: center;
    text-align: center;
}

.symbol-item:hover {
    background-color: #2b3139;
}

.symbol-item.active {
    background-color: #2b3139;
    color: #f0b90b;
    border-left: 3px solid #f0b90b;
}

/* Main View */
#main-view {
    flex: 1;
    position: relative;
    background-color: #0b0e11;
    overflow: hidden;
}

#heatmap-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #1e2329;
    pointer-events: none;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f0b90b;
    display: none;
}

.loader.visible {
    display: block;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 900px) {
    .controls {
        gap: 12px;
    }

    .slider {
        width: 80px;
    }

    .app-title {
        font-size: 12px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    #top-bar {
        height: auto;
        min-height: 50px;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .controls {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }

    .slider {
        width: 60px;
    }

    .sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(0);
        width: 200px;
        z-index: 100;
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: 200px;
    }

    #main-view {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-title {
        display: none;
    }

    .control-group label {
        display: none;
    }
}