/* ============================================================
   HelioFox Storage · 登录页
   ============================================================ */

.login-page {
  display: block;
  overflow-y: auto;
  background: #06080f;
  color: #eef1f8;
  --text: #eef1f8;
  --text-2: #9aa6bb;
  --text-3: #6b7789;
  --surface: rgba(17, 21, 32, 0.72);
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #818cf8;
  --accent-2: #a78bfa;
  --accent-soft: rgba(129, 140, 248, 0.16);
  --ring: rgba(129, 140, 248, 0.22);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
}

/* ---------------------------------------------------------- 背景 */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(79, 70, 229, 0.24), transparent 62%),
    radial-gradient(900px 620px at 92% 12%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(900px 800px at 55% 118%, rgba(139, 92, 246, 0.2), transparent 65%),
    #06080f;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.b1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -90px;
  background: radial-gradient(circle at 35% 35%, rgba(99, 102, 241, 0.55), transparent 68%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.b2 {
  width: 440px;
  height: 440px;
  bottom: -140px;
  right: 4%;
  background: radial-gradient(circle at 60% 40%, rgba(56, 189, 248, 0.42), transparent 68%);
  animation: drift-b 30s ease-in-out infinite alternate;
}

.b3 {
  width: 360px;
  height: 360px;
  top: 36%;
  left: 46%;
  background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.34), transparent 70%);
  animation: drift-c 26s ease-in-out infinite alternate;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
}

@keyframes drift-a {
  to {
    transform: translate3d(70px, 50px, 0) scale(1.12);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-80px, -46px, 0) scale(1.08);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(40px, -70px, 0) scale(1.15);
  }
}

/* ---------------------------------------------------------- 布局 */

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 64px;
  padding: 56px 52px;
}

.brand-pane {
  display: flex;
  flex-direction: column;
  gap: 30px;
  animation: fade-up 0.7s var(--ease-out) both;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 13px;
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(99, 102, 241, 0.28), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 26px -12px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.logo-mark svg {
  width: 27px;
  height: 27px;
}

.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.logo-word strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.logo-word span {
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}

.brand-copy h1 {
  font-size: clamp(30px, 3.3vw, 44px);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -1.1px;
  margin-bottom: 18px;
}

.grad-text {
  background: linear-gradient(100deg, #a5b4fc 0%, #7dd3fc 48%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-copy p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 44ch;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--text-2);
}

.feature-list .fi {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 8px;
  color: #a5b4fc;
  background: rgba(129, 140, 248, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.22);
  flex: none;
}

.brand-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-3);
  padding-top: 6px;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------------------------------------------------------- 登录卡片 */

.form-pane {
  display: flex;
  justify-content: center;
  animation: fade-up 0.7s 0.08s var(--ease-out) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 26px;
  border-radius: 26px;
  background: rgba(16, 20, 30, 0.62);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 40px 90px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-head {
  margin-bottom: 26px;
}

.card-head h2 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.card-head p {
  font-size: 13.5px;
  color: var(--text-3);
}

.field {
  display: block;
  margin-bottom: 15px;
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.1px;
}

.field-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.field-box:hover {
  border-color: rgba(255, 255, 255, 0.17);
}

.field-box:focus-within {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.14);
}

.field-icon {
  width: 17px;
  height: 17px;
  color: var(--text-3);
  flex: none;
  transition: color 0.18s var(--ease);
}

.field-box:focus-within .field-icon {
  color: #a5b4fc;
}

.field-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  color: #fff;
  letter-spacing: 0.1px;
}

.field-box input::placeholder {
  color: rgba(154, 166, 187, 0.62);
}

.field-box input:-webkit-autofill,
.field-box input:-webkit-autofill:hover,
.field-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(30, 36, 52, 0.9) inset;
  caret-color: #fff;
  transition: background-color 9999s ease-out;
}

.peek {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--text-3);
  flex: none;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}

.peek:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.peek svg {
  width: 16px;
  height: 16px;
}

.peek.on {
  color: #a5b4fc;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 18px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.remember input {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 4.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  transition: all 0.16s var(--ease);
  flex: none;
}

.remember input:checked {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
}

.remember input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.7px 1.7px 0;
  transform: rotate(42deg);
}

.hint-link {
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.16s var(--ease);
}

.hint-link:hover {
  color: #a5b4fc;
}

.form-error {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12.8px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(251, 113, 133, 0.24);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  animation: shake 0.36s var(--ease);
}

.form-error.show {
  display: flex;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

.btn-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #4f46e5 100%);
  background-size: 180% 180%;
  box-shadow:
    0 12px 30px -12px rgba(99, 102, 241, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: background-position 0.5s var(--ease), transform 0.14s var(--ease), box-shadow 0.22s var(--ease);
  overflow: hidden;
}

.btn-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.26) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.btn-login:hover {
  background-position: 100% 50%;
  box-shadow:
    0 16px 38px -12px rgba(99, 102, 241, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-login:hover::after {
  transform: translateX(120%);
}

.btn-login:active {
  transform: translateY(1px) scale(0.995);
}

.btn-login.loading {
  pointer-events: none;
}

.btn-login.loading .spinner {
  display: block;
}

.btn-login.loading .btn-label {
  opacity: 0.75;
}

.card-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11.8px;
  color: var(--text-3);
}

.secure-note svg {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.8;
}

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 40px 24px 56px;
    max-width: 480px;
  }

  .brand-pane {
    gap: 18px;
    text-align: center;
    align-items: center;
  }

  .brand-copy h1 {
    font-size: 28px;
  }

  .brand-copy p,
  .feature-list {
    display: none;
  }

  .brand-foot {
    display: none;
  }

  .login-card {
    max-width: none;
  }
}

@media (max-height: 720px) and (min-width: 961px) {
  .login-shell {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .brand-copy h1 {
    font-size: 32px;
  }

  .login-card {
    padding-top: 28px;
    padding-bottom: 20px;
  }
}
