:root{
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:#eaf0f6;
  background:#071018;
  line-height:1.4;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 0%,#12324a 0,#071018 38%,#05090d 100%);
}

header{
  height:68px;
  padding:0 5vw;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #20313e;
  background:#08121aee;
  backdrop-filter:blur(10px);
  position:sticky;
  top:0;
  z-index:5;
}

.brand{
  font-size:22px;
  font-weight:900;
  letter-spacing:1.8px;
}

.brand span{
  color:#35d4a2;
}

.server-info{
  color:#7f95a3;
  font-size:13px;
  font-family:monospace;
}

main{
  width:min(1050px,92vw);
  margin:50px auto 80px;
}

.hero{
  margin-bottom:28px;
}

.eyebrow{
  color:#35d4a2;
  font-size:12px;
  font-weight:800;
  letter-spacing:2px;
}

.hero h1{
  font-size:42px;
  line-height:1.05;
  margin:9px 0 12px;
}

.hero p{
  color:#9dafbb;
  max-width:760px;
  font-size:17px;
}

.card{
  background:#0b151eec;
  border:1px solid #223440;
  border-radius:18px;
  padding:24px;
  margin-top:18px;
  box-shadow:0 16px 50px #0004;
}

.field label{
  display:block;
  font-size:13px;
  color:#a8bac7;
  margin-bottom:8px;
  font-weight:650;
}

.field input{
  width:100%;
  background:#071018;
  border:1px solid #304452;
  color:#eef6fb;
  border-radius:11px;
  padding:15px 16px;
  font-size:16px;
  outline:none;
  transition:.15s;
}

.field input:focus{
  border-color:#35d4a2;
  box-shadow:0 0 0 3px #35d4a220;
}

.test-config{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:15px;
}

.test-config div{
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:11px;
  padding:13px;
}

.test-config span,
.result-grid span{
  display:block;
  color:#6f8490;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.9px;
}

.test-config strong,
.result-grid strong{
  display:block;
  margin-top:5px;
  font-size:14px;
  word-break:break-all;
}

.primary{
  width:100%;
  margin-top:20px;
  background:#35d4a2;
  color:#04110d;
  border:0;
  border-radius:11px;
  padding:14px 18px;
  font-weight:900;
  font-size:15px;
  cursor:pointer;
  transition:.15s;
}

.primary:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
}

.primary:disabled{
  opacity:.55;
  cursor:wait;
  transform:none;
}

.hidden{
  display:none!important;
}

.device-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:18px;
}

.device-header h2{
  margin:6px 0 5px;
  font-size:28px;
}

.device-header p{
  margin:0;
  color:#8195a2;
  font-size:13px;
}

.timer-box{
  min-width:145px;
  text-align:center;
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:14px;
  padding:14px 18px;
}

.timer-label{
  color:#6f8490;
  font-size:10px;
  letter-spacing:1.5px;
  font-weight:800;
}

#timer{
  margin-top:4px;
  font-size:30px;
  font-family:monospace;
  font-weight:900;
  color:#35d4a2;
}

.status{
  padding:11px 13px;
  border-radius:10px;
  font-weight:700;
  font-size:14px;
}

.status.loading{
  background:#17252f;
  color:#d9e4eb;
}

.status.ok{
  background:#0e332a;
  color:#64e0ba;
}

.status.error{
  background:#3a171b;
  color:#ff9b9b;
}

.speed-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:18px;
}

.speed-card{
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:16px;
  padding:26px 20px 25px;
  text-align:center;
}

.speed-direction{
  font-size:12px;
  font-weight:900;
  letter-spacing:1.8px;
}

.speed-direction.download{
  color:#64e0ba;
}

.speed-direction.upload{
  color:#8bb8ff;
}

.speed-value{
  margin-top:12px;
  font-size:55px;
  line-height:1;
  font-weight:950;
}

.speed-card:first-child .speed-value{
  color:#35d4a2;
}

.speed-card:last-child .speed-value{
  color:#8bb8ff;
}

.speed-unit{
  margin-top:8px;
  color:#718692;
  font-size:13px;
  font-weight:700;
}

.chart-card{
  margin-top:18px;
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:15px;
  padding:17px;
}

.section-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  font-size:15px;
  font-weight:800;
}

.section-title small{
  color:#718692;
  font-size:12px;
  font-weight:500;
}

.chart-wrapper{
  height:240px;
  position:relative;
  overflow:hidden;
  border-radius:10px;
  background:
    repeating-linear-gradient(
      to bottom,
      #0c1821 0,
      #0c1821 47px,
      #10212b 48px
    );
}

#speed-chart{
  display:block;
  width:100%;
  height:100%;
}

.result-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-top:18px;
}

.result-grid div{
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:10px;
  padding:13px;
}

details{
  margin-top:18px;
  color:#9eb0bb;
}

summary{
  cursor:pointer;
}

.card pre{
  white-space:pre-wrap;
  max-height:450px;
  overflow:auto;
  background:#050a0e;
  border:1px solid #17252e;
  padding:14px;
  border-radius:10px;
  font-size:12px;
  color:#b8c7cf;
}

.result-final{
  text-align:center;
  padding:8px 0 0;
}

.result-final-title{
  color:#35d4a2;
  font-size:12px;
  font-weight:900;
  letter-spacing:2px;
}

.final-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:18px;
}

.final-grid div{
  background:#08121a;
  border:1px solid #1d303c;
  border-radius:14px;
  padding:22px;
}

.final-grid span{
  display:block;
  color:#718692;
  font-size:11px;
  letter-spacing:1px;
  font-weight:800;
}

.final-grid strong{
  display:block;
  margin-top:7px;
  font-size:28px;
}

@media(max-width:700px){

  .hero h1{
    font-size:32px;
  }

  .test-config{
    grid-template-columns:1fr;
  }

  .device-header{
    flex-direction:column;
    align-items:stretch;
  }

  .timer-box{
    min-width:0;
  }

  .speed-grid,
  .result-grid,
  .final-grid{
    grid-template-columns:1fr;
  }

  .speed-value{
    font-size:45px;
  }

  header{
    padding:0 4vw;
  }

  .server-info{
    display:none;
  }
}

/* =========================================================
   FORTISPEED SPEEDOMETER
   ========================================================= */

.speedometer{
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 10px 8px;
}

.speedometer.active{
  display:flex;
}

.speedometer-ring{
  width:260px;
  height:260px;
  border-radius:50%;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;


  box-shadow:
    0 0 0 1px #1f4450,
    0 0 25px #35d4a220,
    inset 0 0 35px #0008;

  transition:background .12s linear;
}

.speedometer-ring::before{
  content:"";
  position:absolute;
  inset:9px;
  border-radius:50%;
  background:#071018;
  box-shadow:
    inset 0 0 30px #000b,
    0 0 0 1px #1a303b;
}

.speedometer-ring::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  top:7px;
  left:50%;
  transform:translateX(-50%);
  background:#8ff8dc;
  box-shadow:
    0 0 10px #35d4a2,
    0 0 24px #35d4a2;

  animation:
    speedometer-pulse 1.2s ease-in-out infinite;
}

.speedometer-inner{
  position:relative;
  z-index:2;
  width:205px;
  height:205px;
  border-radius:50%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(
      circle at center,
      #10232d 0,
      #071018 68%,
      #050a0e 100%
    );

  box-shadow:
    inset 0 0 30px #000c;
}

.speedometer-phase{
  color:#35d4a2;
  font-size:11px;
  letter-spacing:2px;
  font-weight:900;
}

.speedometer-value{
  margin-top:8px;
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:48px;
  line-height:1;
  font-weight:950;
  color:#eefcf8;
  text-shadow:
    0 0 18px #35d4a260;
}

.speedometer-unit{
  margin-top:3px;
  color:#718692;
  font-size:11px;
  font-weight:700;
  letter-spacing:.8px;
}

.speedometer-percent{
  margin-top:14px;
  color:#8da7b2;
  font-family:monospace;
  font-size:12px;
}

.speedometer-label{
  margin-top:14px;
  min-height:20px;
  text-align:center;
  color:#92a6b3;
  font-size:13px;
}

.speedometer-label span::after{
  content:"";
  display:inline-block;
  width:18px;
  text-align:left;
  animation:
    speedometer-dots 1.2s steps(4,end) infinite;
}

@keyframes speedometer-pulse{

  0%,100%{
    opacity:.65;
    transform:translateX(-50%) scale(.9);
  }

  50%{
    opacity:1;
    transform:translateX(-50%) scale(1.25);
  }

}

@keyframes speedometer-dots{

  0%{
    content:"";
  }

  25%{
    content:".";
  }

  50%{
    content:"..";
  }

  75%,100%{
    content:"...";
  }

}

@media(max-width:700px){

  .speedometer-ring{
    width:220px;
    height:220px;
  }

  .speedometer-inner{
    width:172px;
    height:172px;
  }

  .speedometer-value{
    font-size:40px;
  }

}



/* =========================================================
   FORTISPEED - SPEEDOMETER FINAL
   ========================================================= */

.speedometer-ring{
  --progress-angle:0deg;

  width:260px;
  height:260px;
  border-radius:50%;
  position:relative;

  display:flex;
  align-items:center;
  justify-content:center;

  background:
    conic-gradient(
      from -90deg,
      #35d4a2 0deg,
      #35d4a2 var(--progress-angle),
      #16303a var(--progress-angle),
      #16303a 360deg
    );

  box-shadow:
    0 0 0 1px #1f4450,
    0 0 30px #35d4a240,
    inset 0 0 35px #0008;

  transition:
    transform .55s cubic-bezier(.4,0,.2,1),
    box-shadow .3s ease;
}


.speedometer-ring::before{
  content:"";

  position:absolute;
  inset:9px;

  border-radius:50%;

  background:#071018;

  box-shadow:
    inset 0 0 30px #000b,
    0 0 0 1px #1a303b;
}


.speedometer-ring::after{
  content:"";

  position:absolute;

  width:8px;
  height:8px;

  border-radius:50%;

  top:4px;
  left:50%;

  transform:translateX(-50%);

  background:#8ff8dc;

  box-shadow:
    0 0 10px #35d4a2,
    0 0 24px #35d4a2;

  animation:
    speedometer-pulse 1.2s ease-in-out infinite;
}


.speedometer-inner{
  position:relative;
  z-index:2;

  width:205px;
  height:205px;

  border-radius:50%;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  background:
    radial-gradient(
      circle at center,
      #10232d 0,
      #071018 68%,
      #050a0e 100%
    );

  box-shadow:
    inset 0 0 30px #000c;

  transition:
    transform .55s cubic-bezier(.4,0,.2,1);
}


.speedometer-ring.download-phase{
  transform:rotate(0deg);
}


.speedometer-ring.upload-phase{
  transform:rotate(180deg);
}


.speedometer-ring.download-phase .speedometer-inner{
  transform:rotate(0deg);
}


.speedometer-ring.upload-phase .speedometer-inner{
  transform:rotate(180deg);
}


.speedometer-phase{
  color:#35d4a2;
  font-size:11px;
  letter-spacing:2px;
  font-weight:900;
}


.speedometer-value{
  margin-top:8px;

  min-height:56px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:48px;
  line-height:1;
  font-weight:950;

  color:#eefcf8;

  text-shadow:
    0 0 18px #35d4a260;
}


.speedometer-unit{
  display:none;
}


.speedometer-percent{
  margin-top:14px;

  color:#8da7b2;

  font-family:monospace;
  font-size:12px;
}


.speedometer-label{
  margin-top:14px;

  min-height:20px;

  text-align:center;

  color:#92a6b3;
  font-size:13px;
}


.speedometer-label span::after{
  content:"";

  display:inline-block;
  width:18px;
  text-align:left;

  animation:
    speedometer-dots 1.2s steps(4,end) infinite;
}


@keyframes speedometer-pulse{

  0%,100%{
    opacity:.65;
    transform:translateX(-50%) scale(.9);
  }

  50%{
    opacity:1;
    transform:translateX(-50%) scale(1.25);
  }

}


@keyframes speedometer-dots{

  0%{
    content:"";
  }

  25%{
    content:".";
  }

  50%{
    content:"..";
  }

  75%,100%{
    content:"...";
  }

}


@media(max-width:700px){

  .speedometer-ring{
    width:220px;
    height:220px;
  }

  .speedometer-inner{
    width:172px;
    height:172px;
  }

  .speedometer-value{
    font-size:40px;
  }

}

.device-interface{
  display:inline-block;
  margin-top:8px;
  padding:5px 9px;
  border:1px solid #24414b;
  border-radius:7px;
  color:#35d4a2;
  background:#081820;
  font-size:11px;
  font-weight:800;
  letter-spacing:.7px;
  text-transform:uppercase;
}

