:root {
  --bg: #050816;
  --bg2: #0b1024;
  --panel: rgba(10, 18, 38, 0.76);
  --panel-strong: rgba(13, 23, 48, 0.92);
  --text: #f8fafc;
  --muted: #a7b4c8;
  --soft: #dbeafe;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(125, 211, 252, 0.30);
  --primary: #38bdf8;
  --primary2: #8b5cf6;
  --accent: #22d3ee;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.34), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(139, 92, 246, 0.30), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, var(--bg), var(--bg2) 52%, #080b1e);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.20), transparent 68%);
  pointer-events: none;
  filter: blur(2px);
}

a { color: inherit; }

.gateway-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.gateway-wrap::before,
.gateway-wrap::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

.gateway-wrap::before {
  width: 160px;
  height: 160px;
  left: 8%;
  top: 18%;
  background: radial-gradient(circle, rgba(34,211,238,.20), transparent 67%);
}

.gateway-wrap::after {
  width: 210px;
  height: 210px;
  right: 10%;
  top: 16%;
  background: radial-gradient(circle, rgba(139,92,246,.22), transparent 68%);
}

.gateway-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 488px;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(15,23,42,.68));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter: blur(22px);
  text-align: center;
  overflow: hidden;
}

.gateway-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(56,189,248,.12), transparent 38%, rgba(139,92,246,.12));
}

.gateway-card > * { position: relative; z-index: 1; }

.gateway-logo {
  max-width: 138px;
  max-height: 62px;
  object-fit: contain;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 12px 30px rgba(34,211,238,.18));
}

.security-pill {
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.media-box {
  margin-bottom: 22px;
}

.media-box img,
.media-box video {
  width: 100%;
  max-height: 238px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 22px 55px rgba(0,0,0,.24);
}

.gateway-title {
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 900;
  margin: 0 0 10px;
}

.gateway-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 auto 22px;
  max-width: 390px;
}

.verification-panel {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
  padding: 16px;
  background: rgba(2, 6, 23, .32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.turnstile-box {
  display: flex;
  justify-content: center;
  min-height: 72px;
  padding: 2px 0;
}

.verify-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 16px;
  color: #031525;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 35px rgba(34, 211, 238, .24);
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.verify-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, .30);
}

.verify-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
  background: linear-gradient(135deg, #64748b, #475569);
  color: #dbeafe;
  box-shadow: none;
}

.status-text {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
}

.status-text.success { color: #86efac; }
.status-text.error { color: #fca5a5; }

.secure-note {
  margin: 14px 0 0;
  color: #7dd3fc;
  font-size: 12px;
  line-height: 1.55;
  opacity: .9;
}

.loading-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.loading-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  padding: 30px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(15,23,42,.68));
  border: 1px solid var(--line-strong);
  text-align: center;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.10);
}

.loading-card img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(148,163,184,.20);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: var(--accent);
  border-right-color: var(--primary2);
  border-radius: 50%;
  margin: 20px auto 0;
  animation: spin 0.85s linear infinite;
}

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

.error-box {
  background: rgba(239, 68, 68, 0.13);
  border: 1px solid rgba(239, 68, 68, 0.34);
  color: #fecaca;
  padding: 13px 14px;
  border-radius: 16px;
  margin-top: 16px;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .gateway-card,
  .loading-card {
    padding: 22px;
    border-radius: 26px;
  }

  .verification-panel {
    padding: 12px;
  }

  .media-box img,
  .media-box video {
    max-height: 210px;
    border-radius: 20px;
  }
}

/* v3 premium finishing */
.gateway-card {
  outline: 1px solid rgba(255,255,255,.04);
}

.gateway-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 31px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 36%, rgba(125,211,252,.05));
  mask-image: linear-gradient(#000, transparent 70%);
}

.gateway-logo {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 18px;
  padding: 10px 14px;
}

.loading-card {
  outline: 1px solid rgba(255,255,255,.04);
}
