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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    overflow-x: hidden;
}

#controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

#ticker-select {
    padding: 6px 12px;
    background: #0f3460;
    color: #e0e0e0;
    border: 1px solid #533483;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

#period-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.period-label {
    font-size: 11px;
    color: #888;
    margin-right: 2px;
}

#period-badge {
    padding: 4px 10px;
    background: #e94560;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.period-btn {
    padding: 6px 14px;
    background: #0f3460;
    color: #e0e0e0;
    border: 1px solid #533483;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.period-btn:hover { background: #533483; }
.period-btn.active { background: #533483; border-color: #e94560; }

#indicator-dropdown {
    position: relative;
}

#indicator-toggle {
    padding: 6px 14px;
    background: #0f3460;
    color: #e0e0e0;
    border: 1px solid #533483;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

#indicator-toggle:hover { background: #533483; }

#indicator-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: #16213e;
    border: 1px solid #533483;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    min-width: 240px;
    padding: 4px 0;
}

#indicator-menu.hidden { display: none; }

#indicator-menu label {
    display: block;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

#indicator-menu label:hover { background: #0f3460; }

#indicator-menu input[type="checkbox"] {
    margin-right: 8px;
}

.menu-section {
    padding: 4px 12px 2px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#main-chart-container {
    position: relative;
    width: 100%;
    height: 500px;
}

#main-chart {
    width: 100%;
    height: 100%;
}

#selection-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(83, 52, 131, 0.2);
    border-left: 1px solid #e94560;
    border-right: 1px solid #e94560;
    pointer-events: none;
}

#selection-overlay.hidden { display: none; }

#panels-container {
    display: flex;
    flex-direction: column;
}

.panel {
    width: 100%;
    height: 180px;
    border-top: 1px solid #0f3460;
    position: relative;
}

.panel-label {
    position: absolute;
    top: 4px;
    left: 8px;
    z-index: 10;
    font-size: 11px;
    color: #888;
    pointer-events: none;
}
