/* SocialSwing 3.0 sign-in, registration and setup pages ("Neon Noir"). Public asset. */
@font-face { font-family: "Inter Var"; src: url("/assets/vendor/fonts/inter-var-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk Var"; src: url("/assets/vendor/fonts/space-grotesk-var-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono Var"; src: url("/assets/vendor/fonts/jetbrains-mono-var-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #050509; --surface: #10101c; --surface-2: #161627; --line: rgba(150, 160, 255, .1); --line-2: rgba(150, 160, 255, .18);
  --text: #eceeff; --text-2: #c6c9e8; --muted: #9399c2; --faint: #7c82ab;
  --cyan: #00f5ff; --purple: #9d4edd; --magenta: #ff2bd6; --green: #39ff88; --red: #ff4560;
  --grad: linear-gradient(100deg, var(--cyan), var(--purple) 55%, var(--magenta));
  --font: "Inter Var", Inter, "Segoe UI Variable", system-ui, sans-serif;
  --font-display: "Space Grotesk Var", "Inter Var", system-ui, sans-serif;
  --font-mono: "JetBrains Mono Var", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ background */
.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; animation: light-up 1.1s var(--ease) .05s forwards; }
.auth-bg::before, .auth-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.auth-bg::before { width: 62vw; height: 62vw; left: -18vw; top: -24vw; background: radial-gradient(circle, rgba(0, 245, 255, .22), transparent 65%); animation: drift-a 26s ease-in-out infinite alternate; }
.auth-bg::after { width: 56vw; height: 56vw; right: -16vw; bottom: -26vw; background: radial-gradient(circle, rgba(255, 43, 214, .18), rgba(157, 78, 221, .12) 40%, transparent 68%); animation: drift-b 30s ease-in-out infinite alternate; }
.auth-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(rgba(150, 160, 255, .04) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, rgba(150, 160, 255, .04) 1px, transparent 1px) 0 0 / 44px 44px; mask-image: radial-gradient(ellipse at 40% 50%, #000 20%, transparent 75%); }
@keyframes light-up { to { opacity: 1; } }
@keyframes drift-a { to { transform: translate(8vw, 6vh) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-6vw, -8vh) scale(1.1); } }

/* ------------------------------------------------------------------ layout */
.auth-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(400px, 1fr); }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 56px); border-right: 1px solid var(--line); }
.auth-hero::after { content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--cyan) 30%, var(--magenta) 70%, transparent); opacity: .5; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: fade-in 1.4s var(--ease) .5s forwards; }
.auth-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(5, 5, 9, .82) 0%, rgba(5, 5, 9, .5) 38%, transparent 62%); }
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .16em; text-decoration: none !important; opacity: 0; animation: rise .8s var(--ease) .3s forwards; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand b { font-weight: 700; color: var(--text); } .brand > span > span { color: var(--cyan); font-weight: 500; }
.hero-kicker { margin: clamp(28px, 6vh, 72px) 0 14px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .3em; color: var(--cyan); opacity: 0; animation: rise .8s var(--ease) .55s forwards; }
.hero-title { margin: 0; font-family: var(--font-display); font-size: clamp(38px, 5.2vw, 76px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; opacity: 0; animation: rise .9s var(--ease) .7s forwards; }
.grad-text { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s ease-in-out infinite alternate; }
@keyframes sheen { to { background-position: 100% 0; } }
.hero-sub { max-width: 520px; margin: 20px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.6; opacity: 0; animation: rise .9s var(--ease) .85s forwards; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; opacity: 0; animation: rise .9s var(--ease) 1s forwards; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10, 10, 20, .55); backdrop-filter: blur(10px); color: var(--text-2); font-size: 12.5px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero-points li:nth-child(2)::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero-points li:nth-child(3)::before { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.hero-hud { position: absolute; z-index: 2; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(10, 10, 20, .6); backdrop-filter: blur(12px); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); opacity: 0; animation: rise .9s var(--ease) 1.5s forwards, float 7s ease-in-out 2.4s infinite alternate; }
.hero-hud b { color: var(--text); font-family: var(--font-display); font-size: 13px; letter-spacing: .02em; font-weight: 600; }
.hero-hud.a { right: 9%; top: 18%; } .hero-hud.b { right: 22%; bottom: 24%; animation-delay: 1.7s, 3s; }
.hero-hud i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero-hud.b i { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
@keyframes float { to { transform: translateY(-10px); } }
.hero-note { position: relative; z-index: 2; margin: 0; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--faint); opacity: 0; animation: fade-in 1s var(--ease) 1.6s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }

/* ------------------------------------------------------------------ card */
.auth-panel { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px clamp(20px, 4vw, 56px); background: linear-gradient(180deg, rgba(10, 10, 18, .4), rgba(5, 5, 9, .75)); }
.auth-card { position: relative; width: min(100%, 420px); padding: 34px 32px 26px; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(24, 24, 42, .82), rgba(12, 12, 22, .9)); backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 100px rgba(0, 0, 0, .6), 0 0 80px rgba(157, 78, 221, .12); opacity: 0; animation: card-in .7s var(--ease) .15s forwards; }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(140deg, rgba(0, 245, 255, .7), rgba(157, 78, 221, .25) 40%, rgba(255, 43, 214, .6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.auth-card::after { content: ""; position: absolute; left: 20%; right: 20%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); opacity: .7; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.auth-card .mobile-brand { display: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .26em; color: var(--cyan); }
.eyebrow svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.auth-card h1, .auth-card h2 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.intro { margin: 8px 0 22px; color: var(--muted); font-size: 14px; }
.error { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(255, 69, 96, .45); background: rgba(255, 69, 96, .1); color: #ffb3bf; font-size: 13px; animation: shake .45s var(--ease); }
.error::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 11px; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.notice-ok { margin: 0 0 16px; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(57, 255, 136, .4); background: rgba(57, 255, 136, .08); color: #b9ffd5; font-size: 13px; }

/* floating-label fields */
.float-field { position: relative; margin-bottom: 14px; }
.float-field input { width: 100%; height: 54px; padding: 20px 46px 6px 15px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(5, 5, 9, .7); color: var(--text); font: 500 15px var(--font); outline: none; transition: border-color .2s, box-shadow .25s, background-color .2s; }
.float-field label { position: absolute; left: 16px; top: 17px; color: var(--faint); font-size: 14px; pointer-events: none; transform-origin: left top; transition: transform .2s var(--ease), color .2s; }
.float-field input:focus + label, .float-field input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); color: var(--cyan); }
.float-field input:not(:focus):not(:placeholder-shown) + label { color: var(--muted); }
.float-field input:hover { border-color: rgba(150, 160, 255, .3); }
.float-field input:focus { border-color: rgba(0, 245, 255, .7); background: rgba(5, 5, 9, .9); box-shadow: 0 0 0 4px rgba(0, 245, 255, .12), 0 0 28px rgba(0, 245, 255, .14); }
.field-line { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .35s var(--ease); }
.float-field input:focus ~ .field-line { transform: scaleX(1); }
.reveal { position: absolute; right: 8px; top: 9px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--faint); cursor: pointer; }
.reveal:hover { color: var(--text); background: rgba(150, 160, 255, .08); }
.reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reveal .eye-off { display: none; } .reveal[aria-pressed="true"] .eye { display: none; } .reveal[aria-pressed="true"] .eye-off { display: block; }
.caps { margin: -6px 0 12px; color: #ffd27a; font-size: 12px; }
.hint-text { margin: -8px 0 14px; color: var(--faint); font-size: 12px; }

/* submit */
.auth-submit { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin-top: 6px; border: 0; border-radius: 13px; overflow: hidden; cursor: pointer; color: #02141a; font: 650 15px var(--font); letter-spacing: .01em; background: linear-gradient(100deg, #00f5ff, #48c9ff 55%, #9b8cff); box-shadow: 0 0 0 1px rgba(0, 245, 255, .45), 0 10px 30px rgba(0, 245, 255, .25); transition: transform .15s var(--ease), box-shadow .25s; }
.auth-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); }
.auth-submit:hover { box-shadow: 0 0 0 1px rgba(0, 245, 255, .8), 0 14px 40px rgba(0, 245, 255, .4), 0 0 60px rgba(157, 78, 221, .3); }
.auth-submit:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.auth-submit:active { transform: scale(.985); }
.auth-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.auth-submit.loading .spinner { display: block; } .auth-submit.loading svg { display: none; } .auth-submit.loading { cursor: progress; filter: saturate(.8); }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-meta { display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--faint); font-size: 12px; }
.auth-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.privacy { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--faint); }
.auth-foot b { color: var(--green); font-weight: 500; }

/* ------------------------------------------------------------------ setup page (form-heavy) */
body.setup { background: var(--bg); }
.setup-shell { position: relative; z-index: 1; width: min(100% - 32px, 1080px); margin: 0 auto; padding: 22px 0 64px; }
.setup-shell header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.setup-shell header .brand { opacity: 1; animation: none; }
.setup-shell header form { margin: 0; }
.link-button { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(16, 16, 28, .7); color: var(--text-2); font: 500 13px var(--font); cursor: pointer; text-decoration: none !important; }
.link-button:hover { border-color: rgba(0, 245, 255, .4); color: var(--text); }
.setup-card { position: relative; padding: clamp(20px, 4vw, 40px); border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(22, 22, 39, .88), rgba(12, 12, 22, .92)); backdrop-filter: blur(16px); box-shadow: 0 40px 100px rgba(0, 0, 0, .55); animation: card-in .6s var(--ease); }
.setup-card h1 { margin: 4px 0 6px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -.025em; }
.setup-card .intro, .setup-card .hint { color: var(--muted); font-size: 13.5px; }
fieldset { margin: 26px 0 0; padding: 20px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(5, 5, 9, .35); }
legend { padding: 0 8px; font-family: var(--font-display); font-weight: 600; color: var(--text); }
.setup-card .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.setup-card label { display: grid; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.setup-card input, .setup-card select, .setup-card textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(5, 5, 9, .75); color: var(--text); font: 14px var(--font); outline: none; transition: border-color .2s, box-shadow .2s; }
.setup-card textarea { font-family: var(--font-mono); font-size: 12.5px; }
.setup-card input:focus, .setup-card select:focus, .setup-card textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 245, 255, .14); }
.setup-card .check { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.setup-card .check input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--cyan); }
.connection-settings { margin-top: 16px; }
.connection-settings summary { cursor: pointer; color: var(--cyan); font-size: 13px; }
.setup-card .primary { width: 100%; height: 52px; margin-top: 26px; border: 0; border-radius: 13px; color: #02141a; font: 650 15px var(--font); cursor: pointer; background: linear-gradient(100deg, #00f5ff, #48c9ff 55%, #9b8cff); box-shadow: 0 0 0 1px rgba(0, 245, 255, .45), 0 10px 30px rgba(0, 245, 255, .22); }
.setup-card .primary:hover { box-shadow: 0 0 0 1px rgba(0, 245, 255, .8), 0 14px 40px rgba(0, 245, 255, .38); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-hero::after { display: none; }
  .hero-kicker { margin-top: 28px; }
  .hero-hud.a { top: auto; bottom: 18%; right: 6%; } .hero-hud.b { display: none; }
  .auth-panel { padding-top: 28px; padding-bottom: 72px; }
}
@media (max-width: 640px) {
  .auth-hero { min-height: 0; padding: 22px 18px 18px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 14.5px; margin-top: 12px; }
  .hero-points, .hero-hud { display: none; }
  .hero-note { margin-top: 18px; }
  .auth-panel { padding: 20px 16px 72px; }
  .auth-card { padding: 26px 20px 22px; border-radius: 18px; }
  .setup-card .grid { grid-template-columns: 1fr; }
  fieldset { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .auth-submit::after { display: none; }
}
