:root{
  --auth-bg:#0d0f12;
  --auth-text:#f4f6f8;
  --auth-muted:#8f98a4;
  --auth-border:#262c34;
  --auth-border-strong:#343b45;
  --auth-accent:#2f7df6;
  --auth-accent-hover:#1f6ee5;
}

html,body{min-height:100%}

body{
  background:var(--auth-bg);
  color:var(--auth-text);
  overflow-x:hidden;
}

.navbar{
  position:fixed;
  inset:0 0 auto 0;
  height:62px;
  display:flex;
  align-items:center;
  padding:0 max(24px,calc((100vw - 1120px)/2));
  background:rgba(13,15,18,.96);
  border-bottom:1px solid var(--auth-border);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  z-index:50;
}

.logo{
  display:flex;
  align-items:center;
  gap:.55rem;
  color:var(--auth-text);
  font-size:1rem;
  font-weight:650;
  letter-spacing:-.02em;
}

.logo .mark{color:var(--auth-accent);font-size:.72rem}

.logo .home-link{
  display:flex;
  align-items:center;
  gap:.55rem;
  color:var(--auth-text);
  text-decoration:none;
}

.nav-links{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:5px;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#aeb5bf;
  text-decoration:none;
  padding:8px 10px;
  border-radius:7px;
}

.nav-link:hover{color:#fff;background:#181b20}
.nav-link svg{width:17px;height:17px}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 14px;
  border:1px solid transparent;
  border-radius:7px;
  font:600 .9rem/1 Inter,system-ui,sans-serif;
  text-decoration:none;
  cursor:pointer;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease;
}

.btn-outline{
  color:#dce1e7;
  background:#14171b;
  border-color:var(--auth-border-strong);
}

.btn-outline:hover{
  color:#fff;
  background:#1a1e24;
  border-color:#48515d;
}

.btn-primary{
  color:#fff;
  background:var(--auth-accent);
  border-color:var(--auth-accent);
}

.btn-primary:hover{
  background:var(--auth-accent-hover);
  border-color:var(--auth-accent-hover);
}

.btn:focus-visible,
.nav-link:focus-visible,
.input-group input:focus-visible,
.forgot:focus-visible,
.swap-link a:focus-visible,
.login-link a:focus-visible{
  outline:2px solid #6ea8ff;
  outline-offset:2px;
}

.login-container,
.signup-container{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:112px 24px 52px;
}

.login-card,
.signup-card{
  width:min(100%,390px);
  text-align:left;
}

.auth-heading{margin-bottom:30px}

.auth-heading h1{
  margin:0 0 9px;
  color:var(--auth-text);
  font-size:2rem;
  line-height:1.15;
  letter-spacing:-.035em;
  font-weight:650;
}

.auth-heading .sub{
  margin:0;
  color:var(--auth-muted);
  font-size:.93rem;
  line-height:1.55;
}

.input-group{
  text-align:left;
  margin-bottom:18px;
}

.input-group label{
  display:block;
  margin-bottom:8px;
  color:#c7cdd5;
  font-size:.82rem;
  font-weight:550;
}

.input-group input{
  width:100%;
  height:44px;
  padding:0 13px;
  border:1px solid var(--auth-border-strong);
  border-radius:7px;
  background:#11151a;
  color:var(--auth-text);
  font:400 .94rem/1 Inter,system-ui,sans-serif;
  transition:border-color .14s ease,background-color .14s ease;
}

.input-group input:hover{border-color:#444d59}

.input-group input:focus{
  outline:none;
  border-color:var(--auth-accent);
  background:#12171e;
}

.full{
  width:100%;
  min-height:43px;
}

.starfall span{
  position:absolute;
  top:-10px;
  left:var(--x);
  width:var(--s);
  height:var(--s);
  border-radius:50%;
  background:rgba(225,235,248,.72);
  opacity:0;
  animation:star-fall var(--d) linear infinite;
  animation-delay:var(--delay);
}

.starfall span{
  position:absolute;
  top:-10px;
  left:var(--x);
  width:var(--s);
  height:var(--s);
  border-radius:50%;
  background:rgba(225,235,248,.72);
  opacity:0;
  animation:star-fall var(--d) linear infinite;
  animation-delay:var(--delay);
}

.starfall span:nth-child(1){--x:8%;--s:1px;--d:19s;--delay:-2s}
.starfall span:nth-child(2){--x:21%;--s:1px;--d:23s;--delay:-14s}
.starfall span:nth-child(3){--x:37%;--s:2px;--d:27s;--delay:-7s}
.starfall span:nth-child(4){--x:52%;--s:1px;--d:21s;--delay:-18s}
.starfall span:nth-child(5){--x:66%;--s:1px;--d:25s;--delay:-4s}
.starfall span:nth-child(6){--x:78%;--s:2px;--d:29s;--delay:-21s}
.starfall span:nth-child(7){--x:89%;--s:1px;--d:24s;--delay:-11s}
.starfall span:nth-child(8){--x:95%;--s:1px;--d:31s;--delay:-25s}

@keyframes star-fall{
  0%,78%{opacity:0;transform:translate3d(0,-4vh,0)}
  80%{opacity:.28}
  88%{opacity:.5}
  100%{opacity:0;transform:translate3d(16px,108vh,0)}
}

@media (prefers-reduced-motion:reduce){
  .starfall{display:none}
}

@media (max-width:600px){
  html,body{
    -webkit-overflow-scrolling:touch;
    backface-visibility:hidden;
  }

  .navbar{
    position:sticky;
    top:0;
    height:60px;
    padding:0 16px;
  }

  .logo{font-size:.96rem}
  .nav-links{gap:2px}
  .nav-link{display:none}

  .login-container,
  .signup-container{
    min-height:calc(100dvh - 60px);
    padding:48px 20px 52px;
  }

  .auth-heading{margin-bottom:26px}
  .auth-heading h1{font-size:1.75rem}
  .starfall{inset:60px 0 0}
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:2px 0 20px;
}

.remember{
  display:flex;
  align-items:center;
  gap:8px;
  color:#9aa3ae;
  font-size:.82rem;
  white-space:nowrap;
}

.remember input{accent-color:var(--auth-accent)}

.forgot{
  color:#9aa3ae;
  font-size:.82rem;
  text-decoration:none;
}

.forgot:hover{color:#fff}

.swap-link{
  margin-top:20px;
  color:#737c87;
  font-size:.84rem;
  text-align:center;
}

.swap-link a{
  color:#b9c8dc;
  text-decoration:none;
}

.swap-link a:hover{color:#fff}

.auth-note{
  margin:0;
  color:#c7cdd5;
  font-size:.9rem;
  line-height:1.55;
}

#loadingOverlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(13,15,18,.96);
  z-index:9999;
}

#loadingOverlay.active{display:flex}

.loader{
  text-align:center;
  color:#fff;
}

.loader p{
  margin-top:14px;
  color:#aab2bc;
  font-size:.86rem;
}

.spinner{
  width:32px;
  height:32px;
  margin:0 auto;
  border:2px solid #303640;
  border-top-color:var(--auth-accent);
  border-radius:50%;
  animation:spin .8s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width:600px){
  .row{align-items:flex-start;flex-direction:column;gap:12px}
}
