:root {
  color-scheme: dark;
  --white: #f7f7ff;
  --soft-white: #d8dcf1;
  --muted: #a4acc7;
  --purple: #a844ff;
  --violet: #7564ff;
  --blue: #2dbfff;
  --line: rgba(178, 194, 255, 0.22);
  --panel: rgba(18, 27, 78, 0.74);
  --field: rgba(112, 132, 197, 0.2);
  --danger: #ff9cbd;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: #040a25;
  color: var(--white);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
label,
input[type="checkbox"] {
  cursor: pointer;
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.scene,
.scene-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  transform: scale(1.015);
  animation: scene-drift 18s ease-in-out infinite alternate;
}

.scene-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 8, 32, 0.44) 0%, rgba(3, 7, 28, 0.12) 52%, rgba(4, 7, 26, 0.44) 100%),
    linear-gradient(180deg, rgba(2, 7, 30, 0.2) 0%, rgba(2, 6, 26, 0.02) 56%, rgba(2, 7, 28, 0.5) 100%);
  transition: opacity 220ms ease;
}

body.is-bright .scene-shade {
  opacity: 0.62;
}

.site-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 170px 1fr auto;
  align-items: center;
  gap: 28px;
  width: min(100%, 1536px);
  height: 106px;
  margin: 0 auto;
  padding: 0 56px;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand strong {
  font-size: 21px;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 34px;
}

.brand-mark i {
  position: absolute;
  top: 1px;
  width: 13px;
  height: 32px;
  border-radius: 7px 7px 3px 3px;
  transform: rotate(25deg);
}

.brand-mark i:first-child {
  left: 5px;
  background: linear-gradient(180deg, #49c4ff, #7760ff);
}

.brand-mark i:last-child {
  left: 22px;
  height: 27px;
  background: linear-gradient(180deg, #b54cff, #6a6eff);
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(30px, 4vw, 66px);
  height: 100%;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: rgba(224, 226, 243, 0.72);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--white);
}

.main-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #aa48ff, #5a8eff);
  box-shadow: 0 0 14px #9853ff;
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-button,
.experience-button {
  border: 0;
  color: var(--white);
}

.theme-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(159, 176, 240, 0.12);
  border-radius: 50%;
  background: rgba(39, 56, 117, 0.32);
  font-size: 22px;
}

.experience-button {
  height: 40px;
  padding: 0 22px;
  border-radius: 20px;
  background: linear-gradient(100deg, var(--purple), var(--violet) 48%, var(--blue));
  box-shadow: 0 8px 24px rgba(112, 73, 255, 0.28);
  font-weight: 650;
}

.page-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(470px, 535px);
  gap: clamp(50px, 7vw, 120px);
  width: min(calc(100% - 112px), 1408px);
  min-height: calc(100vh - 106px);
  margin: 0 auto;
  padding: 76px 8px 72px;
}

.hero-content {
  position: relative;
  min-width: 0;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(50px, 4.2vw, 70px);
  font-weight: 730;
  line-height: 1.12;
  text-shadow: 0 3px 28px rgba(3, 5, 26, 0.32);
}

.hero-copy h1 span {
  background: linear-gradient(130deg, #49a9ff, #a14dff 76%);
  background-clip: text;
  color: transparent;
}

.hero-copy > p {
  margin: 18px 0 0;
  color: rgba(231, 232, 248, 0.76);
  font-size: 18px;
  line-height: 1.7;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 34px;
}

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

.feature > div {
  display: grid;
  gap: 4px;
}

.feature strong {
  font-size: 14px;
  font-weight: 650;
}

.feature small {
  color: rgba(216, 220, 242, 0.63);
  font-size: 11px;
}

.feature-icon {
  position: relative;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #7a79ff;
}

.feature-icon--image,
.feature-icon--video {
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.feature-icon--image::before {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 9px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  content: "";
  transform: rotate(-43deg);
}

.feature-icon--video::after {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  content: "";
}

.feature-icon--spark {
  color: #c25cff;
  font-size: 28px;
}

.inspiration-card {
  position: absolute;
  bottom: 26px;
  left: 0;
  display: grid;
  grid-template-columns: 276px 1fr 44px;
  align-items: center;
  gap: 22px;
  width: min(590px, 100%);
  min-height: 126px;
  padding: 15px 22px;
  border: 1px solid rgba(128, 129, 255, 0.62);
  border-radius: 24px;
  background: linear-gradient(110deg, rgba(27, 55, 126, 0.78), rgba(32, 28, 99, 0.58));
  box-shadow: 0 0 35px rgba(76, 70, 255, 0.2), inset 0 0 34px rgba(69, 128, 255, 0.11);
  backdrop-filter: blur(16px);
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.preview-strip span {
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background-image: url("/assets/login-hero.png");
  background-size: 460px 306px;
}

.preview-strip span:nth-child(1) {
  background-position: 75% 44%;
}

.preview-strip span:nth-child(2) {
  background-position: 35% 50%;
}

.preview-strip span:nth-child(3) {
  background-position: 92% 65%;
}

.inspiration-copy {
  display: grid;
  gap: 7px;
}

.inspiration-copy strong {
  font-size: 17px;
  white-space: nowrap;
}

.inspiration-copy span {
  color: rgba(218, 222, 244, 0.66);
  font-size: 11px;
  line-height: 1.7;
}

.inspiration-card > button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #8955ff, #5369ed);
  color: #fff;
  font-size: 22px;
}

.login-panel {
  position: relative;
  align-self: center;
  width: 100%;
  min-height: 690px;
  padding: 60px 48px 46px;
  overflow: hidden;
  border: 1px solid rgba(113, 122, 255, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(39, 50, 135, 0.78), rgba(18, 27, 76, 0.68) 50%, rgba(21, 38, 105, 0.72)),
    var(--panel);
  box-shadow:
    0 0 0 1px rgba(168, 75, 255, 0.14),
    -5px 8px 36px rgba(171, 54, 255, 0.28),
    8px -3px 42px rgba(43, 175, 255, 0.23),
    inset 0 0 70px rgba(94, 111, 232, 0.12);
  backdrop-filter: blur(22px) saturate(125%);
}

.login-panel::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a74cff 23%, #fff 48%, #39c7ff 76%, transparent);
  box-shadow: 0 0 18px 3px rgba(123, 94, 255, 0.72);
  content: "";
}

.panel-heading h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
}

.panel-heading h2 span {
  margin-left: 8px;
  color: #9171ff;
}

.panel-heading p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 41px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-control {
  position: relative;
  display: flex;
  height: 61px;
  align-items: center;
  border: 1px solid rgba(167, 180, 235, 0.13);
  border-radius: 15px;
  background: var(--field);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-control:focus-within {
  border-color: rgba(112, 118, 255, 0.78);
  background: rgba(108, 127, 196, 0.28);
  box-shadow: 0 0 0 4px rgba(111, 87, 255, 0.16);
}

.field.is-invalid .field-control {
  border-color: rgba(255, 156, 189, 0.72);
}

.field-control input {
  width: 100%;
  height: 100%;
  padding: 0 52px 0 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  caret-color: #75baff;
  font-size: 15px;
}

.field-control input::placeholder {
  color: rgba(205, 211, 237, 0.58);
}

.user-icon,
.lock-icon {
  position: absolute;
  left: 23px;
  width: 18px;
  height: 18px;
  color: #c3c9eb;
}

.user-icon::before {
  position: absolute;
  top: 0;
  left: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.user-icon::after {
  position: absolute;
  bottom: 0;
  left: 1px;
  width: 15px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 10px 10px 3px 3px;
  content: "";
}

.lock-icon {
  top: 25px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.lock-icon::before {
  position: absolute;
  top: -8px;
  left: 3px;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  content: "";
}

.password-toggle {
  position: absolute;
  right: 15px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #c0c8ea;
}

.password-toggle span {
  position: relative;
  width: 19px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 50% / 65%;
}

.password-toggle span::after {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.password-toggle[aria-pressed="true"] span::before {
  position: absolute;
  top: 4px;
  left: -3px;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  content: "";
  transform: rotate(-40deg);
}

.field-error {
  min-height: 0;
  margin: 0 4px;
  color: var(--danger);
  font-size: 12px;
}

.field-error:not(:empty) {
  min-height: 16px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--soft-white);
  font-size: 14px;
}

.remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.remember-box {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(198, 207, 243, 0.55);
  border-radius: 4px;
  background: rgba(82, 94, 160, 0.42);
}

.remember input:checked + .remember-box {
  border-color: #8b62ff;
  background: linear-gradient(135deg, #a64cff, #5d7dff);
}

.remember input:checked + .remember-box::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #9d68ff;
  font-size: 14px;
  font-weight: 650;
}

.text-button:hover {
  color: #c2a0ff;
}

.login-button {
  position: relative;
  display: flex;
  height: 60px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 15px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(100deg, #ad3dff, #7565ff 48%, #2fc1ff);
  color: #fff;
  box-shadow: 0 12px 30px rgba(85, 71, 245, 0.3);
  font-size: 17px;
  font-weight: 700;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.login-button span:last-child {
  position: absolute;
  right: 70px;
  font-size: 26px;
  font-weight: 400;
  transition: transform 160ms ease;
}

.login-button:hover {
  filter: brightness(1.1);
  box-shadow: 0 16px 40px rgba(101, 72, 255, 0.4);
  transform: translateY(-1px);
}

.login-button:hover span:last-child {
  transform: translateX(4px);
}

.login-button:disabled {
  cursor: wait;
  filter: saturate(.72) brightness(.9);
  box-shadow: 0 8px 20px rgba(85, 71, 245, 0.2);
}

.login-button:disabled:hover {
  filter: saturate(.72) brightness(.9);
  box-shadow: 0 8px 20px rgba(85, 71, 245, 0.2);
  transform: none;
}

.login-button:disabled span:last-child {
  transform: none;
  opacity: .5;
}

.register-copy {
  margin: 66px 0 0;
  color: #bac0da;
  text-align: center;
  font-size: 14px;
}

.register-copy .text-button {
  margin: 0 3px 0 5px;
}

.register-copy > span {
  color: #a879ff;
  font-size: 22px;
  vertical-align: -2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(151, 135, 255, 0.45);
  border-radius: 10px;
  background: rgba(22, 28, 74, 0.94);
  color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #66bfff;
  outline-offset: 3px;
}

@keyframes scene-drift {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.045) translate3d(-0.5%, -0.35%, 0); }
}

@media (max-height: 880px) and (min-width: 981px) {
  .site-header { height: 86px; }
  .page-content {
    min-height: calc(100vh - 86px);
    padding-top: 34px;
    padding-bottom: 34px;
  }
  .login-panel {
    min-height: 610px;
    padding-top: 44px;
    padding-bottom: 34px;
  }
  .login-form { margin-top: 30px; }
  .register-copy { margin-top: 38px; }
  .inspiration-card { bottom: 4px; }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 150px 1fr auto;
    padding: 0 34px;
  }
  .main-nav { gap: 24px; }
  .page-content {
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 40px;
    width: calc(100% - 68px);
  }
  .hero-copy h1 { font-size: 52px; }
  .feature-list { gap: 20px; }
  .inspiration-card {
    grid-template-columns: 200px 1fr 42px;
  }
}

@media (max-width: 980px) {
  .login-page { overflow: visible; }
  .scene { position: fixed; }
  .scene-shade {
    position: fixed;
    background: rgba(3, 8, 31, 0.58);
  }
  .site-header {
    grid-template-columns: 1fr auto;
    height: 82px;
    padding: 0 24px;
  }
  .main-nav { display: none; }
  .experience-button { display: none; }
  .page-content {
    display: block;
    width: min(calc(100% - 36px), 620px);
    min-height: auto;
    padding: 32px 0 50px;
  }
  .hero-content { min-height: 310px; }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: clamp(38px, 8vw, 54px); }
  .hero-copy > p {
    margin-right: auto;
    margin-left: auto;
    max-width: 520px;
    font-size: 15px;
  }
  .feature-list { justify-content: center; }
  .inspiration-card { display: none; }
  .login-panel {
    min-height: 0;
    padding: 46px 36px 40px;
  }
  .register-copy { margin-top: 46px; }
}

@media (max-width: 560px) {
  .site-header { padding: 0 18px; }
  .brand strong { font-size: 18px; }
  .header-actions { gap: 10px; }
  .page-content { width: calc(100% - 24px); }
  .hero-content { min-height: 260px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-copy > p { font-size: 13px; }
  .feature-list { gap: 16px 22px; }
  .feature { gap: 8px; }
  .feature small { display: none; }
  .login-panel {
    padding: 38px 20px 32px;
    border-radius: 22px;
  }
  .panel-heading h2 { font-size: 30px; }
  .field-control { height: 58px; }
  .login-button span:last-child { right: 43px; }
  .toast { right: 16px; bottom: 16px; left: 16px; }
}

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