:root {
  --ink: #232936;
  --muted: #8c95a8;
  --line: #dfe4ec;
  --blue: #27a4e5;
  --blue-deep: #168dce;
  --orange: #ff7a3d;
  --danger: #e04b4b;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  padding-top: clamp(22px, 4.4vh, 56px);
  display: flex;
  flex-direction: column;
  background: #fff;
}

.login-hero {
  position: relative;
  flex: 1;
  min-height: 628px;
  display: flex;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(58% 84% at 9% 28%, rgba(255, 196, 152, 0.38) 0%, rgba(255, 196, 152, 0) 62%),
    radial-gradient(42% 64% at 84% 18%, rgba(255, 196, 112, 0.28) 0%, rgba(255, 196, 112, 0) 70%),
    linear-gradient(106deg, #f05451 0%, #fa6356 32%, #ff7b45 65%, #ff9538 100%);
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(145, 23, 18, 0.1), transparent 24%, transparent 82%, rgba(157, 54, 11, 0.1)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, 160px 100%;
  opacity: 0.38;
}

.skyline {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  width: 820px;
  height: 420px;
  left: -160px;
  top: 30%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  filter: blur(20px);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1500px;
  min-height: 100%;
  margin: 0 auto;
  padding: 0 clamp(36px, 5.8vw, 92px);
  display: grid;
  grid-template-columns: minmax(460px, 1.18fr) minmax(370px, 428px);
  gap: clamp(24px, 4.6vw, 76px);
  align-items: center;
}

/* ------------------------------------------------------------------ */
/* 左侧插画                                                            */
/* ------------------------------------------------------------------ */

.login-visual {
  align-self: center;
  padding: 10px 0 6px;
  position: relative;
  animation: visual-in 0.8s cubic-bezier(0.22, 0.78, 0.3, 1) both;
}

.hero-illustration {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(148, 44, 24, 0.12));
  animation: gentle-float 7s ease-in-out infinite;
}

@keyframes visual-in {
  from {
    opacity: 0;
    transform: translate3d(-24px, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* ------------------------------------------------------------------ */
/* 登录区                                                              */
/* ------------------------------------------------------------------ */

.login-panel {
  width: 100%;
  max-width: 428px;
  justify-self: end;
  padding: 16px 0;
  animation: panel-in 0.65s 0.12s cubic-bezier(0.22, 0.78, 0.3, 1) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translate3d(18px, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.system-heading {
  margin: 0 0 22px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.system-heading h1 {
  margin: 0;
  font-size: clamp(26px, 1.85vw, 34px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.035em;
  text-shadow: 0 3px 16px rgba(124, 32, 17, 0.22);
}

.system-note {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.72);
}

.login-card {
  width: 100%;
  padding: 35px 40px 26px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 9px;
  box-shadow:
    0 34px 66px rgba(124, 29, 16, 0.24),
    0 4px 12px rgba(124, 29, 16, 0.08);
}

.card-heading {
  margin: 0 0 25px;
  text-align: center;
}

.card-heading h2 {
  margin: 0;
  color: #2b303a;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.card-heading p {
  margin: 7px 0 0;
  color: #a0a7b4;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.field {
  position: relative;
  display: block;
  margin-top: 14px;
}

.field:first-of-type {
  margin-top: 0;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  display: inline-flex;
  color: #a8afbc;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.18s ease;
}

.field input {
  width: 100%;
  height: 47px;
  padding: 0 44px 0 42px;
  color: #2c3240;
  font-size: 14px;
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 4px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.field input::placeholder {
  color: #aeb5c1;
  font-size: 13.5px;
}

.field input:hover {
  border-color: #c8d0dc;
}

.field input:focus {
  border-color: #48b6e9;
  background: #fbfdff;
  box-shadow: 0 0 0 3px rgba(39, 164, 229, 0.11);
}

.field:focus-within .field-icon {
  color: var(--blue);
}

.field.has-error input {
  border-color: #e27b7b;
  background: #fffafa;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a4abba;
  background: transparent;
  border: 0;
  border-radius: 5px;
  transform: translateY(-50%);
  transition: color 0.18s ease, background 0.18s ease;
}

.password-toggle:hover {
  color: #6e7787;
  background: #f4f7fa;
}

.form-message {
  margin-top: 13px;
  padding: 9px 11px;
  color: #b93b3b;
  font-size: 12px;
  line-height: 1.5;
  background: #fff3f2;
  border: 1px solid #f5d4d1;
  border-radius: 4px;
}

.login-button {
  position: relative;
  width: 100%;
  height: 47px;
  margin-top: 22px;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  background: linear-gradient(180deg, #35b3e9 0%, #219fe0 100%);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(34, 153, 215, 0.26);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.login-button:hover {
  filter: brightness(1.035);
  box-shadow: 0 10px 22px rgba(34, 153, 215, 0.32);
}

.login-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(34, 153, 215, 0.24);
}

.login-button:focus-visible {
  outline: 3px solid rgba(39, 164, 229, 0.26);
  outline-offset: 2px;
}

.login-button:disabled {
  cursor: default;
  filter: saturate(0.82);
  opacity: 0.84;
}

.button-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.demo-hint {
  margin-top: 22px;
  padding-top: 17px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9ba3b0;
  font-size: 11.5px;
  border-top: 1px dashed #e8ebf0;
}

.demo-chip {
  padding: 2px 7px;
  color: #6f7a8c;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  background: #f4f6f9;
  border: 1px solid #e3e8ef;
  border-radius: 4px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.demo-chip:hover {
  color: var(--blue-deep);
  background: #eef8fd;
  border-color: #bfe3f5;
}

.demo-hint .slash {
  color: #c2c8d1;
}

.fill-tip {
  color: #bec4cd;
  font-size: 10.5px;
}

.login-help {
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.025em;
  text-align: center;
}

.login-footer {
  min-height: clamp(40px, 4.8vh, 60px);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7bdc7;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-align: center;
  background: #fff;
}

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

@media (max-width: 1240px) {
  .login-shell {
    grid-template-columns: minmax(390px, 1fr) minmax(360px, 410px);
    gap: 26px;
    padding: 0 44px;
  }

  .login-panel {
    max-width: 410px;
  }

  .login-card {
    padding: 32px 34px 24px;
  }
}

@media (max-width: 980px) {
  .login-page {
    padding-top: 0;
  }

  .login-hero {
    min-height: 660px;
    padding: 34px 0;
  }

  .login-shell {
    grid-template-columns: minmax(0, 440px);
    justify-content: center;
    padding: 0 26px;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    max-width: 440px;
    justify-self: center;
    padding: 0;
  }

  .system-heading {
    text-align: center;
  }

  .system-heading h1 {
    font-size: 28px;
  }

  .login-footer {
    min-height: 52px;
    padding: 15px 18px;
  }
}

@media (max-width: 560px) {
  .login-hero {
    min-height: calc(100vh - 52px);
    padding: 42px 0 30px;
  }

  .login-shell {
    padding: 0 18px;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.17em;
  }

  .system-heading {
    margin-bottom: 18px;
  }

  .system-heading h1 {
    font-size: 23px;
    letter-spacing: 0.02em;
  }

  .system-note {
    margin-top: 8px;
    font-size: 11px;
  }

  .login-card {
    padding: 28px 22px 22px;
    border-radius: 12px;
    box-shadow: 0 24px 50px rgba(124, 29, 16, 0.22);
  }

  .card-heading {
    margin-bottom: 22px;
  }

  .card-heading h2 {
    font-size: 20px;
  }

  .field input {
    height: 46px;
  }

  .login-button {
    height: 46px;
  }

  .login-help {
    padding: 0 8px;
  }

  .login-footer {
    padding: 14px 16px;
    font-size: 10.5px;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .login-hero {
    min-height: 560px;
  }

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

  .card-heading {
    margin-bottom: 20px;
  }

  .login-panel {
    padding: 8px 0;
  }

  .demo-hint {
    margin-top: 17px;
    padding-top: 13px;
  }

  .login-footer {
    min-height: 38px;
    padding: 10px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* 按参考页游登录页收窄版式：标题在卡片上方，去掉辅助说明 */
.eyebrow,
.system-note,
.card-heading p,
.demo-hint,
.login-help {
  display: none !important;
}

.login-shell {
  grid-template-columns: minmax(430px, 1.15fr) minmax(340px, 380px);
}

@media (max-width: 899px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-illustration {
  max-width: 650px;
}

.login-panel {
  max-width: 380px;
}

.system-heading {
  margin-bottom: 24px;
  text-align: center;
}

.system-heading h1 {
  font-size: clamp(25px, 1.9vw, 31px);
}

.login-card {
  padding: 30px 34px 24px;
  border-radius: 4px;
}

.card-heading {
  margin-bottom: 24px;
}

.card-heading h2 {
  font-size: 21px;
}

.login-button {
  height: 43px;
}
