/* Cloudflare Turnstile gate */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600&display=swap");

.turnstile-gate {
  --tg-bg: #0b0f14;
  --tg-panel: rgba(22, 28, 36, 0.92);
  --tg-border: rgba(255, 255, 255, 0.08);
  --tg-text: #f3f6fa;
  --tg-muted: #8b9aab;
  --tg-accent: #3dd6c6;
  --tg-error: #ff7b84;

  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  isolation: isolate;
  font-family: "Sora", system-ui, sans-serif;
  color: var(--tg-text);
  background: var(--tg-bg);
  animation: tg-fade-in 0.45s ease both;
}

.turnstile-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(61, 214, 198, 0.16), transparent 60%),
    radial-gradient(700px 480px at 88% 110%, rgba(80, 120, 255, 0.1), transparent 55%),
    linear-gradient(160deg, #10161e 0%, #0b0f14 45%, #0d1218 100%);
}

.turnstile-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  pointer-events: none;
}

.turnstile-gate[hidden] {
  display: none !important;
}

.turnstile-gate.is-leaving {
  animation: tg-fade-out 0.35s ease both;
  pointer-events: none;
}

.turnstile-gate__panel {
  width: min(100%, 420px);
  padding: 36px 32px 32px;
  border-radius: 20px;
  text-align: center;
  background: var(--tg-panel);
  border: 1px solid var(--tg-border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: tg-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.turnstile-gate__mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(61, 214, 198, 0.2), rgba(61, 214, 198, 0.05));
  border: 1px solid rgba(61, 214, 198, 0.28);
  color: var(--tg-accent);
  animation: tg-pulse 2.8s ease-in-out infinite;
}

.turnstile-gate__mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.turnstile-gate__title {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.turnstile-gate__text {
  margin: 0 0 28px;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--tg-muted);
}

.turnstile-gate__widget {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.turnstile-gate__error {
  margin: 18px 0 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--tg-error);
}

.turnstile-gate__error:empty {
  display: none;
}

.turnstile-gate__hint {
  margin: 22px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(139, 154, 171, 0.75);
}

body.turnstile-locked > *:not(.turnstile-gate):not(script) {
  visibility: hidden !important;
  pointer-events: none !important;
}

@keyframes tg-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tg-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes tg-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tg-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 214, 198, 0.25);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(61, 214, 198, 0);
  }
}

@media (max-width: 480px) {
  .turnstile-gate__panel {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
}
