/* DEEP ONE — unlock screen.
   PIN-style entry: four glass cells, dots fill as you type, the fourth
   digit logs in by itself. Background: three soft auroras breathing very
   slowly (transform/opacity only — fully compositor-friendly). */

* { box-sizing: border-box; margin: 0; padding: 0; }

.login-body {
  min-height: 100vh;
  display: flex;
  /* "safe" centering: on short windows the card top stays reachable and the
     page scrolls, instead of being clipped off the top */
  align-items: safe center;
  justify-content: center;
  padding: 28px 16px;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(120% 120% at 20% 0%, #16222e 0%, #0f1722 55%, #0a1119 100%);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.aurora {
  position: fixed;              /* fixed: never extends the scroll area */
  width: 58vmax; height: 58vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .15;
  pointer-events: none;
  will-change: transform;
}
.a1 { background: #8CE99A; top: -24vmax; left: -16vmax; animation: drift1 52s ease-in-out infinite alternate; }
.a2 { background: #5B8DEF; bottom: -28vmax; right: -18vmax; animation: drift2 64s ease-in-out infinite alternate; }
.a3 { background: #2e75b6; top: 30%; left: 55%; width: 34vmax; height: 34vmax; opacity: .10;
      animation: drift3 44s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(9vmax,6vmax) scale(1.14); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.08); } to { transform: translate(-8vmax,-6vmax) scale(.94); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); opacity:.07; } to { transform: translate(-6vmax,5vmax) scale(1.18); opacity:.12; } }

.login-card {
  position: relative;
  width: 380px; max-width: 92vw;
  padding: 44px 36px 30px;
  border-radius: 20px;
  background: rgba(20, 31, 43, .82);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 1px 1px rgba(0,0,0,.5), 0 24px 70px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  text-align: center;
  animation: cardIn .5s cubic-bezier(.23, 1, .32, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.login-card.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(4px); }
}
.login-card.out { animation: cardOut .35s cubic-bezier(.5, 0, .8, .4) forwards; }
@keyframes cardOut { to { opacity: 0; transform: translateY(-14px) scale(.97); } }

.login-logo {
  width: 64px; height: 64px;
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 10px 30px rgba(0,0,0,.45);
}
.login-word { font-size: 26px; font-weight: 800; letter-spacing: 3px; color: #fff; }
.login-word span {
  background: linear-gradient(90deg, #8CE99A, #5B8DEF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 400;
}
.login-sub { color: #6f8299; font-size: 13px; margin: 4px 0 30px; }

/* ---- PIN cells ---- */
.pin-row {
  position: relative;
  display: flex;
  gap: 14px;
  justify-content: center;
  cursor: text;
}
.pin-cell {
  width: 58px; height: 66px;
  border-radius: 14px;
  background: #131f2d;
  border: 1px solid rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms cubic-bezier(.23,1,.32,1),
              box-shadow 160ms cubic-bezier(.23,1,.32,1),
              transform 160ms cubic-bezier(.23,1,.32,1);
}
.pin-cell.active {
  border-color: #5B8DEF;
  box-shadow: 0 0 0 4px rgba(91, 141, 239, .18);
  transform: translateY(-2px);
}
.pin-cell i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8CE99A, #5B8DEF);
  transform: scale(0);
  opacity: 0;
  transition: transform 180ms cubic-bezier(.23,1,.32,1), opacity 120ms;
}
.pin-cell.filled i { transform: scale(1); opacity: 1; }
.pin-row.verifying .pin-cell {
  border-color: rgba(140, 233, 154, .6);
  animation: verifyPulse 900ms ease-in-out infinite;
}
@keyframes verifyPulse { 50% { transform: translateY(-3px); } }
.pin-row.wrong .pin-cell { border-color: #ff7d72; }
.pin-input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  border: none;
  font-size: 24px;
  cursor: text;
}

.login-error { min-height: 20px; color: #ff7d72; font-size: 13px; margin: 14px 0 4px; }

/* fallback for passcodes longer than 4 digits */
.alt-link {
  background: none; border: none;
  color: #55677e;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: color 140ms;
}
.alt-link:hover { color: #9db2ca; }
.alt-box { display: flex; gap: 8px; margin-top: 14px; }
.alt-box input {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  color: #ecf1fa;
  background: #131f2d;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  outline: none;
  font-family: inherit;
}
.alt-box input:focus { border-color: #5B8DEF; box-shadow: 0 0 0 4px rgba(91,141,239,.18); }
.login-btn {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #0d1622;
  background: linear-gradient(90deg, #8CE99A, #5B8DEF);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 140ms cubic-bezier(.23,1,.32,1), filter 140ms;
}
.login-btn:hover { filter: brightness(1.06); }
.login-btn:active { transform: scale(.97); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .login-card, .pin-row.verifying .pin-cell { animation: none !important; }
}
