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

:root {
    --bg: #1a1a2e;
    --card: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --text: #eee;
    --text-dim: #888;
    --success: #00d9ff;
    --warning: #ffc107;
    --danger: #e94560;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

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

.header h1 {
    font-size: 1.2rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.status.connected .dot {
    background: var(--success);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 10px;
    background: var(--card);
    border: none;
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: var(--accent);
    color: var(--text);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.card.wide {
    grid-column: span 2;
}

.card h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.gauge {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
}

.gauge svg {
    transform: rotate(-90deg);
}

.gauge .bg {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
}

.gauge .fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 8;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s, stroke 0.3s;
}

.gauge .value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
}

.info {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.network-stats {
    display: flex;
    justify-content: space-around;
}

.network-stats .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.network-stats .value {
    font-size: 1.1rem;
    font-weight: bold;
}

.controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.controls select {
    flex: 1;
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.btn {
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--highlight);
}

.btn.danger {
    background: var(--danger);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--accent);
}

.table th {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: normal;
}

.table td {
    font-size: 0.85rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge.active {
    background: rgba(0, 217, 255, 0.2);
    color: var(--success);
}

.badge.inactive {
    background: rgba(233, 69, 96, 0.2);
    color: var(--danger);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

.section-title {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

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

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--card);
    border: none;
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.action-btn .icon {
    font-size: 1.5rem;
}

.action-btn span:last-child {
    font-size: 0.85rem;
}

.danger-btn:hover {
    background: var(--danger);
}

.container-action {
    display: flex;
    gap: 6px;
}

.container-action .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}
