:root, html[data-theme="violet"] {
  --bg: #05030a;
  --fg: #f4f2ff;
  --fg-2: #b4add0;
  --fg-3: #766f96;
  --accent: #8b5cf6;
  --accent-hi: #c4b5fd;
  --accent-mid: #a78bfa;
  --accent-rgb: 139, 92, 246;
  --accent2-rgb: 56, 189, 248;
  --btn-bg: linear-gradient(135deg, #a78bfa 0%, #7c3aed 50%, #5b21b6 100%);
  --btn-fg: #ffffff;
  --btn-border: rgba(221, 214, 254, 0.45);
  --svg-hi: #ddd6fe;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.auth-body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); overflow-x: hidden; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { display: block; }
:focus-visible { outline: 2px solid rgb(var(--accent2-rgb)); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; position: relative; z-index: 2; }
.ico { width: 17px; height: 17px; flex: none; }

#circuitCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 52% 68% at 50% 42%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.72) 65%, #000 100%);
  mask-image: radial-gradient(ellipse 52% 68% at 50% 42%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.72) 65%, #000 100%);
}

.top-beam {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, 130vw);
  height: 480px;
  background: radial-gradient(ellipse 46% 68% at 50% 0%, rgba(var(--accent-rgb), 0.34) 0%, rgba(var(--accent2-rgb), 0.12) 44%, rgba(5, 3, 10, 0) 76%);
  pointer-events: none;
  z-index: 1;
  filter: blur(8px);
  animation: beamPulse 5s ease-in-out infinite;
}
@keyframes beamPulse { 0%, 100% { opacity: 0.86; transform: translateX(-50%) scale(0.98); } 50% { opacity: 1; transform: translateX(-50%) scale(1.05); } }
@keyframes hBreathe { 0%, 100% { opacity: 0.35; transform: scale(0.92); } 50% { opacity: 0.95; transform: scale(1.08); } }
@keyframes hDraw { 0% { stroke-dashoffset: 180; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -180; } }
@keyframes hSweepSlow { 0% { background-position: -180% center; } 100% { background-position: 220% center; } }
@keyframes btnShimmer { 0%, 45% { left: -80%; } 100% { left: 150%; } }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.nav-wrap {
  position: relative;
  z-index: 20;
  padding: 15px 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.1);
  background: linear-gradient(180deg, rgba(5, 3, 10, 0.85) 0%, rgba(5, 3, 10, 0.35) 100%);
  backdrop-filter: blur(12px);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; color: #fff; white-space: nowrap; }
.brand-wordmark { height: 26px; width: auto; overflow: visible; transition: transform 0.25s var(--ease), filter 0.25s; }
.brand:hover .brand-wordmark { transform: translateY(-1px); filter: brightness(1.1); }
.top-right { display: flex; align-items: center; gap: 12px; }
.nav-status { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; color: var(--fg-3); white-space: nowrap; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s, background 0.22s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.btn-primary {
  color: var(--btn-fg);
  background: var(--btn-bg);
  background-size: 180% 180%;
  border: 1px solid var(--btn-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 30px -6px rgba(var(--accent-rgb), 0.56);
  animation: gradShift 4s ease infinite;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: rotate(25deg);
  animation: btnShimmer 3.2s ease-in-out infinite;
}
.btn-primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 14px 36px -3px rgba(var(--accent-rgb), 0.78); }
.btn-glass { color: var(--fg); font-weight: 500; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(var(--accent-rgb), 0.25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.btn-glass:hover { background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.52); }

.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(44px, 6vh, 64px) 0 64px; }
.auth-stage { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }

.auth-bg-layer { position: absolute; inset: -34px -80px; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-double-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 12%;
  bottom: 12%;
  border-top: 1px solid rgba(var(--accent-rgb), 0.22);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.22);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(464px, 100%);
  padding: 46px 30px 24px;
  border-radius: 22px;
  background: #040407;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-crest-wrap {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  pointer-events: none;
}
.auth-pcb-wing { width: 52px; height: 14px; opacity: 0.75; }
.auth-pcb-wing.flip { transform: scaleX(-1); }
.auth-crest {
  position: relative;
  width: 64px;
  height: 64px;
  clip-path: polygon(50% 0%, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 28%, rgba(var(--accent-rgb), 0.28), rgba(9, 7, 16, 0.96) 72%);
}
.auth-crest-svg { width: 42px; height: 42px; overflow: visible; }
.fx-breathe { transform-box: fill-box; transform-origin: center; animation: hBreathe 3.2s ease-in-out infinite; }
.fx-draw { stroke-dasharray: 90 90; animation: hDraw 3.6s ease-in-out infinite; }

.auth-kicker { text-align: center; font: 600 10.5px/1 var(--mono); letter-spacing: 0.14em; color: var(--svg-hi); margin-bottom: 15px; }

.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid rgba(var(--accent-rgb), 0.2); }
.tab { position: relative; z-index: 1; height: 38px; font-size: 13.5px; font-weight: 500; color: var(--fg-2); transition: color 0.25s; }
.tab[aria-selected="true"] { color: #fff; font-weight: 600; }
.tab-ind {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50%;
  height: 2px;
  border-radius: 99px;
  background: var(--accent-mid);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8);
  transition: transform 0.4s var(--ease);
}
.tabs[data-active="signup"] .tab-ind { transform: translateX(100%); }

.txt-chrome-all {
  background: linear-gradient(105deg, #94a3b8 0%, #ffffff 28%, #bae6fd 45%, #ffffff 60%, #94a3b8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hSweepSlow 4.8s linear infinite;
}
.auth-title { margin: 22px 0 16px; font-size: clamp(25px, 4vw, 32px); font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; color: #fff; }

.lbl-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 6px; }
.lbl { font: 600 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.lbl-hint { font: 500 11px/1 var(--mono); color: var(--fg-3); }
.lbl-action { font-size: 12px; font-weight: 500; color: var(--svg-hi); }
.lbl-action:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 4px;
  border-bottom: 1.5px solid rgba(var(--accent-rgb), 0.34);
  background: transparent;
  transition: border-color 0.2s;
}
.field .ico { color: var(--fg-3); transition: color 0.2s; }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: #fff; font: 500 14px/1 var(--sans); outline: none; }
.field input::placeholder { color: var(--fg-3); font-weight: 400; }
.field:focus-within { border-bottom-color: var(--svg-hi); }
.field:focus-within > .ico { color: var(--svg-hi); }
.field.invalid { border-bottom-color: #f87171; }

.eye { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--fg-3); }
.eye:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.strength-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 7px 2px 2px; }
.strength-track span { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); transition: background 0.25s; }
.strength-track[data-score="1"] span:nth-child(-n+1) { background: #f87171; }
.strength-track[data-score="2"] span:nth-child(-n+2) { background: #fbbf24; }
.strength-track[data-score="3"] span:nth-child(-n+3) { background: #38bdf8; }
.strength-track[data-score="4"] span { background: #4ade80; }

.cap-slot { margin-top: 15px; }
.cap-slot[hidden], .cap-slot:empty { display: none; }
.cap-slot-login { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.pro-cap-frame {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  overflow-x: auto;
}
.pro-cap-frame .adslab-captcha { display: flex; justify-content: center; max-width: 100%; }
.cap-note { padding: 11px 14px; border-radius: 12px; font: 500 12px/1.5 var(--mono); color: var(--fg-2); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(var(--accent-rgb), 0.24); }
.cap-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.cap-btn:hover:not(:disabled) { border-color: rgba(var(--accent-rgb), 0.62); background: rgba(var(--accent-rgb), 0.1); }
.cap-btn[data-state="verified"] { border-color: rgba(74, 222, 128, 0.55); background: rgba(16, 185, 129, 0.1); }
.cap-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cap-box { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(var(--accent-rgb), 0.18); border: 1px solid rgba(var(--accent-rgb), 0.42); color: var(--svg-hi); }
.cap-btn[data-state="verified"] .cap-box { background: rgba(16, 185, 129, 0.22); border-color: rgba(74, 222, 128, 0.6); color: #6ee7b7; }
.cap-text { display: flex; flex-direction: column; min-width: 0; }
.cap-text strong { font-size: 12.5px; font-weight: 600; color: #fff; }
.cap-text span { font-size: 11px; color: var(--fg-3); }
.cap-tag { font: 600 10px/1 var(--mono); letter-spacing: 0.08em; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--fg-2); white-space: nowrap; }
.cap-btn[data-state="verified"] .cap-tag { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.agree { display: flex; align-items: flex-start; gap: 10px; margin: 14px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-2); cursor: pointer; }
.agree input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; cursor: pointer; }
.agree a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.err { min-height: 18px; margin: 10px 2px 6px; font-size: 12.5px; font-weight: 500; color: #fecaca; line-height: 1.4; }
.err:empty { min-height: 0; margin: 4px 2px; }
.err:not(:empty) { padding: 9px 12px; border-radius: 10px; background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(248, 113, 113, 0.45); }
.ban-box {
  margin: 4px 0 14px;
  padding: 14px 15px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.14) 0%, rgba(18, 12, 28, 0.96) 100%);
  border: 1px solid rgba(244, 63, 94, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}
.ban-head { display: flex; align-items: center; gap: 8px; color: #fda4af; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ban-msg { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: #f8fafc; }
.ban-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ban-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}
.ban-link-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.ban-link-btn.is-discord { background: linear-gradient(135deg, #5865F2, #4752C4); border-color: rgba(165, 180, 252, 0.42); }
.ban-link-btn.is-telegram { background: linear-gradient(135deg, #229ED9, #0077B5); border-color: rgba(125, 211, 252, 0.42); }
.ban-note-empty { font-size: 11.5px; color: var(--fg-2); }
.switch { text-align: center; font-size: 13px; color: var(--fg-2); margin: 15px 0 4px; }
.linkbtn { font-weight: 600; color: var(--svg-hi); margin-left: 4px; }
.linkbtn:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.toast {
  position: fixed;
  left: 50%;
  top: 76px;
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  z-index: 105;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(10, 10, 18, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .wrap { width: min(1160px, calc(100% - 28px)); }
  .brand-wordmark { height: 22px; }
  .nav-status { display: none; }
  .auth-main { padding: 48px 0 48px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 42px 20px 20px; }
  .auth-pcb-wing { display: none; }
  .cap-btn { flex-direction: column; align-items: flex-start; }
}
