/* ---------------------------
   Base / Page
---------------------------- */
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.login-page{
  min-height:100vh;
  overflow:hidden;
  background: radial-gradient(1200px 700px at 20% 10%, #08214b 0%, #050b1d 50%, #02040b 100%);
  color:#fff;
  position:relative;
}

/* ---------------------------
   Background Layers
---------------------------- */
.background{
  position:fixed;
  inset:0;
  z-index:0;
}

/* Stars */
.stars{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.star{
  position:absolute;
  width:2px; height:2px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 0 6px rgba(255,255,255,.8);
  animation: twinkle 2.5s infinite ease-in-out;
  opacity:.7;
}
.star:nth-child(3n){ animation-duration:3.2s; opacity:.9; }
.star:nth-child(4n){ animation-duration:1.9s; opacity:.5; }

@keyframes twinkle{
  0%,100%{ transform:scale(1); opacity:.4; }
  50%{ transform:scale(1.8); opacity:1; }
}

/* ---------------------------
   Moons (escape)
---------------------------- */
.moon-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.shape{
  position:absolute;
  width:140px;
  opacity:.9;
  filter: drop-shadow(0 0 18px rgba(200,220,255,.4));

  /* escape offsets controlled by JS */
  --escape-x: 0px;
  --escape-y: 0px;

  animation: floatMoon 8s ease-in-out infinite;
  will-change: transform;

  transition:
    --escape-x 0.25s ease-out,
    --escape-y 0.25s ease-out;
}

.shape.returning{
  transition:
    --escape-x 0.9s ease-out,
    --escape-y 0.9s ease-out;
}

.shape1{ top:8%; left:6%; width:120px; animation-duration:9s; }
.shape2{ top:18%; right:10%; width:150px; animation-duration:7s; }
.shape3{ bottom:8%; left:18%; width:170px; animation-duration:11s; }

/* Float animation + escape movement combined */
@keyframes floatMoon{
  0%,100%{
    transform: translate(
      calc(var(--escape-x) + 0px),
      calc(var(--escape-y) + 0px)
    );
  }
  50%{
    transform: translate(
      calc(var(--escape-x) + 6px),
      calc(var(--escape-y) - 18px)
    );
  }
}

/* ---------------------------
   Layout
---------------------------- */
.login-wrapper{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:24px;
}

/* NO blur here (ant side clean) */
.login-inner{
  width:min(1080px, 100%);
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:20px;
  align-items:center;
  padding:12px;
}

.hero-side{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:360px;
  padding:12px;
  background: transparent;
  border:none;
  box-shadow:none;
}

.ant-hint{
  margin-top:10px;
  font-size:14px;
  opacity:.8;
  letter-spacing:.2px;
}

/* Blur panel ONLY behind form */
.form-side{
  display:flex;
  justify-content:center;
  align-items:center;

  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border-radius:18px;
  padding:24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.login-box{
  width:100%;
  max-width:380px;
  background: rgba(10,20,50,0.75);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  padding:26px 24px;
  box-shadow: inset 0 0 20px rgba(0,0,0,.35);
}

.login-box h2{
  text-align:center;
  font-size:22px;
  margin-bottom:18px;
  font-weight:700;
}

.error-block{
  color:#ff8080;
  text-align:center;
  margin-top:-6px;
  margin-bottom:8px;
  font-size:14px;
}

.login-box form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.login-box input{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color:#fff;
  outline:none;
  transition:.2s ease;
}
.login-box input::placeholder{ color:rgba(255,255,255,0.65); }
.login-box input:focus{
  border-color: rgba(120,180,255,0.8);
  box-shadow:0 0 0 3px rgba(80,140,255,0.18);
}

.login-box button{
  margin-top:6px;
  padding:12px;
  border:none;
  border-radius:10px;
  background: linear-gradient(135deg, #27b3ff, #5b6bff);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition:.18s ease;
}
.login-box button:hover{
  transform: translateY(-1px);
  filter:brightness(1.08);
}
.login-box button:active{
  transform: translateY(1px) scale(0.98);
}

/* ---------------------------
   Ant Animation
---------------------------- */
.ant-astro{
  width:260px;
  max-width:100%;
  height:auto;
  cursor:pointer;
  transform-origin:center center;
  animation: idleFloat 3.5s ease-in-out infinite;
  will-change: transform, opacity;
}

/* optional: stop idle float on hover so hover animation looks cleaner */
.ant-astro:hover{
  animation: none;
}

@keyframes idleFloat{
  0%,100%{ transform:translateY(0) scale(1); }
  50%{ transform:translateY(-10px) scale(1.02); }
}

.ant-astro.ant-fly-away,
.ant-astro.ant-fly-back{
  animation:none;
}

.ant-press{
  transform: scale(0.95);
  transition: transform .2s ease;
}

/* zoom out 5s */
.ant-fly-away{
  animation: antZoomOut 5s ease-in forwards !important;
}
@keyframes antZoomOut{
  0%{ transform: scale(1) translateY(0); opacity:1; }
  100%{ transform: scale(0) translateY(220px); opacity:0; }
}

/* DROP back from top 3s */
.ant-fly-back{
  animation: antDropIn 3s cubic-bezier(.18,.7,.25,1.05) forwards !important;
}

@keyframes antDropIn{
  0%{
    transform: translateY(-100vh) scale(0.6);
    opacity: 0;
  }
  60%{
    transform: translateY(10px) scale(1.02);
    opacity: 1;
  }
  78%{
    transform: translateY(-6px) scale(0.99);
  }
  100%{
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ---------------------------
   Responsive
---------------------------- */
@media (max-width: 900px){
  .login-inner{
    grid-template-columns:1fr;
    text-align:center;
  }
  .hero-side{ min-height:300px; }
  .form-side{ width:100%; }
}
