:root {
  --bg: #050915;
  --panel: rgba(12, 20, 42, 0.86);
  --line: rgba(139, 168, 255, 0.2);
  --text: #e9efff;
  --muted: #91a3c9;
  --blue: #6ea8ff;
  --cyan: #7ee7ff;
  --violet: #9d8cff;
  --danger: #ff9bb0;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 620px at 50% -15%, rgba(70, 103, 220, 0.25), transparent 65%),
    radial-gradient(700px 500px at 105% 90%, rgba(109, 76, 200, 0.18), transparent 65%),
    linear-gradient(180deg, #060b19, #040711 70%, #03050d);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

.login-grid {
  position: fixed;
  inset: 0;
  opacity: 0.33;
  background-image:
    linear-gradient(rgba(139, 168, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 168, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 72%);
  pointer-events: none;
}

.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}
.orb-a {
  width: 340px;
  height: 340px;
  top: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(66, 116, 255, 0.28), transparent 68%);
}
.orb-b {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -220px;
  background: radial-gradient(circle, rgba(143, 92, 255, 0.24), transparent 68%);
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(420px, calc(100vw - 36px));
  padding: 30px 32px 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(17, 29, 58, 0.94), rgba(7, 12, 26, 0.9));
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(126, 231, 255, 0.35), transparent 35%, rgba(157, 140, 255, 0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-brand { text-align: center; }

.login-mascot {
  width: 112px;
  height: 112px;
  margin: -108px auto 10px;
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(160deg, rgba(30, 48, 98, 0.95), rgba(10, 18, 38, 0.95));
  border: 1px solid rgba(139, 168, 255, 0.28);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45), 0 0 42px rgba(93, 141, 255, 0.16);
}

.login-mascot img { width: 100%; height: 100%; display: block; object-fit: contain; }

.eyebrow {
  margin: 3px 0 3px;
  color: #6f86b8;
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 650;
}

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.08em;
  background: linear-gradient(120deg, #eaf3ff, #8fbcff 55%, #b9a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { margin: 6px 0 22px; color: var(--muted); font-size: 12.5px; }

form { display: grid; gap: 10px; }

label {
  color: #a9badb;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.password-wrap { position: relative; }

input {
  width: 100%;
  height: 48px;
  padding: 0 66px 0 14px;
  border: 1px solid rgba(139, 168, 255, 0.22);
  border-radius: 13px;
  color: var(--text);
  background: rgba(4, 9, 21, 0.72);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus {
  border-color: rgba(126, 231, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(88, 151, 255, 0.1);
}

input::placeholder { color: #5e7196; }

.toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #8fa6cc;
  background: rgba(139, 168, 255, 0.08);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.toggle:hover { color: #dff4ff; }

.submit {
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 13px;
  color: #04101e;
  background: linear-gradient(135deg, #9fe9ff, #7aa9ff 55%, #a997ff);
  font: inherit;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(88, 139, 255, 0.2);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.submit:hover { transform: translateY(-1px); filter: brightness(1.04); }
.submit:disabled { opacity: 0.55; cursor: wait; transform: none; }

.error {
  margin: 2px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 155, 176, 0.3);
  border-radius: 10px;
  color: #ffc0cb;
  background: rgba(255, 91, 126, 0.08);
  font-size: 12px;
}

.hidden { display: none !important; }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(139, 168, 255, 0.12);
  color: #65789e;
  font-size: 10.5px;
}

.lock-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6ee7d8;
  box-shadow: 0 0 10px rgba(110, 231, 216, 0.7);
}

@media (max-width: 520px) {
  .login-body {
    min-height: 100svh;
    padding: calc(24px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
  .login-card { width: calc(100vw - 28px); padding: 26px 22px 20px; border-radius: 22px; }
  .login-mascot { width: 96px; height: 96px; margin-top: -84px; border-radius: 26px; }
  input { height: 50px; font-size: 16px; }
  .submit { height: 50px; }
}
