/* Premium Vanilla CSS - Datacenter Dark Theme */

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

body {
    font-family: 'Inter', sans-serif;
    background: #0b0f19; /* Dark network theme */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
}

.test-container {
    background: #111827;
    width: 100%;
    max-width: 800px;
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.05), inset 0 0 0 1px rgba(0, 243, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.company-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 0.5rem;
    object-fit: contain;
    /* Extra visual pop for the logo on dark bg */
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.2));
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Meter Styles */
.meter-container {
    width: 350px;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.speed-meter {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.meter-track {
    stroke: #1e293b; /* Dark navy */
    stroke-width: 16;
    stroke-linecap: round;
}

.meter-fill {
    stroke: #00f3ff;
    stroke-width: 16;
    stroke-linecap: round;
    /* Calculated dasharray for 270 deg arc with radius 100 -> 2*PI*100*0.75 = 471.24 */
    stroke-dasharray: 471.24; 
    stroke-dashoffset: 471.24;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4));
}

.meter-scale-text text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    fill: #e2e8f0;
    text-anchor: middle;
    dominant-baseline: central;
}

.meter-needle {
    transform-origin: 125px 125px;
    transform: rotate(-135deg);
    transition: transform 0.1s linear;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

.meter-speed-text {
    font-family: 'Inter', sans-serif;
    font-size: 38px;
    font-weight: 700;
    fill: #ffffff;
    text-anchor: middle;
}

.meter-unit-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    fill: #94a3b8;
    text-anchor: middle;
    letter-spacing: 0.05em;
}

.meter-phase-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    fill: #00f3ff;
    text-anchor: middle;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.action-container {
    margin-bottom: 3rem;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.start-btn {
    font-size: 1.5rem;
    font-weight: 700;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #00f3ff;
    background: rgba(0, 243, 255, 0.05);
    color: #00f3ff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    outline: none;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2), inset 0 0 15px rgba(0, 243, 255, 0.1);
}

.start-btn:hover {
    background: rgba(0, 243, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.4), inset 0 0 20px rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
}

.start-btn.abort {
    border-color: #ff3366;
    color: #ff3366;
    background: rgba(255, 51, 102, 0.05);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.2), inset 0 0 15px rgba(255, 51, 102, 0.1);
}

.start-btn.abort:hover {
    background: rgba(255, 51, 102, 0.15);
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.2);
}

.metrics-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: #1f2937;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, background 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    background: #374151;
    border-color: rgba(255,255,255,0.1);
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.metric-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 50px;
    justify-content: center;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #f1f5f9;
}

.metric-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* Colors for specific phases */
.download .metric-label { color: #00f3ff; }
.upload .metric-label { color: #00ff66; }
.ping .metric-label { color: #cc66ff; }
.jitter .metric-label { color: #ff9933; }

.footer-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

@keyframes pulseGlow {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.active-metric {
    animation: pulseGlow 1s infinite ease-in-out;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .metrics-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

