:root {
  color-scheme: dark;
  --bg: #050a13;
  --bg-soft: #08111f;
  --panel: rgba(10, 21, 38, 0.82);
  --panel-strong: #0b1728;
  --line: rgba(148, 176, 215, 0.14);
  --line-bright: rgba(87, 153, 255, 0.34);
  --text: #f4f8ff;
  --muted: #91a2bb;
  --blue: #2f80ff;
  --blue-bright: #63a5ff;
  --cyan: #33d6ff;
  --red: #ff4057;
  --red-bright: #ff6b7d;
  --yellow: #ffc857;
  --green: #49e7a5;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --max-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(47, 128, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 38%, rgba(51, 214, 255, 0.08), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(90, 139, 198, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 139, 198, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #03111c;
  background: var(--cyan);
  border-radius: 10px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
main {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(99, 165, 255, 0.5);
  border-radius: 50%;
  background: rgba(47, 128, 255, 0.12);
  box-shadow: 0 0 24px rgba(47, 128, 255, 0.24);
}

.brand__mark::before,
.brand__mark::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.brand__mark::before {
  inset: 5px;
  background: var(--blue);
}

.brand__mark::after {
  inset: 9px;
  background: #ddebff;
}

.site-header__badge,
.stats-card__count,
.latency-label {
  color: #a7c7ef;
  border: 1px solid var(--line);
  background: rgba(9, 24, 43, 0.74);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header__badge {
  padding: 6px 11px;
}

.hero {
  max-width: 850px;
  margin: 0 auto;
  padding: 88px 0 48px;
  text-align: center;
}

.eyebrow,
.section-label {
  color: var(--blue-bright);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 20px;
  padding: 7px 12px;
  border: 1px solid rgba(99, 165, 255, 0.22);
  background: rgba(47, 128, 255, 0.07);
  border-radius: 999px;
}

.eyebrow span,
.latency-label span {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto 20px;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 850;
  letter-spacing: -0.065em;
  text-wrap: balance;
  background: linear-gradient(118deg, #ffffff 34%, #b8d6ff 70%, #60a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin-bottom: 12px;
  color: #c5d8ef;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 650;
}

.hero__copy {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
}

.ad-slot {
  display: grid;
  min-height: 92px;
  margin: 48px 0 80px;
  place-items: center;
  color: #65758d;
  border: 1px dashed rgba(137, 163, 199, 0.18);
  background: rgba(8, 17, 31, 0.42);
  border-radius: var(--radius-md);
}

.ad-slot span {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ad-slot--top {
  min-height: 82px;
  margin: 0 0 26px;
}

.test-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.72fr);
  gap: 20px;
  align-items: stretch;
}

.test-card,
.stats-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 28, 49, 0.92), rgba(7, 15, 27, 0.96));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.test-card {
  position: relative;
  overflow: hidden;
}

.test-card::before {
  position: absolute;
  top: 0;
  right: 13%;
  left: 13%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(99, 165, 255, 0.8), transparent);
}

.test-card__topline,
.stats-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.test-card__topline {
  min-height: 92px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.section-label {
  margin-bottom: 7px;
}

.test-card__topline h2,
.stats-card h2,
.how-it-works h2,
.faq h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.latency-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
}

.test-card__body {
  display: grid;
  min-height: 480px;
  padding: 34px;
  place-items: center;
}

.start-view,
.feedback-panel,
.result-panel,
.test-arena {
  width: 100%;
  text-align: center;
}

.start-view {
  max-width: 470px;
}

.start-view p,
.feedback-panel p {
  color: var(--muted);
}

.start-view p {
  margin: 24px 0 26px;
}

.start-orb {
  position: relative;
  display: grid;
  width: 158px;
  height: 158px;
  margin: 0 auto;
  border: 1px solid rgba(79, 146, 244, 0.17);
  background: radial-gradient(circle, rgba(47, 128, 255, 0.11), transparent 67%);
  border-radius: 50%;
  place-items: center;
}

.start-orb::before,
.start-orb::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(99, 165, 255, 0.14);
  border-radius: 50%;
}

.start-orb::before {
  inset: 16px;
}

.start-orb::after {
  inset: 34px;
}

.start-orb span {
  width: 45px;
  height: 45px;
  background: linear-gradient(145deg, var(--blue-bright), #1766e2);
  border: 6px solid rgba(5, 12, 23, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(120, 180, 255, 0.45), 0 0 45px rgba(47, 128, 255, 0.65);
}

.button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 22px;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  touch-action: manipulation;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button--primary {
  color: white;
  border: 1px solid #4d99ff;
  background: linear-gradient(135deg, #3186ff, #1d64db);
  box-shadow: 0 12px 30px rgba(35, 111, 230, 0.28), inset 0 1px rgba(255, 255, 255, 0.18);
}

.button--secondary {
  color: #dceaff;
  border: 1px solid var(--line-bright);
  background: rgba(47, 128, 255, 0.1);
}

@media (hover: hover) {
  .button:hover {
    transform: translateY(-2px);
  }

  .button--primary:hover {
    box-shadow: 0 16px 34px rgba(35, 111, 230, 0.38), inset 0 1px rgba(255, 255, 255, 0.2);
  }
}

.test-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.test-status {
  display: grid;
  min-height: 64px;
  margin-bottom: 22px;
  align-content: start;
}

.test-status strong {
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.test-status span {
  color: var(--muted);
  font-size: 0.9rem;
}

.reaction-target {
  position: relative;
  width: clamp(190px, 34vw, 254px);
  height: clamp(190px, 34vw, 254px);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(131, 190, 255, 0.75);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 17%),
    radial-gradient(circle at 50% 56%, #3c91ff, #1766d7 70%);
  border-radius: 50%;
  box-shadow:
    0 0 0 13px rgba(47, 128, 255, 0.055),
    0 0 0 28px rgba(47, 128, 255, 0.025),
    0 24px 70px rgba(20, 100, 221, 0.43),
    inset 0 -18px 40px rgba(0, 35, 97, 0.32);
  touch-action: manipulation;
  user-select: none;
  transition: background 80ms linear, border-color 80ms linear, box-shadow 80ms linear, transform 100ms ease;
}

.reaction-target:active {
  transform: scale(0.975);
}

.reaction-target__shine {
  position: absolute;
  top: 15%;
  left: 22%;
  width: 32%;
  height: 20%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  filter: blur(7px);
  transform: rotate(-28deg);
}

.reaction-target--ready {
  border-color: rgba(255, 157, 168, 0.92);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24), transparent 17%),
    radial-gradient(circle at 50% 56%, var(--red-bright), #df2039 72%);
  box-shadow:
    0 0 0 13px rgba(255, 64, 87, 0.08),
    0 0 0 28px rgba(255, 64, 87, 0.035),
    0 24px 75px rgba(255, 40, 67, 0.48),
    inset 0 -18px 40px rgba(119, 0, 20, 0.3);
  animation: ready-pulse 850ms ease-in-out infinite alternate;
}

@keyframes ready-pulse {
  to {
    box-shadow:
      0 0 0 17px rgba(255, 64, 87, 0.09),
      0 0 0 36px rgba(255, 64, 87, 0.035),
      0 26px 82px rgba(255, 40, 67, 0.58),
      inset 0 -18px 40px rgba(119, 0, 20, 0.3);
  }
}

.feedback-panel,
.result-panel {
  max-width: 470px;
  padding: 18px;
}

.feedback-panel__icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  color: #2a1800;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 200, 87, 0.22);
  font-size: 2rem;
  font-weight: 900;
  place-items: center;
}

.feedback-panel h3 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 5vw, 2.65rem);
}

.feedback-panel p:not(.section-label) {
  margin-bottom: 26px;
}

.result-panel__score {
  margin: 8px 0 0;
  font-size: clamp(3.5rem, 10vw, 6.3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.075em;
}

.result-panel__rating {
  display: inline-flex;
  margin: 18px 0 28px;
  padding: 6px 12px;
  color: var(--cyan);
  border: 1px solid rgba(51, 214, 255, 0.25);
  background: rgba(51, 214, 255, 0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-panel__rating[data-rating="excellent"] {
  color: var(--green);
  border-color: rgba(73, 231, 165, 0.26);
  background: rgba(73, 231, 165, 0.08);
}

.result-panel__rating[data-rating="average"] {
  color: var(--yellow);
  border-color: rgba(255, 200, 87, 0.26);
  background: rgba(255, 200, 87, 0.08);
}

.result-panel__rating[data-rating="slow"] {
  color: var(--red-bright);
  border-color: rgba(255, 64, 87, 0.28);
  background: rgba(255, 64, 87, 0.08);
}

.stats-card {
  padding: 25px;
}

.stats-card__header {
  gap: 16px;
  margin-bottom: 24px;
}

.stats-card__count {
  flex: 0 0 auto;
  padding: 7px 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}

.stats-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(4, 12, 23, 0.46);
  border-radius: var(--radius-md);
}

.stats-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-grid dd {
  margin: 0;
  color: #eaf3ff;
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.attempts-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attempts-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 9px 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.83rem;
}

.attempts-list li strong {
  color: #dceaff;
  font-size: 0.9rem;
}

.attempts-list .attempts-list__empty {
  justify-content: center;
  min-height: 116px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.stats-card__note {
  margin: 18px 0 0;
  color: #667991;
  font-size: 0.72rem;
  text-align: center;
}

.how-it-works,
.faq {
  border-top: 1px solid var(--line);
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 60px;
  padding: 92px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(10, 22, 39, 0.52);
  border-radius: var(--radius-lg);
}

.steps span {
  display: block;
  margin-bottom: 30px;
  color: var(--blue-bright);
  font: 800 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.steps strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.faq {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 70px;
  padding: 92px 0;
}

.faq__intro > p:last-child {
  max-width: 330px;
  margin-top: 18px;
  color: var(--muted);
}

.faq__items {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  min-height: 64px;
  padding: 20px 44px 20px 0;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  position: absolute;
  top: 16px;
  right: 0;
  display: grid;
  width: 30px;
  height: 30px;
  content: "+";
  color: var(--blue-bright);
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  font-size: 1.1rem;
  place-items: center;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 660px;
  margin: -3px 44px 22px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  color: #687b94;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .test-section {
    grid-template-columns: 1fr;
  }

  .stats-card {
    display: grid;
    grid-template-columns: minmax(190px, 0.65fr) 1fr;
    gap: 20px;
  }

  .stats-card__header,
  .stats-grid {
    grid-column: 1;
  }

  .attempts-list,
  .stats-card__note {
    grid-column: 2;
  }

  .stats-card__header {
    align-items: flex-start;
    margin: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    margin: 0;
  }

  .attempts-list {
    grid-row: 1 / span 2;
  }

  .stats-card__note {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .site-header,
  .site-footer,
  main {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header {
    min-height: 68px;
  }

  .site-header__badge {
    display: none;
  }

  .hero {
    padding: 68px 0 38px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .hero__copy {
    font-size: 0.9rem;
  }

  .ad-slot--top {
    min-height: 70px;
  }

  .test-card,
  .stats-card {
    border-radius: 21px;
  }

  .test-card__topline {
    min-height: 80px;
    padding: 18px;
  }

  .test-card__topline h2,
  .stats-card h2,
  .how-it-works h2,
  .faq h2 {
    font-size: 1.32rem;
  }

  .latency-label {
    display: none;
  }

  .test-card__body {
    min-height: 430px;
    padding: 24px 18px;
  }

  .start-orb {
    width: 138px;
    height: 138px;
  }

  .reaction-target {
    width: min(62vw, 220px);
    height: min(62vw, 220px);
  }

  .stats-card {
    display: block;
    padding: 20px;
  }

  .stats-card__header {
    align-items: center;
    margin-bottom: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 14px;
  }

  .attempts-list .attempts-list__empty {
    min-height: 88px;
  }

  .stats-card__note {
    margin-top: 16px;
  }

  .ad-slot {
    margin: 36px 0 60px;
  }

  .how-it-works,
  .faq {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 66px 0;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    display: grid;
    grid-template-columns: 40px 1fr;
    min-height: 0;
    padding: 17px;
  }

  .steps span {
    grid-row: 1 / span 2;
    margin: 4px 0 0;
  }

  .steps p {
    grid-column: 2;
  }

  .faq__intro > p:last-child {
    margin-bottom: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    min-height: 140px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .test-card__body {
    min-height: 410px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .result-panel__score {
    font-size: 3.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
