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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: 600;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #10b981;
}

.status-dot.disconnected {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#status-text {
    font-weight: 500;
    color: #666;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.chart-header {
    margin-bottom: 15px;
}

.chart-header h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.chart-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.chart-stats span {
    display: flex;
    gap: 5px;
}

.chart-stats span span {
    font-weight: 600;
    color: #667eea;
}

.chart {
    width: 100%;
    height: 250px;
}

.kill-switch {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kill-switch-status {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.kill-switch-indicator {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.kill-switch-indicator.off {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.kill-switch-indicator.on {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: flash 1s infinite;
}

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

footer {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .chart-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* uPlot customization */
.uplot {
    font-family: inherit;
}

.u-legend {
    font-size: 12px;
}

.u-series {
    font-weight: 500;
}
