:root {
  --bg: #07070d;
  --bg-secondary: #0e0e18;
  --fg: #e8e8f0;
  --fg-muted: #6b6b8a;
  --card-bg: rgba(255, 255, 255, 0.025);
  --card-border: rgba(255, 255, 255, 0.06);
  --accent: #00ddb3;
  --accent-rgb: 0, 221, 179;
  --accent-glow: rgba(0, 221, 179, 0.12);
  --danger: #ff4757;
  --danger-rgb: 255, 71, 87;
  --danger-glow: rgba(255, 71, 87, 0.15);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="scan"] {
  --accent: #ff9f1c;
  --accent-rgb: 255, 159, 28;
  --accent-glow: rgba(255, 159, 28, 0.12);
}
[data-theme="unlock"] {
  --accent: #00ff88;
  --accent-rgb: 0, 255, 136;
  --accent-glow: rgba(0, 255, 136, 0.12);
}
@property --accent {
  syntax: "<color>";
  initial-value: #00ddb3;
  inherits: true;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}
h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.15;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
::selection {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.018;
  background-repeat: repeat;
  background-size: 200px 200px;
}
#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}
.view {
  display: none;
  animation: viewFadeIn 0.6s ease forwards;
}
.view.active {
  display: block;
}
@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 60px -15px var(--accent-glow),
    0 25px 60px -20px rgba(0, 0, 0, 0.5);
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
  isolation: isolate;
}

/* ===== SVG ICON base ===== */
.ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.ico-spin {
  animation: icoSpin 0.8s linear infinite;
}
@keyframes icoSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.25s;
}
.btn-primary:hover::after {
  opacity: 1;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.35);
}
.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-primary:disabled::after {
  display: none;
}
.btn-primary.btn-adblock-blocked {
  background: rgba(var(--danger-rgb), 0.12);
  color: var(--danger);
  border: 1px solid rgba(var(--danger-rgb), 0.2);
  cursor: not-allowed;
}
.btn-primary.btn-adblock-blocked::after {
  display: none;
}
.btn-primary.btn-adblock-blocked:hover {
  transform: none !important;
  box-shadow: none !important;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-icon:hover {
  background: rgba(var(--accent-rgb), 0.2);
  transform: translateY(-1px);
}
.btn-icon:active {
  transform: scale(0.92);
}
.hidden {
  display: none !important;
}

/* ===== RIPPLE EFFECT ===== */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim 0.4s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}


/* ===== LANDING ===== */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--fg);
}
.brand .ico {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover {
  color: var(--fg);
  text-decoration: none;
}
.landing-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
}
.hero {
  position: relative;
  margin-bottom: 56px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.1);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(var(--accent-rgb), 0.08);
  }
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--fg) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero-glow-1,
.hero-glow-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: -1;
  transition: background var(--transition);
}
.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  opacity: 0.06;
  top: -180px;
  right: -120px;
}
.hero-glow-2 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  opacity: 0.04;
  bottom: -100px;
  left: -80px;
}
.generator-card {
  padding: 36px;
  margin-bottom: 56px;
  text-align: left;
}
.generator-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.generator-title::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
  transition: background var(--transition);
}
.input-group {
  display: flex;
  gap: 12px;
}
.input-group input[type="url"] {
  flex: 1;
  padding: 14px 18px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.25s ease;
}
.input-group input[type="url"]::placeholder {
  color: var(--fg-muted);
}
.input-group input[type="url"]:focus {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
}
.generator-output {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.45s ease,
    opacity 0.45s ease,
    margin 0.45s ease;
}
.generator-output.visible {
  max-height: 140px;
  opacity: 1;
  margin-top: 20px;
}
.generator-output label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.output-row {
  display: flex;
  gap: 10px;
}
.output-row input {
  flex: 1;
  padding: 12px 16px;
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: var(--radius-sm);
  outline: none;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.feature-card {
  padding: 28px;
  transition: all 0.35s ease;
}
.feature-card:hover {
  border-color: rgba(var(--accent-rgb), 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.1);
}
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  margin-bottom: 18px;
  transition:
    background var(--transition),
    color var(--transition);
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
}
.landing-footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--fg-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--card-border);
  max-width: 720px;
  margin: 0 auto;
}

/* ===== GATEWAY ===== */
.gateway-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gateway-card {
  width: 100%;
  max-width: 520px;
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
}
.gateway-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 25%,
    var(--accent) 50%,
    transparent 75%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateBorder 4s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes rotateBorder {
  to {
    --border-angle: 360deg;
  }
}
.gateway-card > * {
  position: relative;
  z-index: 1;
}
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.4s ease;
  flex-shrink: 0;
}
.step-dot.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
  animation: stepPulse 2s ease-in-out infinite;
}
.step-dot.completed {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  animation: none;
}
@keyframes stepPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.35);
  }
}
.step-number {
  transition: all 0.3s;
}
.step-check {
  display: none;
}
.step-dot.completed .step-number {
  display: none;
}
.step-dot.completed .step-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-line {
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.4s ease;
  flex-shrink: 0;
}
.step-line.filled {
  background: var(--accent);
}
.step-content {
  display: none;
  text-align: center;
  animation: stepIn 0.5s ease forwards;
}
.step-content.active {
  display: block;
}
@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.step-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 1.6rem;
  margin: 0 auto 24px;
  transition:
    background var(--transition),
    color var(--transition);
}
.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-subtitle {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.btn-verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 220px;
}
.btn-verify:hover:not(.verifying):not(.verified) {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.15);
}
.btn-verify:active:not(.verifying):not(.verified) {
  transform: scale(0.96);
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.1);
}
.btn-verify.verifying {
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  cursor: wait;
}
.btn-verify.verified {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  cursor: default;
}

/* Adblock warning — center aligned */
.adblock-warning {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 20px;
  background: rgba(var(--danger-rgb), 0.06);
  border: 1px solid rgba(var(--danger-rgb), 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
  animation: warnIn 0.4s ease;
  isolation: isolate;
}
.adblock-warning.visible {
  display: flex;
}
.adblock-warning i {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.adblock-warning span {
  line-height: 1.5;
}
@keyframes warnIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-container {
  margin-bottom: 28px;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--accent),
    rgba(var(--accent-rgb), 0.6)
  );
  border-radius: 4px;
  transition: width 0.15s linear;
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.6);
  transition:
    background var(--transition),
    box-shadow var(--transition);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
}
#progress-percent {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
  transition: color var(--transition);
}
#progress-status {
  color: var(--fg-muted);
}
@keyframes textFadeUp {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
.text-fade-up {
  animation: textFadeUp 0.3s ease forwards;
}
.scan-countdown {
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--fg-muted);
  animation: stepIn 0.4s ease;
}
.scan-countdown strong {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  transition: color var(--transition);
}
.countdown-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 28px;
}
.countdown-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 6;
}
.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 565.49;
  stroke-dashoffset: 0;
  transition:
    stroke var(--transition),
    stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.4));
}
.countdown-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  transition: color var(--transition);
}
.btn-unlock {
  animation: stepIn 0.5s ease;
}
.btn-unlock.pulse-glow {
  animation: pulseGlow 1.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.5);
  }
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  overflow: visible;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--fg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.35s ease forwards;
  position: relative;
  overflow: hidden;
  max-width: 340px;
  isolation: isolate;
}
.toast.removing {
  animation: toastOut 0.3s ease forwards;
}
.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.toast.success .toast-icon {
  color: var(--accent);
}
.toast.error .toast-icon {
  color: var(--danger);
}
.toast.info .toast-icon {
  color: var(--fg-muted);
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 0 var(--radius-sm);
  animation: toastProgress 3s linear forwards;
}
.toast.error .toast-progress {
  background: var(--danger);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .landing-nav {
    padding: 16px 20px;
  }
  .landing-main {
    padding: 40px 16px 60px;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .input-group {
    flex-direction: column;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gateway-card {
    padding: 32px 24px;
  }
  .step-line {
    width: 36px;
  }
  .countdown-container {
    width: 150px;
    height: 150px;
  }
  .countdown-value {
    font-size: 2.4rem;
  }
  #toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .toast {
    max-width: 100%;
  }
  .adblock-warning {
    font-size: 0.78rem;
  }
}
@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.7rem;
    padding: 6px 14px;
  }
  .gateway-card {
    padding: 28px 18px;
  }
  .btn-verify {
    min-width: 180px;
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ring-progress {
    transition: none !important;
  }
}