body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.trading-dashboard {
    max-width: 1800px;
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 24px;
}

/* Model Cards */
.model-card {
    background: #111;
    border: 1px solid #222;
    margin-bottom: 16px;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.model-card:hover {
    border-color: #333;
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #222;
    background: #0d0d0d;
}

.model-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.model-icon {
    color: #888;
    font-size: 14px;
}

.model-pnl {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.pnl-positive {
    color: #10b981;
}

.pnl-negative {
    color: #ef4444;
}

/* Tabs */
.model-tabs {
    display: flex;
    border-bottom: 1px solid #1a1a1a;
    background: #0a0a0a;
}

.tab-button {
    flex: 1;
    padding: 11px 8px;
    background: transparent;
    border: none;
    color: #555;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

.tab-button:hover {
    color: #888;
    background: #0f0f0f;
}

.tab-button.active {
    background: #111;
    color: #fff;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #666;
}

/* Content Area */
.model-content {
    padding: 16px 18px;
    height: 160px;
    overflow-y: auto;
    background: #0d0d0d;
}

.content-time {
    color: #555;
    font-size: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.content-text {
    color: #bbb;
    font-size: 12px;
    line-height: 1.7;
}

.content-details {
    color: #666;
    font-size: 11px;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Consolas', monospace;
    line-height: 1.6;
}

/* Chart Container */
.chart-container {
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Crypto Selector */
.crypto-selector {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: #0d0d0d;
    border-bottom: 1px solid #222;
}

.crypto-btn {
    padding: 8px 18px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.crypto-btn:hover {
    background: #222;
    border-color: #333;
    color: #aaa;
}

.crypto-btn.active {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

/* TradingView Widget */
.tradingview-widget-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.chart-attribution {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}

/* P&L Chart Section */
.pnl-chart-section {
    margin-top: 24px;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
    padding: 24px;
    overflow: hidden;
}

.pnl-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #222;
}

.pnl-chart-header h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}

.pnl-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 16px;
    color: #fff;
    font-weight: 700;
}

.pnl-chart-container {
    height: 400px;
    position: relative;
    margin-bottom: 24px;
    padding-top: 60px;
}

.model-legends {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #222;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.legend-item:hover {
    background: #1a1a1a;
    border-color: #333;
}

.legend-icon {
    width: 32px;
    height: 32px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #222;
    transition: border-color 0.2s;
}

.legend-item:hover .legend-icon {
    border-color: #444;
}

.legend-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    letter-spacing: 0.3px;
}

.legend-pnl {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
}

.legend-item.negative .legend-pnl {
    color: #ef4444;
}

/* Live prices section */
.live-prices {
    margin-top: 24px;
    padding: 24px;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
}

.live-prices h2 {
    font-size: 12px;
    margin-bottom: 20px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.price-card {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s;
}

.price-card:hover {
    border-color: #2a2a2a;
}

.price-symbol {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.price-value {
    font-size: 18px;
    color: #e0e0e0;
    margin-bottom: 6px;
    font-weight: 500;
}

.price-change {
    font-size: 11px;
    font-weight: 500;
}

/* Scrollbar */
.model-content::-webkit-scrollbar {
    width: 2px;
}

.model-content::-webkit-scrollbar-track {
    background: transparent;
}

.model-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 1px;
}

.model-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Global scrollbar for body */
body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: #0a0a0a;
}

body::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 3px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Loading animation */
.loading {
    text-align: center;
    color: #444;
    padding: 24px;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #1a1a1a;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .prices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .crypto-selector {
        flex-wrap: wrap;
    }
    
    .model-legends {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pnl-stats {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .prices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trading-dashboard {
        padding: 16px;
    }
    
    .crypto-btn {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .model-legends {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pnl-chart-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .pnl-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .pnl-chart-container {
        height: 300px;
    }
}

/* Focus states */
.tab-button:focus,
.crypto-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #333;
}

/* Smooth animations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
