﻿/* ================== IP & SPEED PAGE TWEAKS ================== */
/* -- CONTAINER CARD -- */
.container-ip.card.neon {
    background: linear-gradient(180deg,#101522,#0d111a);
    border: 1px solid #1a2130;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* -- IP ROW -- */
.ip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 8px;
}

.ip {
    font-weight: 800;
    font-size: clamp(24px,6vw,36px);
    letter-spacing: .3px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #0e1420;
    border: 1px solid #1f2738;
}

.btn-copy {
    background: #172035;
    border: 1px solid #24314c;
    color: var(--text);
    padding: .45rem .6rem;
    border-radius: 8px;
}

    .btn-copy:hover {
        background: #1c2740;
    }

/* -- COPIED TOAST -- */
.copy-notice-wrap {
    position: relative;
    height: 0;
}

.copy-notice {
    position: absolute;
    top: -8px;
    left: 0;
    transform: translateY(-12px);
    opacity: 0;
    transition: all .18s ease;
    background: #152033;
    color: #cfe9ff;
    border: 1px solid #22304a;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: .9rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.28);
}

#copyNotice.show .copy-notice {
    transform: translateY(0);
    opacity: 1;
}

/* -- LOCATION -- */
.location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 14px;
}

.loc-flag {
    height: 1em;
    vertical-align: middle;
    margin-left: 0;
}

.loc-text {
    line-height: 1.2;
}

/* -- CONTROLS -- */
.controls {
    margin: 12px 0 10px;
}

#startTest.btn-lg {
    border-radius: 12px;
    padding: 10px 16px;
}

/* -- RESULTS METRICS -- */
.results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-top: 14px;
}

.is-hidden {
    display: none !important;
}
/* JS TOGGLES THIS */

.metric {
    position: relative;
    border-radius: 14px;
    padding: 16px 18px 14px;
    background: linear-gradient(180deg,#121827,#101522);
    border: 1px solid #23304a;
    box-shadow: var(--shadow);
}

    .metric::before {
        /* DECORATIVE INNER GLOW */
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(120% 120% at 20% 0%, rgba(103,232,249,.12), rgba(167,139,250,.06), transparent 60%);
        pointer-events: none;
    }

.metric-label {
    color: #8fb5d6;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.metric-value {
    font-weight: 800;
    font-size: clamp(26px,7vw,34px);
    line-height: 1;
}

.metric-sub {
    color: #9aa4b2;
    font-size: .9rem;
}

/* -- NOTES -- */
.notes {
    color: var(--muted);
    margin-top: 10px;
}

/* -- HISTORY LIST -- */
#historyList .history-item {
    background: linear-gradient(180deg,#111827,#0f1622);
    border: 1px solid #1f2a40;
    border-radius: 12px;
    padding: .6rem .8rem;
    box-shadow: var(--shadow);
}

    #historyList .history-item + .history-item {
        margin-top: .5rem;
    }

    #historyList .history-item .text-muted {
        color: #8fa2bb !important;
    }

.section-title + #historyList:empty {
    display: none; /* СКРОЕМ "Recent tests", если истории нет */
}

/* -- RESPONSIVE -- */
@media (max-width:600px) {
    .results {
        grid-template-columns: 1fr;
    }
}
