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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
}

.toolbar {
    display: none;
    align-items: center;
    padding: 12px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    gap: 20px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.symbol-selector {
    position: relative;
    min-width: 250px;
}

.symbol-selector input {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    text-transform: uppercase;
}

.symbol-selector input:focus {
    outline: none;
    border-color: #00ff88;
}

.symbol-selector input::placeholder {
    color: #666;
    text-transform: none;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: -1px;
}

.suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #3a3a3a;
}

.suggestion-symbol {
    font-weight: bold;
    color: #00ff88;
}

.suggestion-name {
    color: #888;
    font-size: 12px;
    margin-left: 10px;
}

.suggestion-type {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
}

.timeframe-selector select {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.timeframe-selector select:focus {
    outline: none;
    border-color: #00ff88;
}

/* DELETE_AFTER_STABLE: Pan control styles */
.pan-controls {
    display: flex;
    gap: 5px;
}

.pan-controls button {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.pan-controls button:hover {
    background: #3a3a3a;
    border-color: #00ff88;
}

.pan-controls button:active {
    background: #4a4a4a;
}

.status {
    margin-left: auto;
    font-size: 14px;
}

.status.loading { color: #ffaa00; }
.status.connected { color: #00ff88; }
.status.error { color: #ff4444; }

/* Top panel for tools/information */
.top-panel {
    display: none;
    width: 100%;
    height: 80px;
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid #333;
    padding: 10px;
}

/* Skinny OHLC panel */
.ohlc-panel {
    display: none;
    width: 100%;
    height: 35px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid #333;
    align-items: center;
    padding: 0 15px;
}

.ohlc-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: #ffffff;
}

.ohlc-info div {
    display: flex;
    gap: 8px;
}

.ohlc-info span {
    font-weight: bold;
}

.chart-container {
    flex: 1;
    position: relative;
    background: #0f0f0f;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#priceChart {
    width: 100%;
    flex: 3;
    display: block;
    cursor: crosshair;
    max-width: 100%;
    min-height: 0;
}

#volumeChart {
    width: 100%;
    flex: 1;
    display: block;
    border-top: 1px solid #333;
    max-width: 100%;
    min-height: 0;
}

/* Old info-panel - no longer used */
.info-panel {
    display: none;
}

.price-info {
    display: none;
}

.price-info div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.price-info span {
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    #app {
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height if supported */
    }
    
    .chart-container {
        overflow: hidden;
        height: calc(100vh - 80px); /* Account for toolbar */
        max-height: calc(100vh - 80px);
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 10px;
    }
    
    .pan-controls {
        order: 1;
    }
    
    .status {
        order: 2;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .info-panel {
        position: fixed;
        bottom: 10px;
        right: 10px;
        left: 10px;
        top: auto;
        background: rgba(26, 26, 26, 0.95);
        max-width: none;
        width: auto;
    }
    
    .price-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}