:root {
    --bg-dark: #070913;
    --panel-bg: rgba(16, 22, 38, 0.5);
    --panel-border: rgba(255, 255, 255, 0.08);
    
    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --accent-purple: #7f00ff;
    
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Common Classes */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(7, 9, 19, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10;
}

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

.logo .net:nth-child(1) { color: var(--text-main); }
.logo .net:nth-child(2) { color: var(--accent-primary); }

.badge {
    font-size: 11px;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-purple));
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

.status-indicator {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 10px #00e676;
    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 Layout */
.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Speedometer Section */
.speedometer-container {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.speedometer-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.speed-chart-bg {
    position: absolute;
    bottom: 20px;
    width: 100%;
    height: 100px;
    opacity: 0.3;
}

.speed-gauge {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.gauge-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.gauge-progress {
    transition: stroke-dashoffset 0.1s linear;
}

.speed-display {
    text-align: center;
    z-index: 2;
    margin-top: 40px;
}

.speed-value {
    font-family: var(--font-mono);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(0, 242, 254, 0.3);
}

.speed-unit {
    font-size: 16px;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

.controls {
    margin-top: 32px;
}

.primary-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 16px 48px;
    border-radius: 30px;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.primary-btn:hover {
    transform: scale(1.05);
}

.primary-btn:active {
    transform: scale(0.95);
}

.primary-btn .btn-text {
    position: relative;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.primary-btn .btn-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-purple));
    z-index: 1;
    transition: opacity 0.3s ease;
}

.primary-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 3;
}

.primary-btn:hover .btn-bg {
    opacity: 0.8;
    filter: brightness(1.2);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card.active {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.2);
    border-color: rgba(0, 242, 254, 0.4);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-primary);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
}

.stat-val small {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* Network Info */
.network-info {
    width: 100%;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
}

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

@media (max-width: 600px) {
    .app-header {
        padding: 16px 24px;
    }
    .speedometer-wrapper {
        width: 260px;
        height: 260px;
    }
    .speed-value {
        font-size: 48px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .network-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
