/* css/net.css - testul de viteză. Follows the site theme (light + dark), pattern-matched to emoji.css. */

:root {
    --net-accent: #0ea5e9;
    --net-accent-hover: #0369a1;
    --net-accent-soft: #e0f2fe;
    --net-card-bg: #ffffff;
    --net-card-border: #e5e7eb;
    --net-page-bg: #f8fafc;
    --net-muted: #6b7280;
    --net-track: #e5e7eb;
    --net-good: #10b981;
    --net-warn: #f59e0b;
    --net-bad: #ef4444;
}

body.dark-theme {
    --net-accent-soft: #082f49;
    --net-card-bg: #1f2937;
    --net-card-border: #374151;
    --net-page-bg: #111827;
    --net-muted: #9ca3af;
    --net-track: #374151;
}

/* clip, not hidden: the site-wide `body { overflow-x: hidden }` turns <body> into a scroll
   container that never scrolls, which silently kills any position: sticky inside. */
.net-body, body.net-body#page-top {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--net-page-bg); color: var(--text-color); min-height: 100vh; overflow-x: clip;
}

.net-main { flex: 1; padding-top: 96px; padding-bottom: 48px; }
.net-hint { margin: 10px 0 0; color: var(--net-muted); font-size: .78rem; line-height: 1.55; }

.net-hero { padding: 24px 0 6px; text-align: center; }
.net-hero h1 { margin: 0 0 12px; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.net-lead { max-width: 760px; margin: 0 auto; color: var(--net-muted); font-size: 1rem; line-height: 1.6; }

/* ── gauge ──────────────────────────────────────────────────────────────────────────── */
.net-test { padding: 18px 0 6px; }
.net-test-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.net-gauge-wrap { position: relative; width: 260px; height: 260px; display: grid; place-items: center; }
.net-gauge { width: 100%; height: 100%; transform: rotate(135deg); }
.net-gauge circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.net-gauge-bg { stroke: var(--net-track); stroke-dasharray: 443 591; }
.net-gauge-arc {
    stroke: var(--net-accent); stroke-dasharray: 0 591; opacity: 0;
    transition: stroke-dasharray .18s linear, stroke .3s, opacity .2s;
}
.net-gauge-arc.is-upload { stroke: var(--net-good); }
.net-gauge-arc.is-ping { stroke: var(--net-warn); }
.net-gauge-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.net-live { font-size: 2.9rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.net-live-unit { margin-top: 2px; color: var(--net-muted); font-size: .85rem; font-weight: 700; }
.net-phase { margin-top: 10px; color: var(--net-accent); font-size: .8rem; font-weight: 700; min-height: 1.2em; }

.net-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.net-start {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; border: 0; border-radius: 999px;
    background: var(--net-accent); color: #fff; font-size: 1.05rem; font-weight: 800;
    cursor: pointer; box-shadow: 0 10px 26px rgba(14, 165, 233, .32);
    transition: transform .14s, background .14s, box-shadow .14s;
}
.net-start:hover:not(:disabled) { background: var(--net-accent-hover); transform: translateY(-2px); }
.net-start:disabled { opacity: .55; cursor: progress; box-shadow: none; }
.net-note { max-width: 620px; margin: 0; text-align: center; color: var(--net-muted); font-size: .78rem; line-height: 1.55; }

/* ── result tiles ───────────────────────────────────────────────────────────────────── */
.net-section { padding: 16px 0; }
.net-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.net-h2 { margin: 0 0 12px; font-size: 1.2rem; font-weight: 800; }
.net-h2 i { color: var(--net-accent); margin-right: 6px; }

.net-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.net-tile {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 18px 12px; border: 1px solid var(--net-card-border); border-radius: 14px;
    background: var(--net-card-bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
    transition: border-color .2s, transform .2s;
}
.net-tile.is-live { border-color: var(--net-accent); transform: translateY(-2px); }
.net-tile-icon { font-size: 1.1rem; }
.net-tile-icon.net-down { color: var(--net-accent); }
.net-tile-icon.net-up { color: var(--net-good); }
.net-tile-icon.net-ping { color: var(--net-warn); }
.net-tile-icon.net-jitter { color: #8b5cf6; }
.net-tile-label { color: var(--net-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.net-tile-value { font-size: 1.9rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.net-tile-unit { color: var(--net-muted); font-size: .76rem; font-weight: 600; }

/* ── cards ──────────────────────────────────────────────────────────────────────────── */
.net-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.net-card {
    padding: 18px 20px; border: 1px solid var(--net-card-border); border-radius: 14px;
    background: var(--net-card-bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}
.net-card h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; }
.net-card h2 i { color: var(--net-accent); margin-right: 6px; }

.net-conn { margin: 0; display: grid; gap: 8px; }
.net-conn > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--net-card-border); padding-bottom: 7px; }
.net-conn > div:last-child { border-bottom: 0; padding-bottom: 0; }
.net-conn dt { color: var(--net-muted); font-size: .8rem; font-weight: 600; margin: 0; }
.net-conn dd { margin: 0; font-size: .88rem; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.net-compare { display: grid; gap: 10px; }
.net-bar-row { display: grid; grid-template-columns: 82px 1fr 82px; align-items: center; gap: 10px; }
.net-bar-name { color: var(--net-muted); font-size: .8rem; font-weight: 700; }
.net-bar { height: 14px; border-radius: 999px; background: var(--net-track); overflow: hidden; }
.net-bar-fill { height: 100%; width: 0; border-radius: 999px; transition: width .6s ease-out; }
.net-bar-you { background: var(--net-accent); }
.net-bar-ro { background: var(--net-muted); width: 21.4%; }
.net-bar-val { font-size: .82rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.net-verdict { margin: 12px 0 0; font-size: .9rem; font-weight: 700; line-height: 1.5; }

/* ── capability list ────────────────────────────────────────────────────────────────── */
.net-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.net-use {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border: 1px solid var(--net-card-border); border-radius: 11px;
    background: var(--net-card-bg); font-size: .88rem;
}
.net-use i { width: 18px; text-align: center; color: var(--net-muted); }
.net-use.is-ok { border-color: var(--net-good); }
.net-use.is-ok i { color: var(--net-good); }
.net-use.is-no { opacity: .6; }
.net-use.is-no i { color: var(--net-bad); }
.net-use-need { margin-left: auto; color: var(--net-muted); font-size: .74rem; font-weight: 700; white-space: nowrap; }

/* ── history ────────────────────────────────────────────────────────────────────────── */
.net-table-wrap { overflow-x: auto; }
.net-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.net-table th, .net-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--net-card-border); white-space: nowrap; }
.net-table th { color: var(--net-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.net-table td { font-variant-numeric: tabular-nums; font-weight: 700; }
.net-table tbody tr:last-child td { border-bottom: 0; }
.net-linkbtn { padding: 0; border: 0; background: none; color: var(--net-accent); font-size: .8rem; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ── tips ───────────────────────────────────────────────────────────────────────────── */
.net-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.net-tip { padding: 14px 16px; border: 1px solid var(--net-card-border); border-radius: 12px; background: var(--net-card-bg); }
.net-tip h3 { margin: 0 0 6px; font-size: .92rem; font-weight: 800; }
.net-tip p { margin: 0; color: var(--net-muted); font-size: .84rem; line-height: 1.55; }

.net-powered { margin: 36px 0 0; text-align: center; color: var(--net-muted); font-size: .78rem; font-weight: 600; }
.net-powered a { color: var(--net-accent); text-decoration: none; font-weight: 800; }
.net-powered a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .net-gauge-arc, .net-bar-fill, .net-tile, .net-start { transition: none; }
}

@media (max-width: 860px) {
    .net-columns { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .net-main { padding-top: 84px; }
    .net-hero h1 { font-size: 1.65rem; }
    .net-gauge-wrap { width: 220px; height: 220px; }
    .net-live { font-size: 2.3rem; }
    .net-results { grid-template-columns: repeat(2, 1fr); }
    .net-tile-value { font-size: 1.5rem; }
    .net-start { width: 100%; justify-content: center; }
}
