:root {
    --bg-color: #0b0c10;
    --glass-bg: rgba(25, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #8b8e99;
    --accent: #2196F3;
    --buy-green: #00e676;
    --sell-red: #ff3b30;
    --font-family: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(33, 150, 243, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 230, 118, 0.05) 0%, transparent 50%);
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Generic */
.glass-header, .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Header */
header.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--accent);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--buy-green);
    background: rgba(0, 230, 118, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--buy-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* Main Dashboard Layout */
.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-chart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: var(--text-muted);
}

.legend {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.buy-legend { color: var(--buy-green); }
.sell-legend { color: var(--sell-red); }

/* Chart Area */
.chart-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(11, 12, 16, 0.8);
    z-index: 10;
    font-weight: 600;
    color: var(--accent);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.update-ts {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 15px;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Header Alert for Data Staleness */
.header-alert {
    display: none;
    color: var(--sell-red);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 59, 48, 0.2);
    animation: flash 2s infinite;
}

@keyframes flash {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
