body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background: #0f0f23;
    color: #e0e0e0;
}
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}
.symbols-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.symbol-card {
    background: #1a1a2e;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid #2d2d4d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    height: fit-content;
}
.symbol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2d2d4d;
}
.symbol-name {
    font-size: 24px;
    font-weight: bold;
}
.symbol-price {
    font-size: 28px;
    font-weight: bold;
}
.chart-container {
    height: 250px;
    margin-bottom: 10px;
    position: relative;
}
.chart-container {
    position: relative;
    height: 300px; /* Increased height for better visibility */
    margin-bottom: 15px;
    background: #0f0f23;
    border-radius: 8px;
    border: 1px solid #2d2d4d;
}
/* Candlestick colors */
.candlestick-up {
    background-color: #4caf50 !important;
    border-color: #4caf50 !important;
}
.candlestick-down {
    background-color: #f44336 !important;
    border-color: #f44336 !important;
}
/* Zoom controls */
.chartjs-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}
.chartjs-zoom-controls button {
    background: #1a1a2e;
    border: 1px solid #2d2d4d;
    color: #e0e0e0;
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
}
.chartjs-zoom-controls button:hover {
    background: #2d2d4d;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
}
.analysis-item {
    background: #16213e;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 13px;
}
.analysis-item.signal { border-left-color: #ff9800; }
.analysis-item.confidence { border-left-color: #2196f3; }
.analysis-item.prediction { border-left-color: #4caf50; }
.analysis-item.trend { border-left-color: #9c27b0; }

.signal-buy { color: #4caf50; }
.signal-strong_buy { color: #2e7d32; font-weight: bold; }
.signal-sell { color: #f44336; }
.signal-strong_sell { color: #c62828; font-weight: bold; }
.signal-hold { color: #ff9800; }
.signal-error { color: #757575; }

.status-bar {
    background: #1a1a2e;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.status-connected { color: #4caf50; }
.status-disconnected { color: #f44336; }
.status-connecting { color: #ff9800; }

.last-update {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 0 5px;
    gap: 15px; /* Add gap between title and controls */
}

.time-scale-selector {
    background: #16213e;
    border: 1px solid #2d2d4d;
    border-radius: 8px;
    padding: 6px 10px; /* Reduced padding */
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    min-width: 80px; /* Reduced from 140px */
    max-width: 100px; /* Add max-width */
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
    flex-shrink: 0;
}

.time-scale-selector:hover {
    background: #1a1a2e;
}

.time-scale-selector:focus {
    outline: none;
    border-color: #3b82f6;
}

.chart-title {
    font-size: 14px;
    color: #888;
    font-weight: bold;
    flex-shrink: 0; /* Prevent title from shrinking */
}

.btc { color: #f7931a; }
.sol { color: #00c58b; }
.tao { color: #3b82f6; }
.wif { color: #a855f7; }

canvas {
    display: block;
    width: 100% !important;
    height: 200px !important;
}

.analysis-controls {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.analysis-controls button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.analysis-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 204, 255, 0.3);
}

.analysis-item.weekly-prediction {
    border-left-color: #ff6b6b;
    grid-column: span 2; /* Make weekly prediction take full width */
}

/* Optional: Adjust grid for 5 items */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 columns instead of 2 */
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
}

.refresh-chart-btn {
    background: #16213e;
    border: 1px solid #2d2d4d;
    border-radius: 8px;
    padding: 6px 8px;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
}

.refresh-chart-btn:hover {
    background: #1a1a2e;
    border-color: #3b82f6;
}

.timeframe-predictions {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    grid-column: 1 / -1;
    margin-left: 25px; /* Increase this number to shift more right */
}

.timeframe-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
    color: #ccc;
    text-align: center;
}

.timeframe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Changed from 5 to 3 */
    gap: 10px;
    justify-content: center;
}

/* Position the 1D in the 3rd column */
.timeframe-item:nth-child(3) {
    grid-column: 3;
}

/* Position the 1W in the 4th column */
.timeframe-item:nth-child(4) {
    grid-column: 4;
}

/* Position the 1M in the 5th column */
.timeframe-item:nth-child(5) {
    grid-column: 5;
}

.timeframe-item {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
}

.timeframe-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    font-weight: bold;
    width: 100%; /* Ensure full width for centering */
    text-align: center !important; /* Force center alignment */
}

.timeframe-prediction {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
    width: 100%;
    text-align: center !important; /* Force center alignment */
}

.timeframe-change {
    font-size: 11px;
    font-weight: bold;
    width: 100%;
    text-align: center;
}