:root {
  --captcha-bg: #0a0a0a;
  --captcha-text: #f5f5f5;
  --captcha-muted: #6d6d6d;
  --captcha-accent: #8a8a8a;
  --captcha-accent-soft: rgba(140, 140, 140, 0.45);
  --captcha-accent-glow: rgba(180, 180, 180, 0.55);
}

.captcha-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--captcha-bg);
  color: var(--captcha-text);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, sans-serif;
  overflow: hidden;
}

.captcha-gate.is-hidden {
  display: none;
}

.captcha-gate__panel {
  position: relative;
  z-index: 3;
  width: min(520px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.captcha-gate__panel h2,
.captcha-gate__panel p {
  margin: 0;
}

.captcha-gate__logo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  box-shadow: 0 0 34px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  pointer-events: none;
}

.captcha-gate__title {
  margin-top: 24px;
  font-size: 44px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -2px;
}

.captcha-gate__subtitle {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--captcha-muted);
}

.captcha-gate__status {
  min-height: 26px;
  margin-top: 110px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}

.captcha-gate__status.is-active {
  color: rgba(255, 255, 255, 0.72);
}

.captcha-gate__button {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  margin-top: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.captcha-gate__button:focus-visible {
  box-shadow: 0 0 0 5px rgba(140, 140, 140, 0.35);
}

.captcha-gate__progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.captcha-gate__track,
.captcha-gate__bar {
  fill: none;
  stroke-width: 2;
}

.captcha-gate__track {
  stroke: var(--captcha-accent-soft);
}

.captcha-gate__bar {
  stroke: var(--captcha-accent);
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
}

.captcha-gate__dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--captcha-accent);
  box-shadow: 0 0 24px var(--captcha-accent-glow);
  transition: transform 160ms ease, box-shadow 160ms ease;
  pointer-events: none;
}

.captcha-gate__button.is-active .captcha-gate__dot,
.captcha-gate__button:hover .captcha-gate__dot {
  transform: scale(0.92);
  box-shadow: 0 0 36px rgba(200, 200, 200, 0.45);
}

.captcha-gate__loader {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 50%) scale(1) rotate(0deg);
  transform-origin: center;
  will-change: transform, opacity;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(180, 180, 180, 0.85),
    rgba(120, 120, 120, 0.95) 40%,
    rgb(70, 70, 70),
    rgb(30, 30, 30)
  );
  box-shadow:
    rgba(120, 120, 120, 0.45) 0 0 40px,
    rgba(90, 90, 90, 0.35) 0 0 80px,
    rgba(60, 60, 60, 0.25) 0 0 120px,
    rgba(200, 200, 200, 0.12) 0 0 60px inset,
    rgba(20, 20, 20, 0.5) -20px -20px 80px inset;
}

.captcha-gate__loader::before,
.captcha-gate__loader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.captcha-gate__loader::before {
  inset: 10%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.12), transparent 60%);
  animation: captcha-shimmer 3s ease-in-out infinite;
}

.captcha-gate__loader::after {
  inset: 5%;
  border: 2px solid rgba(160, 160, 160, 0.25);
  animation: captcha-inner-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes captcha-shimmer {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(0) scale(1);
  }

  50% {
    opacity: 0.6;
    transform: translate(-5%, -5%) scale(1.1);
  }
}

@keyframes captcha-inner-ring {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

@media (max-width: 560px) {
  .captcha-gate__logo {
    width: 118px;
    height: 118px;
  }

  .captcha-gate__title {
    font-size: 36px;
  }

  .captcha-gate__subtitle,
  .captcha-gate__status {
    font-size: 16px;
  }

  .captcha-gate__status {
    margin-top: 82px;
  }
}
