:root {
  color-scheme: dark;
  --bg: #041127;
  --surface: rgba(8, 29, 58, 0.88);
  --surface-strong: #0a2447;
  --line: rgba(109, 211, 255, 0.22);
  --primary: #19d3e6;
  --primary-strong: #00a9cc;
  --text: #f4fbff;
  --muted: #a8bfd2;
  --danger: #ff9292;
  --focus: #8be9ff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 183, 255, 0.2), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(0, 239, 196, 0.11), transparent 30%),
    linear-gradient(145deg, #020a18, var(--bg) 52%, #071d38);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(88, 185, 230, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 185, 230, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

button, input { font: inherit; }

button { touch-action: manipulation; }

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 100dvh;
}

.brand-panel,
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 96px);
}

.brand-panel { max-width: 880px; }

.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
  place-items: center;
  border: 1px solid rgba(102, 229, 255, 0.5);
  border-radius: 18px;
  background: rgba(8, 46, 77, 0.7);
  box-shadow: 0 0 38px rgba(25, 211, 230, 0.16);
}

.brand-mark svg { width: 38px; fill: var(--primary); }

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 1.12;
  letter-spacing: 0.025em;
}

.brand-copy {
  max-width: 620px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.feature-list { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-list span {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c9e8f4;
  background: rgba(6, 35, 65, 0.62);
  font-size: 14px;
}

.login-panel { align-items: center; }

.login-card {
  width: min(100%, 480px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

h2 { margin: 0; font-size: 30px; }
.card-help { margin: 12px 0 30px; color: var(--muted); line-height: 1.6; }
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 9px; color: #d8edf6; font-size: 14px; font-weight: 600; }

input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(135, 198, 224, 0.28);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: rgba(2, 16, 34, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder { color: #718ba1; }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(87, 220, 255, 0.14); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 10px; }

button {
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

button:active { transform: scale(0.985); }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: 0.58; }

.primary-button {
  width: 100%;
  border: 0;
  color: #001a23;
  background: linear-gradient(135deg, #6bf3f5, var(--primary));
  font-weight: 750;
}

.primary-button:hover { background: linear-gradient(135deg, #91fbfc, #35dfed); }
.secondary-button { border: 1px solid rgba(25, 211, 230, 0.48); color: #8cf6ff; background: rgba(8, 73, 93, 0.52); font-size: 14px; }
.field-error { min-height: 18px; margin: 6px 0 0; color: var(--danger); font-size: 13px; }
.form-status { min-height: 22px; margin: -2px 0 12px; color: #b9e8f2; font-size: 14px; }

.resume-box {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.resume-box p { margin: 0 0 12px; color: var(--muted); }
.resume-box button:not(.text-button) { padding: 0 18px; border: 1px solid var(--line); color: var(--text); background: var(--surface-strong); }
.text-button { margin-left: 10px; border: 0; color: var(--primary); background: transparent; }
.device-hint { margin: 24px 0 0; color: #7896aa; font-size: 13px; line-height: 1.6; text-align: center; }

@media (max-width: 860px) {
  .page-shell { display: block; }
  .brand-panel { min-height: auto; padding: 34px 24px 14px; text-align: center; align-items: center; }
  .brand-mark { width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px; }
  .brand-mark svg { width: 30px; }
  h1 { font-size: clamp(30px, 9vw, 45px); }
  .brand-copy { margin: 16px 0 18px; font-size: 15px; }
  .feature-list { justify-content: center; }
  .login-panel { padding: 20px 16px 40px; }
  .login-card { border-radius: 18px; }
}

@media (max-width: 420px) {
  .feature-list span:nth-child(2) { display: none; }
  .code-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .login-card { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
