:root {
  --ink: #1e2329;
  --muted: #66707f;
  --paper: #fffaf0;
  --surface: #ffffff;
  --blue: #2168df;
  --blue-dark: #144ca8;
  --red: #f24736;
  --line: rgba(30, 35, 41, 0.12);
  --shadow: 0 24px 70px rgba(20, 50, 92, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(33, 104, 223, 0.14), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(242, 71, 54, 0.12), transparent 24%),
    linear-gradient(135deg, #f7fbff 0%, #fffaf0 48%, #fff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 38px 0;
}

.login-entry {
  position: absolute;
  top: 28px;
  right: 0;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(33, 104, 223, 0.18);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(20, 50, 92, 0.08);
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.login-entry:hover,
.login-entry:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(33, 104, 223, 0.42);
  box-shadow: 0 14px 30px rgba(33, 104, 223, 0.14);
  outline: none;
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: center;
}

.brand-panel,
.download-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-panel {
  min-height: 640px;
  padding: 38px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.logo {
  width: min(100%, 420px);
  aspect-ratio: 1;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 18px 26px rgba(26, 33, 43, 0.16));
}

.brand-copy {
  display: grid;
  gap: 14px;
}

.eyebrow,
.section-kicker,
.note {
  margin: 0;
}

.eyebrow,
.section-kicker {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
.subtitle {
  margin: 0;
}

h1 {
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.95;
  font-weight: 900;
}

.subtitle {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.download-panel {
  padding: 42px;
  border-radius: 28px;
  display: grid;
  gap: 28px;
}

.panel-heading {
  display: grid;
  gap: 10px;
}

h2 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 900;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.download-card {
  min-height: 116px;
  border: 2px solid rgba(33, 104, 223, 0.18);
  border-radius: 20px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.download-card:hover,
.download-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(33, 104, 223, 0.45);
  box-shadow: 0 16px 34px rgba(33, 104, 223, 0.16);
  outline: none;
}

.download-card.primary {
  color: #fff;
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 18px 38px rgba(33, 104, 223, 0.28);
}

.download-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.download-card.is-disabled:hover,
.download-card.is-disabled:focus-visible {
  transform: none;
  border-color: rgba(33, 104, 223, 0.18);
  box-shadow: none;
}

.platform-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(33, 104, 223, 0.1);
}

.primary .platform-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.platform-icon svg {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.download-card span:last-child {
  display: grid;
  gap: 7px;
}

.download-card strong {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.1;
}

.download-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.primary small {
  color: rgba(255, 255, 255, 0.82);
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.release-meta span {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(33, 104, 223, 0.16);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  background: rgba(33, 104, 223, 0.07);
}

.note {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 620px);
    padding: 24px 0;
  }

  .login-entry {
    position: static;
    justify-self: end;
    margin-bottom: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .brand-panel {
    min-height: auto;
    padding: 26px;
    border-radius: 26px;
  }

  .logo {
    width: min(100%, 310px);
  }

  .download-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .download-card {
    min-height: 104px;
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .page-shell {
    width: min(100% - 18px, 390px);
  }

  .brand-panel,
  .download-panel {
    padding: 20px;
  }

  .download-card {
    gap: 14px;
  }

  .platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.auth-body {
  background:
    linear-gradient(90deg, rgba(33, 104, 223, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(33, 104, 223, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, rgba(33, 104, 223, 0.18), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(242, 71, 54, 0.12), transparent 24%),
    #f8fbff;
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
}

.auth-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 480px);
  gap: 34px;
  align-items: center;
}

.auth-hero {
  min-height: 640px;
  padding: 34px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 240, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--blue);
  outline: none;
}

.back-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.auth-brand {
  display: grid;
  gap: 26px;
}

.auth-logo {
  width: min(100%, 310px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(26, 33, 43, 0.16));
}

.auth-card {
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(33, 104, 223, 0.08);
}

.auth-tab {
  min-height: 46px;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.auth-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 50, 92, 0.1);
}

.auth-tab:focus-visible,
.google-button:focus-visible,
.submit-button:focus-visible,
.code-button:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgba(33, 104, 223, 0.26);
  outline-offset: 3px;
}

.auth-heading {
  display: grid;
  gap: 8px;
}

.auth-card h2 {
  font-size: clamp(30px, 4vw, 42px);
}

.google-button,
.submit-button,
.code-button {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.google-button {
  min-height: 56px;
  border: 1px solid rgba(30, 35, 41, 0.14);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.google-button:hover,
.submit-button:hover,
.code-button:hover {
  transform: translateY(-2px);
}

.google-button svg {
  width: 22px;
  height: 22px;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-form {
  display: none;
  gap: 16px;
}

.auth-form.active {
  display: grid;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(30, 35, 41, 0.14);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(33, 104, 223, 0.12);
}

.field input::placeholder {
  color: #a0a8b3;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}

.code-button {
  min-height: 54px;
  border-radius: 16px;
  color: var(--blue);
  background: rgba(33, 104, 223, 0.1);
  font-size: 14px;
  font-weight: 900;
}

.code-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.auth-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.submit-button {
  min-height: 58px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 16px 32px rgba(33, 104, 223, 0.22);
  font-size: 17px;
  font-weight: 900;
}

.auth-status {
  min-height: 22px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.55;
}

.auth-status.success {
  color: #16803d;
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

@media (max-width: 900px) {
  .auth-shell {
    width: min(100% - 24px, 620px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0;
  }

  .auth-hero {
    min-height: auto;
    padding: 24px;
    gap: 28px;
    border-radius: 26px;
  }

  .auth-logo {
    width: min(100%, 210px);
  }
}

@media (max-width: 460px) {
  .auth-shell {
    width: min(100% - 18px, 390px);
  }

  .auth-card,
  .auth-hero {
    padding: 20px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-row {
    grid-template-columns: 1fr;
  }
}
