﻿:root {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel-2: #111111;
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(244, 244, 244, 0.62);
  --soft: rgba(244, 244, 244, 0.42);
  --accent: #00e5a8;
  --accent-soft: rgba(0, 229, 168, 0.16);
  --accent-glow: rgba(0, 229, 168, 0.32);
  --accent-hover: #00c992;
  --btn-grad: linear-gradient(145deg, #565265 0%, #34313e 52%, #221f2a 100%);
  --btn-grad-hover: linear-gradient(145deg, #676274 0%, #3f3c4b 52%, #2a2733 100%);
  --danger: #ff6b6b;
  --success: #00e5a8;
  --font-ui: "D-DIN", -apple-system, Arial, sans-serif;
  --font-display: "D-DIN", -apple-system, Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

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

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.gate-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 4.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

.gate-logo {
  display: flex;
  align-items: center;
}

.gate-logo img {
  display: block;
  width: clamp(2.1rem, 3.2vw, 2.65rem);
  height: auto;
  aspect-ratio: 1;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(5.5rem, 10vh, 7rem) clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
  isolation: isolate;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 40% at 80% 100%, rgba(0, 229, 168, 0.05), transparent 50%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 5px 5px, 7px 7px;
}

.orb {
  display: none;
}

.gate-card {
  width: min(100%, 28rem);
  position: relative;
  margin-inline: auto;
  padding: 1.65rem 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.92), rgba(8, 8, 8, 0.96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(110%);
}

.gate-copy,
.gate-form,
.fine-print {
  position: relative;
  z-index: 1;
}

.gate-copy {
  margin: 0 0 1.15rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.image-puzzle {
  margin: 0 0 1.05rem;
}

.image-puzzle__hint {
  margin: 0 0 0.62rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.image-puzzle__hint--warn {
  color: rgba(244, 244, 244, 0.78);
}

.image-puzzle__hint--bad {
  color: var(--danger);
}

.image-puzzle__fail {
  margin: 0.62rem 0 0;
  padding: 0.55rem 0.72rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 500;
  color: #ffb4b4;
  background: rgba(120, 24, 24, 0.28);
  border: 1px solid rgba(255, 120, 120, 0.22);
  border-radius: 0.25rem;
}

.image-puzzle--locked .image-puzzle__track,
.image-puzzle--locked .image-puzzle__track *,
.image-puzzle--solved .image-puzzle__track,
.image-puzzle--solved .image-puzzle__track * {
  pointer-events: none;
  cursor: not-allowed;
}

.image-puzzle__viewport {
  position: relative;
  width: 100%;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.4);
  background: #050505;
}

.image-puzzle__canvas {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  vertical-align: top;
}

.image-puzzle__piece-wrap {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(0, 229, 168, 0.35)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
}

.image-puzzle__piece-canvas {
  display: block;
  border-radius: 4px;
}

.image-puzzle__track.scan-line {
  margin-top: 0.75rem;
}

.scan-line {
  position: relative;
  z-index: 1;
  height: 2.55rem;
  display: flex;
  align-items: center;
}

.scan-line::before {
  content: "";
  width: 100%;
  height: 0.88rem;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    rgba(0, 229, 168, 0.7),
    rgba(0, 229, 168, 0.12) 28%,
    rgba(52, 49, 62, 0.9) 64%,
    rgba(14, 14, 16, 0.98)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 9px 22px rgba(0, 0, 0, 0.4);
}

.scan-line span {
  position: absolute;
  left: 0.02rem;
  top: 50%;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #d8d8d8);
  box-shadow: 0 0 18px var(--accent-glow), 0 8px 18px rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.06);
  }
}

.gate-form {
  display: grid;
  gap: 0.85rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.captcha-wrap {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border-radius: 0.25rem;
  background: transparent;
  border: 0;
  padding: 0.35rem 0 0;
}

.turnstile-widget {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.captcha-strip {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  min-height: 48px;
  border-radius: 0.25rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 22, 24, 0.98), rgba(10, 10, 12, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.35;
}

.captcha-strip--loading {
  justify-content: center;
}

.captcha-strip__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.captcha-strip__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: 0 0 auto;
  text-align: right;
  min-width: 0;
}

.captcha-strip__spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(244, 244, 244, 0.18);
  border-top-color: var(--accent);
  animation: captchaStripSpin 0.75s linear infinite;
  flex-shrink: 0;
}

.captcha-strip__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 229, 168, 0.28);
}

.captcha-strip__check::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 5px;
  height: 9px;
  margin: 0;
  border-right: 2.5px solid #000;
  border-bottom: 2.5px solid #000;
  border-radius: 0.5px;
  transform: translate(-50%, -55%) rotate(45deg);
}

.captcha-strip__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.captcha-strip__title--muted {
  color: var(--muted);
  font-weight: 500;
}

.captcha-strip__brandrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.captcha-strip__wordmark {
  display: block;
  height: 8px;
  width: auto;
  max-width: 100%;
  flex-shrink: 0;
  object-fit: contain;
  object-position: right center;
  filter: none;
  opacity: 0.9;
}

.captcha-strip__links {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.captcha-strip__links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.captcha-strip__links a:hover {
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.captcha-strip__dot {
  padding: 0 0.25em;
  color: var(--muted);
  text-decoration: none;
}

@keyframes captchaStripSpin {
  to {
    transform: rotate(360deg);
  }
}

.state-line {
  min-height: 1.2rem;
  color: var(--soft);
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.state-line.ok {
  color: var(--success);
}

.state-line.bad {
  color: var(--danger);
}

.continue-btn {
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  border-radius: 0.25rem;
  color: #000;
  background: #fff;
  box-shadow: none;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.18s var(--ease);
}

.continue-btn:hover {
  background: #e8e8e8;
  transform: none;
  filter: none;
  box-shadow: none;
}

.continue-btn:active {
  transform: none;
}

.continue-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.fine-print {
  margin: 1rem 0 0;
  color: rgba(244, 244, 244, 0.38);
  font-size: 0.74rem;
  line-height: 1.45;
  text-align: center;
}

.fine-print a {
  color: rgba(244, 244, 244, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.fine-print a:hover {
  color: #fff;
}

@media (max-width: 780px) {
  .page-shell {
    padding: 5rem 1rem 1.75rem;
  }

  .gate-card {
    width: min(100%, 27rem);
    padding: 1.25rem 1.05rem 1.1rem;
  }
}

@media (max-width: 390px) {
  .gate-card {
    border-radius: 0.3rem;
  }

  .captcha-wrap {
    padding: 0.25rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .captcha-strip__spinner {
    animation-duration: 0.75s !important;
    animation-iteration-count: infinite !important;
  }
}

#letter-slider {
  display: none !important;
}

.captcha-letter-fly {
  position: absolute;
  z-index: 5;
  width: 1em;
  height: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  text-shadow: 0 0 18px rgba(0, 229, 168, 0.45);
  will-change: transform, opacity;
}

.captcha-slider-fill-fix {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0%;
  height: 100%;
  max-height: 100%;
  transform: translateY(-50%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 229, 168, 0.92), rgba(0, 229, 168, 0.2));
  pointer-events: none;
  z-index: 0;
}

.captcha-slider-track-fix {
  position: relative !important;
  touch-action: none;
  user-select: none;
  overflow: visible !important;
}

.captcha-slider-thumb-fix {
  position: absolute !important;
  left: 0;
  top: 50%;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.captcha-slider-thumb-fix:active {
  cursor: grabbing;
}
