:root {
  --bg-1: #07111f;
  --bg-2: #101b34;
  --panel: rgba(11, 19, 35, 0.78);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-main: #f7f9ff;
  --text-soft: #9fb0d4;
  --text-dim: #7f90b3;
  --line: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.06);
  --primary-1: #4f7cff;
  --primary-2: #745bff;
  --danger: #ffb5b5;
  --success: #82f5b8;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.page-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 14% 18%, rgba(105, 123, 255, 0.22), transparent 24%),
    radial-gradient(circle at 50% 55%, rgba(88, 106, 255, 0.12), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(68, 204, 255, 0.15), transparent 24%),
    radial-gradient(circle at 74% 78%, rgba(116, 91, 255, 0.12), transparent 26%),
    linear-gradient(145deg, #08111f 0%, #111d36 54%, #0b1426 100%);
}

.page-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 60%);
  pointer-events: none;
}

.hero-side {
  position: relative;
  padding: 64px 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-side::before,
.hero-side::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-side::before {
  width: 220px;
  height: 220px;
  top: 72px;
  right: -60px;
  background: linear-gradient(135deg, rgba(116, 91, 255, 0.5), rgba(79, 124, 255, 0.08));
}

.hero-side::after {
  width: 260px;
  height: 260px;
  left: -90px;
  bottom: 30px;
  background: linear-gradient(135deg, rgba(58, 220, 214, 0.2), rgba(79, 124, 255, 0.08));
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 72px;
  height: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 100%;
  height: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-tag {
  color: var(--text-dim);
  font-size: 13px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-top: 40px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-soft);
  max-width: 520px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
  max-width: 640px;
}

.hero-grid.is-mobile-below-form {
  width: 100%;
  max-width: 430px;
  margin-top: 18px;
}

.hero-card {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.hero-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.hero-card span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.login-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 50%, rgba(92, 112, 255, 0.1), transparent 28%),
    linear-gradient(90deg, rgba(7, 14, 28, 0), rgba(7, 14, 28, 0.18) 32%, rgba(7, 14, 28, 0.08) 100%);
  pointer-events: none;
}

.entry-card {
  width: 100%;
  max-width: 430px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.8;
}

.entry-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(130, 245, 184, 0.14);
  background: rgba(130, 245, 184, 0.08);
  color: var(--success);
  font-size: 12px;
  margin-bottom: 18px;
}

.entry-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.entry-desc {
  margin: 0 0 24px;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 15px;
}

.field {
  margin-bottom: 16px;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.field-label {
  color: #dde5fa;
  font-size: 14px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--input);
  color: #fff;
  font-size: 15px;
  outline: none;
  padding: 0 16px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.field-input::placeholder {
  color: #93a4c9;
}

.field-input:focus {
  border-color: rgba(128, 145, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(99, 126, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.password-input {
  padding-right: 74px;
}

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #a4b4d7;
  min-width: 48px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1;
}

.toggle-visibility:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-submit,
.btn-secondary {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease, background .14s ease;
}

.btn-submit {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  box-shadow: 0 18px 34px rgba(88, 107, 255, 0.28);
}

.btn-submit:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-submit:hover {
  box-shadow: 0 20px 36px rgba(88, 107, 255, 0.32);
}

.btn-secondary {
  color: #dbe6ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-submit:disabled,
.btn-secondary:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.entry-links {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  flex-wrap: wrap;
}

.entry-links a {
  color: #bdd0ff;
  text-decoration: none;
  transition: color .14s ease;
}

.entry-links a:hover {
  color: #fff;
}

.entry-error {
  min-height: 24px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
}

.entry-error.is-success {
  color: var(--success);
}

.entry-footnote {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-side {
    padding: 40px 24px 14px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .login-side {
    padding: 24px 20px 34px;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .entry-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .entry-title {
    font-size: 28px;
  }
}

@media (min-width: 1081px) {
  .page-shell::before {
    background:
      radial-gradient(circle at 16% 22%, rgba(105, 123, 255, 0.18), transparent 24%),
      radial-gradient(circle at 84% 16%, rgba(68, 204, 255, 0.12), transparent 22%),
      radial-gradient(circle at 72% 76%, rgba(116, 91, 255, 0.10), transparent 24%),
      linear-gradient(145deg, #08111f 0%, #101a31 52%, #0b1426 100%);
  }

  .page-shell::after {
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.025), transparent 58%),
      linear-gradient(120deg, rgba(255, 255, 255, 0.015), transparent 36%, transparent 64%, rgba(255, 255, 255, 0.015));
  }

  .hero-side::before,
  .hero-side::after,
  .login-side::before {
    content: none;
  }
}
