:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --navy: #00183f;
  --text: #f7fbff;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { overflow-x: hidden; background: var(--navy); color: var(--text); }
button, input { font: inherit; }

.login-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 76%, rgba(0, 203, 255, 0.34), transparent 13%),
    radial-gradient(ellipse at 50% 54%, #062c65 0%, #001a47 46%, #001435 100%);
}

.login-page::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
  opacity: 0.34;
  background-image:
    radial-gradient(circle, #61e7ff 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(41, 165, 255, 0.7) 0 1px, transparent 1.5px);
  background-position: 16px 31px, 91px 74px;
  background-size: 137px 109px, 183px 143px;
  mask-image: linear-gradient(to bottom, transparent 0 39%, #000 58% 100%);
}

.network-scene, .network-scene > div { position: absolute; pointer-events: none; }
.network-scene { inset: 0; z-index: -1; overflow: hidden; }

.horizon-glow {
  left: 50%;
  top: 75%;
  width: min(78vw, 1120px);
  height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #d9ffff;
  box-shadow: 0 0 9px 4px #66edff, 0 0 38px 17px rgba(0, 194, 255, 0.91), 0 0 110px 48px rgba(0, 127, 255, 0.48);
}

.rail-grid {
  left: 50%;
  top: 74.5%;
  width: 185vw;
  height: 66vh;
  transform: translateX(-50%) perspective(340px) rotateX(67deg);
  transform-origin: 50% 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 6.6%, rgba(24, 187, 255, 0.66) 6.75%, transparent 6.94%),
    repeating-linear-gradient(0deg, transparent 0 7.8%, rgba(20, 140, 255, 0.32) 8.1%, transparent 8.4%);
  filter: drop-shadow(0 0 5px #008dff);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.85) 67%, transparent);
}

.side-lines {
  top: 41%;
  width: 50%;
  height: 45%;
  opacity: 0.78;
  background:
    linear-gradient(20deg, transparent 33%, rgba(40, 190, 255, 0.88) 33.3% 33.55%, transparent 33.9%),
    linear-gradient(16deg, transparent 44%, rgba(33, 140, 255, 0.78) 44.25% 44.5%, transparent 44.85%),
    linear-gradient(12deg, transparent 54%, rgba(0, 216, 255, 0.63) 54.2% 54.45%, transparent 54.8%),
    linear-gradient(8deg, transparent 63%, rgba(68, 146, 255, 0.7) 63.2% 63.42%, transparent 63.75%);
  filter: drop-shadow(0 0 5px rgba(0, 193, 255, 0.85));
}
.side-lines-left { left: 0; }
.side-lines-right { right: 0; transform: scaleX(-1); }

.particles {
  inset: 57% 0 0;
  opacity: 0.75;
  background-image:
    radial-gradient(circle, #83f6ff 0 1px, transparent 1.8px),
    radial-gradient(circle, #0cbfff 0 1.3px, transparent 2px),
    radial-gradient(circle, #b8ffff 0 0.8px, transparent 1.5px);
  background-position: 0 0, 47px 22px, 31px 73px;
  background-size: 73px 59px, 101px 89px, 149px 111px;
  mask-image: radial-gradient(ellipse at 50% 38%, transparent 0 13%, #000 38% 100%);
}

.login-content {
  align-self: start;
  justify-self: center;
  width: min(100% - 32px, 760px);
  padding-top: clamp(34px, 8.9vh, 114px);
  text-align: center;
}
.brand { text-shadow: 0 2px 5px rgba(0, 16, 49, 0.7); }

.university-seal {
  display: block;
  width: clamp(104px, 17.2vw, 220px);
  aspect-ratio: 1;
  margin: 0 auto clamp(24px, 3.3vh, 42px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.5);
}

.brand h1 {
  margin: 0;
  font-size: clamp(35px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand p { margin: clamp(10px, 1.5vh, 18px) 0 clamp(30px, 4.6vh, 58px); font-size: clamp(22px, 2.3vw, 34px); line-height: 1.2; }

.login-panel {
  position: relative;
  width: min(100%, 542px);
  margin: 0 auto;
  padding: clamp(28px, 4.1vh, 52px) clamp(27px, 4.1vw, 57px) clamp(25px, 3.7vh, 47px);
  border: 1px solid rgba(144, 199, 240, 0.58);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(43, 82, 133, 0.59), rgba(20, 62, 108, 0.62));
  box-shadow: inset 0 0 24px rgba(67, 156, 225, 0.08), 0 15px 38px rgba(0, 18, 53, 0.23);
  backdrop-filter: blur(5px);
  text-align: left;
}
.login-panel > label:first-child { display: block; margin: 0 0 12px 11px; color: #b5cae2; font-size: clamp(15px, 1.25vw, 19px); }
.login-panel input[type="text"], .login-panel input[type="password"] {
  width: 100%;
  height: clamp(48px, 5.2vh, 56px);
  padding: 0 48px 0 15px;
  border: 1px solid rgba(123, 174, 219, 0.38);
  border-radius: 4px;
  outline: 0;
  background: rgba(5, 44, 92, 0.29);
  color: white;
  font-size: clamp(15px, 1.22vw, 18px);
  box-shadow: inset 0 0 7px rgba(4, 26, 60, 0.3);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.login-panel input::placeholder { color: #a9bfd8; opacity: 0.86; }
.login-panel input:focus { border-color: #38c8ff; box-shadow: 0 0 0 3px rgba(22, 177, 255, 0.16), inset 0 0 7px rgba(4, 26, 60, 0.3); }
.password-field { position: relative; margin-top: clamp(16px, 1.75vh, 20px); }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 37px;
  height: 37px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.eye-icon { position: relative; display: block; width: 18px; height: 12px; border: 2px solid #a8c4df; border-radius: 50% / 60%; opacity: 0.7; }
.eye-icon::after { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; content: ""; transform: translate(-50%, -50%); border-radius: 50%; background: #a8c4df; }
.password-toggle[aria-pressed="true"] .eye-icon::before { position: absolute; z-index: 1; left: -3px; top: 4px; width: 23px; height: 2px; content: ""; transform: rotate(-42deg); background: #a8c4df; }

.remember-option { display: flex; width: max-content; align-items: center; gap: 9px; margin: clamp(13px, 1.5vh, 17px) 0 clamp(15px, 1.7vh, 19px); color: #a9bfd8; font-size: clamp(14px, 1.1vw, 17px); cursor: pointer; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkbox-mark { position: relative; width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #84b7dd; border-radius: 3px; background: rgba(0, 37, 79, 0.23); }
.remember-option input:checked + .checkbox-mark { border-color: #22bfff; background: #159eff; }
.remember-option input:checked + .checkbox-mark::after { position: absolute; left: 4px; top: 0; width: 5px; height: 10px; content: ""; transform: rotate(45deg); border: solid white; border-width: 0 2px 2px 0; }
.remember-option input:focus-visible + .checkbox-mark, .password-toggle:focus-visible, .form-links a:focus-visible { outline: 2px solid #58d7ff; outline-offset: 3px; }

.login-button {
  width: 100%;
  height: clamp(52px, 5.4vh, 61px);
  border: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, #149af7, #139efc);
  color: white;
  font-size: clamp(19px, 1.55vw, 24px);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 47, 105, 0.62);
  box-shadow: 0 5px 16px rgba(0, 126, 255, 0.25);
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}
.login-button:hover { filter: brightness(1.1); }
.login-button:active { transform: translateY(1px); }
.login-button:focus-visible { outline: 3px solid rgba(111, 225, 255, 0.92); outline-offset: 3px; }
.enter-system-button {
  display: flex;
  width: min(100%, 542px);
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  text-decoration: none;
}
footer {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(22px, 3.2vh, 42px);
  width: calc(100% - 28px);
  transform: translateX(-50%);
  color: rgba(244, 249, 255, 0.92);
  font-size: clamp(12px, 1.18vw, 17px);
  text-align: center;
  text-shadow: 0 2px 4px #001336;
}

@media (max-height: 850px) and (min-width: 700px) {
  .login-content { padding-top: 24px; transform: scale(0.81); transform-origin: top center; }
  footer { bottom: 14px; }
}

@media (max-width: 680px) {
  .login-page { min-height: 760px; }
  .login-content { width: min(100% - 28px, 520px); padding-top: 32px; }
  .university-seal { margin-bottom: 22px; }
  .brand h1 { font-size: clamp(27px, 8vw, 38px); white-space: normal; }
  .brand p { margin-bottom: 28px; font-size: 21px; }
  .login-panel { padding: 27px 24px 28px; }
  .horizon-glow { top: 78%; }
  .rail-grid { top: 77.5%; width: 290vw; }
  footer { bottom: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .particles { animation: particle-drift 14s linear infinite; }
  @keyframes particle-drift { to { background-position: 73px 59px, 148px 111px, 180px 184px; } }
}
