/* ── Speedtest page (FCLOUD) ─────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-link-active {
    color: #E2E8F0 !important;
}
.nav-link-active::after {
    width: 100% !important;
}

.st-panel {
    background: rgba(22, 22, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.5rem;
    padding: 2rem 1.25rem 2.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.06), 0 24px 64px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
    .st-panel {
        padding: 2.5rem 2rem 2.75rem;
    }
}

/* Gauge */
.st-gauge-wrap {
    position: relative;
    width: min(260px, 70vw);
    height: min(260px, 70vw);
    margin: 0 auto 1.75rem;
}

.st-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.st-gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 12;
}

.st-gauge-progress {
    fill: none;
    stroke: #7C3AED;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 578;
    stroke-dashoffset: 578;
    transition: stroke-dashoffset 0.35s ease-out, stroke 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.45));
}

.st-gauge-wrap.running .st-gauge-progress {
    stroke: #00FFD0;
    filter: drop-shadow(0 0 10px rgba(0, 255, 208, 0.5));
    animation: st-pulse-stroke 1.6s ease-in-out infinite;
}

.st-gauge-wrap.done .st-gauge-progress {
    stroke: #00FFD0;
    filter: drop-shadow(0 0 12px rgba(0, 255, 208, 0.55));
}

@keyframes st-pulse-stroke {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.st-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 1rem;
}

.st-gauge-phase {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748B;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.st-gauge-value {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(2rem, 8vw, 2.75rem);
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.25s ease;
}

.st-gauge-wrap.running .st-gauge-value {
    color: #00FFD0;
}

.st-gauge-unit {
    font-size: 0.8rem;
    color: #94A3B8;
    margin-top: 0.35rem;
    min-height: 1.2em;
}

/* Metrics row */
.st-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 420px;
    margin: 0 auto 1.5rem;
}

@media (min-width: 640px) {
    .st-metrics {
        grid-template-columns: repeat(4, 1fr);
        max-width: 560px;
    }
}

.st-metric {
    background: rgba(8, 8, 15, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.st-metric-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.st-metric-value {
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    color: #E2E8F0;
    font-variant-numeric: tabular-nums;
}

.st-progress-bar {
    height: 4px;
    max-width: 360px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.st-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, #7C3AED, #00FFD0);
    transition: width 0.3s ease-out;
}

.st-status {
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.5;
    min-height: 2.5em;
}

.st-start-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Results */
.st-results {
    animation: st-fade-up 0.45s ease-out both;
}

@keyframes st-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.st-tier-card {
    background: rgba(22, 22, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    padding: 1.35rem 1.25rem 1.25rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.st-tier-featured {
    border-color: rgba(0, 255, 208, 0.18);
    box-shadow: 0 0 40px rgba(0, 255, 208, 0.04);
}

.st-tier-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.st-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.st-badge.excellent {
    background: rgba(0, 255, 208, 0.12);
    color: #00FFD0;
    border-color: rgba(0, 255, 208, 0.25);
}
.st-badge.good {
    background: rgba(124, 58, 237, 0.15);
    color: #A78BFA;
    border-color: rgba(124, 58, 237, 0.3);
}
.st-badge.ok {
    background: rgba(241, 196, 15, 0.12);
    color: #F1C40F;
    border-color: rgba(241, 196, 15, 0.25);
}
.st-badge.limited {
    background: rgba(244, 63, 94, 0.1);
    color: #FB7185;
    border-color: rgba(244, 63, 94, 0.25);
}
.st-badge.poor {
    background: rgba(100, 116, 139, 0.15);
    color: #94A3B8;
    border-color: rgba(100, 116, 139, 0.25);
}

.st-res-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.st-res-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(8, 8, 15, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.st-res-label {
    font-weight: 600;
    color: #E2E8F0;
    font-size: 0.9rem;
}

.st-res-detail {
    font-size: 0.75rem;
    color: #64748B;
    margin-top: 0.15rem;
}

.st-res-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.st-res-status.yes {
    background: rgba(0, 255, 208, 0.12);
    color: #00FFD0;
}
.st-res-status.maybe {
    background: rgba(241, 196, 15, 0.12);
    color: #F1C40F;
}
.st-res-status.no {
    background: rgba(244, 63, 94, 0.1);
    color: #FB7185;
}

.st-honest {
    background: rgba(22, 22, 36, 0.55);
    border: 1px solid rgba(0, 255, 208, 0.12);
    border-radius: 1rem;
    padding: 1.15rem 1.25rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .st-gauge-progress,
    .st-progress-fill,
    .st-results,
    .st-gauge-wrap.running .st-gauge-progress {
        transition: none !important;
        animation: none !important;
    }
}
