:root {
  color-scheme: dark;
  --night: #081321;
  --night-deep: #060e19;
  --surface: #0e2032;
  --line: rgba(179, 213, 227, .17);
  --text: #f5f8f8;
  --muted: #aebfca;
  --gold: #e9c588;
  --cyan: #88d9df;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--night-deep);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.ambient, .page-grid { position: fixed; inset: 0; pointer-events: none; }
.ambient-a {
  background: radial-gradient(ellipse 50% 56% at 22% 55%, rgba(23, 106, 126, .22), transparent 70%);
}
.ambient-b {
  background: radial-gradient(ellipse 38% 45% at 88% 12%, rgba(54, 82, 138, .22), transparent 75%),
              radial-gradient(ellipse 35% 35% at 86% 90%, rgba(42, 100, 121, .15), transparent 76%);
}
.page-grid {
  opacity: .32;
  background-image: linear-gradient(rgba(132, 174, 190, .07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(132, 174, 190, .07) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(90deg, black, transparent 74%);
}
.login-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 88px)); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 0 0; }
.brand { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 43px; height: 46px;
  border: 1px solid rgba(233, 197, 136, .8); border-radius: 6px 12px 12px 6px;
  box-shadow: inset 0 0 0 4px rgba(233, 197, 136, .06), 0 0 24px rgba(233, 197, 136, .08);
  color: var(--gold); font: 27px/1 'Songti SC', 'STSong', serif;
}
.brand-text { font-size: 18px; font-weight: 660; letter-spacing: .045em; }
.brand-text span { padding-left: 7px; font-weight: 440; color: #c8d5db; }
.private-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 13px; border: 1px solid rgba(136, 217, 223, .23); border-radius: 100px;
  color: #bbd7dc; background: rgba(15, 42, 58, .42); font-size: 12px; letter-spacing: .06em;
}
.private-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 11px rgba(136, 217, 223, .8); }

.login-layout {
  min-height: min(760px, calc(100vh - 150px)); display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
  align-items: center; gap: clamp(48px, 6vw, 100px); padding: 24px 0 30px;
}
.story-side { min-width: 0; }
.overline { margin: 0 0 19px; color: var(--gold); letter-spacing: .24em; font-size: 11px; font-weight: 650; }
h1 {
  margin: 0; font: 600 3.55rem/1.32 'Songti SC', 'STSong', 'SimSun', serif;
  letter-spacing: -.025em; text-wrap: balance;
}
h1 span { color: var(--gold); }
.story-description { max-width: 420px; margin: 20px 0 0; color: #b7cad1; line-height: 1.9; font-size: 15px; text-wrap: pretty; }

.book-stage { position: relative; width: min(500px, 100%); height: 315px; margin: 8px 0 -9px; perspective: 950px; isolation: isolate; }
.book-stage::before {
  content: ''; position: absolute; left: 11%; right: 8%; bottom: 14px; height: 70px;
  background: radial-gradient(ellipse, rgba(80, 174, 189, .21), transparent 68%); filter: blur(12px);
}
.book-shadow { position: absolute; left: 20%; bottom: 24px; width: 70%; height: 48px; border-radius: 50%; background: #020912; filter: blur(19px); opacity: .8; transform: rotate(-9deg); }
.orbit { position: absolute; border: 1px solid rgba(129, 196, 205, .16); border-radius: 50%; transform: rotateX(72deg) rotateZ(-15deg); }
.orbit-back { width: 440px; height: 310px; left: 3%; top: 45px; }
.orbit-front { width: 340px; height: 245px; left: 12%; top: 120px; border-color: rgba(233, 197, 136, .25); border-left-color: transparent; border-top-color: transparent; }
.book-object {
  position: absolute; left: 23%; top: 31px; width: 230px; height: 270px;
  transform-style: preserve-3d;
  transform: rotateX(13deg) rotateY(-26deg) rotateZ(-6deg);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}
.book-cover, .book-pages, .book-spine { position: absolute; inset: 0; border-radius: 5px 16px 15px 5px; }
.book-pages {
  transform: translate3d(21px, 12px, -18px);
  background: repeating-linear-gradient(180deg, #dce8e8 0 3px, #a8bfc4 3px 4px);
  border: 2px solid #c4d3d5; box-shadow: 10px 9px 18px rgba(0, 0, 0, .34);
}
.book-spine {
  left: -16px; width: 29px; transform: rotateY(-72deg) translateX(-3px) translateZ(1px);
  background: linear-gradient(90deg, #0e3146, #236079 40%, #082839);
  box-shadow: inset 5px 0 9px rgba(0, 0, 0, .4);
}
.book-cover {
  overflow: hidden; transform: translateZ(18px);
  border: 1px solid rgba(166, 231, 231, .48);
  background: linear-gradient(145deg, #245f70 0%, #154257 38%, #0b273d 72%, #091c31 100%);
  box-shadow: inset 5px 0 0 rgba(194, 226, 222, .11), inset 0 0 0 7px rgba(230, 239, 224, .035),
              20px 27px 45px rgba(1, 8, 16, .55), 0 0 34px rgba(70, 181, 198, .15);
}
.book-cover::after {
  content: ''; position: absolute; inset: 17px; border: 1px solid rgba(225, 203, 164, .23); border-radius: 2px 9px 8px 2px;
}
.cover-sheen { position: absolute; width: 180px; height: 350px; top: -80px; left: -120px; transform: rotate(23deg); background: linear-gradient(90deg, transparent, rgba(225, 255, 251, .11), transparent); }
.cover-orbit { position: absolute; left: 31px; right: 31px; top: 30px; height: 145px; border: 1px solid rgba(178, 224, 218, .34); border-radius: 50%; }
.orbit-one { transform: rotate(-32deg) rotateY(60deg); }
.orbit-two { transform: rotate(32deg) rotateY(60deg); border-color: rgba(233, 197, 136, .33); }
.cover-star { position: absolute; color: var(--gold); text-shadow: 0 0 15px rgba(233, 197, 136, .9); }
.star-one { top: 53px; left: 105px; font-size: 44px; }
.star-two { top: 100px; left: 64px; font-size: 18px; }
.cover-title { position: absolute; z-index: 1; left: 29px; bottom: 54px; color: #f8f5ed; font: 600 29px/1.35 'Songti SC', 'STSong', serif; letter-spacing: .08em; }
.cover-title span { font-size: 24px; font-weight: 400; }
.cover-foot { position: absolute; z-index: 1; left: 30px; bottom: 27px; color: #b4d3d4; font-size: 7px; letter-spacing: .13em; }
.light-point { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #d8e7dc; box-shadow: 0 0 20px 4px rgba(136, 217, 223, .53); }
.light-one { left: 7%; top: 95px; }
.light-two { right: 16%; bottom: 63px; width: 4px; height: 4px; }
.story-foot { display: flex; align-items: center; gap: 12px; color: #a5bec9; font-size: 12px; letter-spacing: .09em; }
.foot-line { display: block; width: 28px; height: 1px; background: var(--gold); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .book-stage:hover .book-object { transform: rotateX(9deg) rotateY(-18deg) rotateZ(-4deg) translateY(-6px); }
}

.login-panel {
  position: relative; width: 100%; padding: 1px; border-radius: 24px;
  background: linear-gradient(130deg, rgba(223, 241, 237, .26), rgba(117, 187, 193, .06) 43%, rgba(233, 197, 136, .24));
  box-shadow: 0 32px 80px rgba(1, 8, 16, .36), 0 0 60px rgba(72, 161, 178, .07);
}
.panel-content {
  position: relative; overflow: hidden; min-height: 495px; padding: 40px 42px 31px; border-radius: 23px;
  background: linear-gradient(145deg, rgba(20, 42, 60, .97), rgba(11, 27, 44, .98) 70%);
}
.panel-content::before {
  content: ''; position: absolute; top: -120px; right: -105px; width: 290px; height: 280px;
  background: radial-gradient(circle, rgba(116, 216, 220, .11), transparent 68%); pointer-events: none;
}
.panel-accent { position: absolute; z-index: 2; left: 43px; top: 1px; width: 76px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.panel-icon { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(233, 197, 136, .35); border-radius: 13px; color: var(--gold); background: rgba(233, 197, 136, .07); font-size: 25px; }
.panel-overline { margin: 26px 0 2px; color: var(--gold); font-size: 12px; letter-spacing: .16em; font-weight: 600; }
h2 { margin: 0; font-size: 30px; line-height: 1.35; letter-spacing: -.02em; font-weight: 650; }
.panel-description { margin: 8px 0 29px; color: var(--muted); font-size: 14px; }
form { position: relative; }
label { display: block; margin: 20px 0 8px; color: #e6edef; font-size: 13px; font-weight: 590; }
.input-wrap { display: flex; align-items: center; min-height: 52px; border: 1px solid #3d5667; border-radius: 11px; background: rgba(4, 18, 31, .59); transition: border-color .18s ease, box-shadow .18s ease; }
.input-wrap:hover { border-color: #6b8c98; }
.input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 197, 136, .14); }
.field-icon { display: grid; place-items: center; flex: 0 0 49px; color: #b9ced5; font-size: 22px; line-height: 1; }
.lock-icon { font-size: 25px; }
input { min-width: 0; flex: 1; height: 50px; padding: 0 13px 0 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
input::placeholder { color: #a8bac3; opacity: 1; }
.password-toggle { flex: 0 0 auto; margin-right: 9px; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: #c5d5dc; font-size: 12px; }
.password-toggle:hover { color: white; background: rgba(206, 229, 232, .08); }
.login-error { min-height: 22px; margin: 12px 0 0; color: #ffd0bd; font-size: 13px; }
.submit-button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; margin-top: 12px;
  padding: 0 19px 0 23px; border: 1px solid #e9c588; border-radius: 11px;
  background: linear-gradient(105deg, #f2d8a7, #e6ba78); color: #152735;
  box-shadow: 0 10px 22px rgba(184, 126, 60, .15); font-size: 15px; font-weight: 690;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.submit-button span:last-child { font-size: 22px; font-weight: 400; }
.submit-button:hover { filter: brightness(1.06); box-shadow: 0 13px 28px rgba(184, 126, 60, .22); transform: translateY(-2px); }
.submit-button:active { transform: translateY(0); }
.panel-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 23px 0 0; color: #a9c0c9; font-size: 12px; }
.note-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.site-footer { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding: 17px 0 24px; color: #9db5bf; font-size: 11px; letter-spacing: .04em; }

@media (max-width: 980px) {
  .login-shell { width: min(680px, calc(100% - 48px)); }
  .login-layout { grid-template-columns: 1fr; gap: 25px; padding-top: 54px; }
  .story-side { display: grid; grid-template-columns: 1fr 235px; align-items: center; column-gap: 15px; }
  .story-side .overline, .story-side h1, .story-description { grid-column: 1; }
  .story-side h1 { font-size: 3rem; }
  .story-description { margin-top: 10px; }
  .book-stage { grid-column: 2; grid-row: 1 / 4; width: 235px; height: 235px; margin: 0; }
  .book-object { left: 15px; top: 1px; transform: rotateX(13deg) rotateY(-26deg) rotateZ(-6deg) scale(.7); transform-origin: left top; }
  .book-stage:hover .book-object { transform: rotateX(13deg) rotateY(-26deg) rotateZ(-6deg) scale(.7); }
  .orbit-back, .orbit-front { display: none; }
  .story-foot { grid-column: 1 / -1; margin-top: 10px; }
  .panel-content { min-height: 0; padding: 38px 42px 31px; }
}
@media (max-width: 610px) {
  .login-shell { width: min(430px, calc(100% - 32px)); }
  .topbar { padding-top: 22px; }
  .brand-text { font-size: 16px; }
  .brand-mark { width: 37px; height: 40px; font-size: 23px; }
  .private-badge { display: none; }
  .login-layout { padding-top: 33px; gap: 22px; }
  .story-side { display: grid; grid-template-columns: minmax(0, 1fr) 113px; align-items: center; column-gap: 6px; }
  .overline { margin-bottom: 11px; font-size: 10px; }
  .story-side h1 { font-size: 2rem; line-height: 1.28; }
  .story-description { display: none; }
  .book-stage { grid-column: 2; grid-row: 1 / 3; height: 115px; width: 113px; margin: 0; overflow: hidden; }
  .book-object { left: 7px; top: 4px; transform: rotateX(13deg) rotateY(-26deg) rotateZ(-6deg) scale(.38); }
  .book-stage:hover .book-object { transform: rotateX(13deg) rotateY(-26deg) rotateZ(-6deg) scale(.38); }
  .book-stage::before { bottom: -15px; }
  .book-shadow { bottom: 0; left: 35%; width: 48%; }
  .light-one { top: 40px; left: 17%; }
  .light-two { bottom: 20px; right: 18%; }
  .story-foot { display: none; }
  .panel-content { padding: 29px 25px 25px; }
  .panel-accent { left: 25px; }
  .panel-overline { margin-top: 22px; }
  h2 { font-size: 27px; }
  .panel-description { margin-bottom: 22px; }
  .site-footer { flex-wrap: wrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
