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

body {
    background: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    margin-bottom: 16px;
}

.header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
    transition: background 0.3s;
}

.status-dot.connected {
    background: #2ecc71;
}

.status-dot.reconnecting {
    background: #f1c40f;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.3; }
}

/* Spark Stream */
.section {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.spark-container {
    display: flex;
    align-items: center;
    gap: 1px;
    overflow-x: hidden;
    height: 40px;
    position: relative;
}

.spark {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px;
    flex-shrink: 0;
    cursor: default;
    transition: transform 0.1s;
}

.spark:hover {
    transform: scale(2);
}

.spark.green { background: #2ecc71; }
.spark.yellow { background: #f1c40f; }
.spark.red { background: #e74c3c; }

.spark-tooltip {
    display: none;
    position: absolute;
    bottom: 44px;
    left: 0;
    background: #0f0f23;
    border: 1px solid #555;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Stats Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    background: #0f3460;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}

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

.stat-value.green { color: #2ecc71; }
.stat-value.yellow { color: #f1c40f; }
.stat-value.red { color: #e74c3c; }

.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Platform breakdown */
.platform-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #222;
    font-size: 13px;
}

.platform-row:last-child {
    border-bottom: none;
}

.platform-name {
    color: #aaa;
}

.platform-count {
    color: #fff;
    font-weight: 600;
}

/* Pool Table */
.pool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pool-table th {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid #444;
    color: #888;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 11px;
}

.pool-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #222;
}

.pool-table td.count-green { color: #2ecc71; }
.pool-table td.count-yellow { color: #f1c40f; }
.pool-table td.count-red { color: #e74c3c; }
.pool-table td.count-gray { color: #888; }

/* Responsive */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
