:root {
  color-scheme: dark;
  --background: #0b0c0d;
  --surface: #141618;
  --text: #f2f2ee;
  --muted: #969a9f;
  --line: rgba(242, 242, 238, 0.16);
  --accent: #d98a5f;
  --accent-strong: #eba579;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
}

.world-image {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 22%, rgba(217, 138, 95, 0.24), transparent 36%),
    linear-gradient(145deg, #202327, #0f1113 58%, #181413);
  background-image:
    linear-gradient(180deg, rgba(11, 12, 13, 0.04), rgba(11, 12, 13, 0.76)),
    url("/assets/login-world.jpg");
  background-position: center;
  background-size: cover;
}

.world-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 12, 13, 0.04) 32%, rgba(11, 12, 13, 0.88) 100%);
}

.world-title {
  position: absolute;
  left: clamp(24px, 6vw, 84px);
  right: clamp(24px, 6vw, 84px);
  bottom: clamp(36px, 8vh, 92px);
  z-index: 1;
}

.world-title p {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 720;
}

.world-title h1 {
  max-width: 8ch;
  margin: 0;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.login-panel {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px clamp(24px, 5vw, 72px);
  border-left: 1px solid var(--line);
  background: var(--background);
}

.login-card { width: min(100%, 430px); }

.login-card h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 46px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.login-card > p {
  margin: 12px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

form { display: grid; }

label {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 680;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  background: var(--surface);
  color: var(--text);
  caret-color: var(--accent-strong);
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
}

.login-error {
  min-height: 26px;
  margin: 12px 0 8px;
  color: #f0a78f;
  font-size: 14px;
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #17100c;
  font-weight: 780;
  cursor: pointer;
}

button:active { transform: scale(0.98); }
button:disabled { cursor: wait; opacity: 0.7; }

@media (max-width: 767px) {
  .login-shell { grid-template-columns: 1fr; }
  .world-image { min-height: 48dvh; }
  .world-title { bottom: 28px; }
  .world-title h1 { max-width: 9ch; font-size: clamp(42px, 13vw, 62px); }
  .login-panel {
    min-height: auto;
    place-items: start stretch;
    padding: 30px 20px calc(36px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .world-title,
  .login-card { animation: enter 560ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .login-card { animation-delay: 90ms; }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
