:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #080b12;
    color: #f4f6fb;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, rgba(74, 103, 180, 0.22), transparent 42%),
        #080b12;
}

.diagnostics {
    width: min(100%, 560px);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(15, 20, 32, 0.94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

header {
    text-align: center;
}

.eyebrow,
.label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9fb4ef;
}

h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    line-height: 1.1;
}

header > p:last-child {
    margin: 0;
    color: #aeb7c9;
}

.result {
    margin: 28px 0 20px;
    padding: 26px;
    text-align: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.latency {
    margin: 8px 0;
    font-size: clamp(2.8rem, 12vw, 4.8rem);
    font-weight: 800;
    line-height: 1;
}

#status-message {
    margin: 0;
    color: #aeb7c9;
}

button {
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    color: #07101f;
    background: #9fb4ef;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.08);
}

button:focus-visible {
    outline: 3px solid rgba(159, 180, 239, 0.45);
    outline-offset: 3px;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.details {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 9px;
    color: #aeb7c9;
}

.details p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.details span {
    color: #f4f6fb;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
    body {
        padding: 14px;
    }

    .diagnostics {
        padding: 24px 20px;
        border-radius: 16px;
    }
}
