@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: normal;
}
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: normal;
}

:root {
    --color-gray: #424352;
    --color-gray-hover: #555769;
    --menu-bg: #181818;
    --bg-11: #111214;
    --frame-bg: #222324bf;
    --frame-bg2: #222324;
    --bg-light: #2a2a2a;
    --bg-light-tr: #2a2a2aa3;
    --border-color: #393C43;
    --border-color-tr: #393c4369;
    --text-color: #EEEEEE;
    --text-gray: #C1C1C1;
    --orange: #F0630D;
    --orange-light: #F17021;
    --orange-tr: rgb(240 99 13 / 0.4);
    --orange-tr2: rgb(240 99 13 / 0.12);
    --green: #16a34a;
    --green-tr: rgba(22, 163, 74, 0.12);
    --red: #e53935;
    --pale-gray: #697077;
}

html,body{
    border:none; padding:0; margin:0;
    /*background: var(--bg-11);*/
    color: var(--text-color);
    height: 100%;
    background-color: #111214;
}
body{
    text-align:center;
    font-family:"Roboto",sans-serif;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    background-image: url(bg.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment:fixed;
}
main {
    flex: 1;
}
main::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(137deg, rgba(240, 99, 13, 0.15) 3%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}
.top30 {
    margin-top: 30px !important;
}

.h1, .h2, .h3, .h4, .h5, .text-monbold {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
}
.h1 {
    font-size: 32px;
}
.h2, .popup .h1 {
    font-size: 28px;
}
.h3 {
    font-size: 24px;
}
.h4 {
    font-size: 20px;
}
.h5 {
    font-size: 28px;
}

.header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--menu-bg);
    color: var(--text-color);
    padding: 16px 40px;
    border-bottom: 2px solid var(--border-color);
}

/* Только десктоп fullhd с 1920px */
@media screen and (min-width: 1920px) {
    .page-wrap::before {height: 120vh;}
}

.top-menu {
    align-items: center;
    padding-block: 12px;
}
.menu-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    height: 45px;
    margin-right: 10px;
}

.gp-back-btn {
    display: flex;
    align-items: center;
    /*gap: 6px;*/
    font-size: 16px;
    color: #888;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    padding: 7px 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}
.gp-back-btn:hover { color: #ff6a00; border-color: #ff6a00; }



footer, .footer {
    /*background: linear-gradient(to top, #86ceff 0%, #95ddfff2 35%, #fff5f57a 100%);*/
    color: #888;
    font-size: 0.9em;
}
footer ul, .footer ul {
    list-style: none; /* Убираем маркеры списков*/
}

#loading{
    background-color:#FFFFFF;
    color:#404040;
    text-align:center;
}
span.loadCircle{
    display:inline-block;
    width:2em;
    height:2em;
    vertical-align:middle;
    background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAP1BMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZyFzwnAAAAFHRSTlMAEvRFvX406baecwbf0casimhSHyiwmqgAAADpSURBVHja7dbJbQMxAENRahnN5lkc//5rDRAkDeRgHszXgACJoKiIiIiIiIiIiIiIiIiIiIj4HHspsrpAVhdVVguzrA4OWc10WcEqpwKbnBo0OU1Q5NSpsoJFTgOecrrdEag85DRgktNqfoEdTjnd7hrEHMEJvmRUYJbTYk5Agy6nau6Abp5Cm7mDBtRdPi9gyKdU7w4p1fsLvyqs8hl4z9/w3n/Hmr9WoQ65lAU4d7lMYOz//QboRR5jBZibLMZdAR6O/Vfa1PlxNr3XdS3HzK/HVPRu/KnLs8iAOh993VpRRERERMT/fAN60wwWaVyWwAAAAABJRU5ErkJggg==');
    background-size:2em 2em;
    margin-right:0.5em;
    animation: spin 0.6s linear infinite;
}
@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(359deg);}
}

#test{
    margin-top: 2em;
    margin-bottom: 2em;
}

.testAreaWrapper, .gp-tip {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.3s;
    margin-bottom: 16px;
    /*width: 100%;*/
}
.testAreaWrapper:has(.testArea) {
    padding: 16px 12px 5px;
}
.testArea{
    display:inline-block;
    width:16em;
    height:12.5em;
    position:relative;
    box-sizing:border-box;
}
.testArea2{
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*width:14em;*/
    /*height:7em;*/
    position:relative;
    box-sizing:border-box;
    /*text-align:center;*/
}

.testArea .testName{
    position:absolute;
    top:0.1em; left:0;
    width:100%;
    font-size:1.4em;
    z-index:9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #888;
}
.testArea2 .testName{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.2em;
    color: #888;
}
.testNameIcon {
    display: flex;
}
.testArea .meterText{
    position:absolute;
    bottom:1.3em; left:0;
    width:100%;
    font-size:2.5em;
    z-index:9;
}
.testArea2 .meterText, #ipArea #ip {
    display:inline-block;
    font-size: 1.2em;
}
.meterText:empty:before{
    content:"0.00";
}
#ipArea #ip:empty:before {
    content: "0.0.0.0";
}
.testArea .unit{
    position:absolute;
    bottom:1.5em; left:0;
    width:100%;
    z-index:9;
}
.testArea2 .unit{
    display:inline-block;
}
.testArea canvas {
    position:absolute;
    top:10px; left:0; width:100%; height:100%;
    z-index:1;
}
.testGroup{
    display:flex;
    justify-content: center;
    gap: 16px;
    margin: 0 auto;
}

/* Памятка */
.gp-tip {
    padding: 16px 18px;
    width: auto;
    position: relative;
    overflow: hidden;
}
.gp-tip::before{
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    border-radius: 0 5px 5px 0;
    background: var(--orange-tr);
}
.gp-tip-title {
    font-size: 12px;
    font-weight: 500;
    color: #ff6a00;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.gp-tip-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0;
    margin: 15px 0 5px;
}
.gp-tip-list li {
    font-size: 12px;
    text-align: start;
    color: #888;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}
.gp-tip-num {
    color: #ff6a00;
    font-weight: 600;
    font-size: 11px;
    min-width: 16px;
    margin-top: 1px;
}

#startStopBtn{
    background-color: var(--orange);
    border: 2px solid;
    border-color: var(--orange);
    border-radius: 8px;
    /*box-shadow: rgba(255, 255, 255, .4) 0 1px 0 0 inset;*/
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    /*font-family: -apple-system,system-ui,"Segoe UI","Liberation Sans",sans-serif;*/
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.15385;
    margin: 0;
    outline: none;
    padding: 15px 0.8em;
    position: relative;
    text-align: center;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: baseline;
    white-space: nowrap;
    width: 300px;
    #min-height: 60px;
    transition: all 0.3s;
    margin-top: 10px;
}
#startStopBtn:hover{
    /*box-shadow: 0 0 2em rgba(0,0,0,0.1), inset 0 0 1em rgba(0,0,0,0.1);*/
    background-color: transparent !important;
}
#startStopBtn.running{
    background-color:#FF3030;
    border-color: #FF3030;
    color:#FFFFFF;
}
#startStopBtn:before{
    content:"Начать";
}
#startStopBtn.running:before{
    content:"Остановить";
}
#serverArea{
    margin-top:1em;
}
#server{
    font-size:1em;
    padding:0.2em;
}

#shareArea{
    width:95%;
    max-width:40em;
    margin:0 auto;
    margin-top:2em;
}
#shareArea > *{
    display:block;
    width:100%;
    height:auto;
    margin: 0.25em 0;
}
#privacyPolicy{
    position:fixed;
    top:2em;
    bottom:2em;
    left:2em;
    right:2em;
    overflow-y:auto;
    width:auto;
    height:auto;
    box-shadow:0 0 3em 1em #000000;
    z-index:999999;
    text-align:left;
    background-color:#FFFFFF;
    padding:1em;
}
a.privacy{
    text-align:center;
    font-size:0.8em;
    color:#808080;
    padding: 0 3em;
}
div.closePrivacyPolicy {
    width: 100%;
    text-align: center;
}
div.closePrivacyPolicy a.privacy {
    padding: 1em 3em;
}
@media all and (max-width:40em){
    body{
        font-size:0.8em;
    }
}
div.visible{
    animation: fadeIn 0.4s;
    display:block;
}
div.hidden{
    animation: fadeOut 0.4s;
    display:none;
}
@keyframes fadeIn{
    0%{
        opacity:0;
    }
    100%{
        opacity:1;
    }
}
@keyframes fadeOut{
    0%{
        display:block;
        opacity:1;
    }
    100%{
        display:block;
        opacity:0;
    }
}
@media all and (prefers-color-scheme: dark){
    html,body,#loading{
        color-scheme:dark;
    }
    h1{
        color:#E0E0E0;
    }
    a{
        color:#9090FF;
    }
    #privacyPolicy{
        background:#000000;
    }
    #resultsImg{
        filter: invert(1);
    }
}


.fixed-overlay {
    position: fixed;
    overflow: auto;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 86%);
    z-index: 999;
}
.fixed-overlay__modal {
    text-align: center;
    white-space: nowrap;
}
.fixed-overlay__modal::after {
    display: inline-block;
    vertical-align: middle;
    width: 0;
    height: 100%;
    content: '';
}
.modal {
    display: inline-block;
    vertical-align: middle;
}
.modal_container {
    margin: 50px;
    padding: 20px;
    text-align: left;
    white-space: normal;
    background-color: var(--orange);
    color: #fcfeff;
    border: solid;
    border-color: #fff;
    border-radius: 30px;
}

@media screen and (min-width: 1280px) {
    main {
        margin: 0 auto;
    }
    .testAreaWrapper {
        min-width: 300px;
    }
}
@media screen and (max-width: 1279px) {
    .header {
        padding: 14px 20px;
    }
    .top-menu {
        padding: 10px 12px !important;
    }
    .logo {
        height: 40px;
    }
    .gp-back-btn {
        font-size: 14px;
        padding: 5px 12px;
    }
    main {
        margin-inline: 16px;
    }
    .h2 {
        font-size: 22px;
    }
    .testGroup {
        gap: 10px;
    }
    .testAreaWrapper, .gp-tip {
        margin-bottom: 10px;
    }
    .widh2 {
        width: calc(100% / 2);
    }
    .testArea {
        width: 100%;
    }
    .testArea2 svg, .gp-back-btn svg {
        width: 18px;
    }
    .testArea2 .testName, .testArea2 .testValue, #ipArea #ip {
        font-size: 1em;
    }
    .testArea canvas {
        height:90%;
    }
    .testAreaWrapper, .gp-tip {
        padding: 12px;
    }
}
@media screen and (max-width: 390px) {
    .testAreaWrapper:has(.testArea) {
        padding: 12px 12px 0;
    }
    .testArea canvas {
        height: 80%;
        top: 25px;
    }
    .testArea .meterText {
        bottom: 1.5em;
    }
    .testArea .unit {
        bottom: 2em;
    }

}