:root {
  color-scheme: light;
  --bg: #101725;
  --panel: #ffffff;
  --panel-soft: #f5f8fc;
  --text: #162033;
  --muted: #677386;
  --line: #dbe4ef;
  --blue: #2357d8;
  --blue-dark: #183fa6;
  --green: #15805f;
  --red: #c43b4a;
  --gold: #a76614;
  --shadow: 0 24px 70px rgba(10, 18, 32, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 18%, rgba(59, 130, 246, 0.26), transparent 32%),
    linear-gradient(140deg, #0b1220 0%, #172235 50%, #0f172a 100%);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 18px;
  align-items: stretch;
}

.hero-panel,
.form-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  min-height: 680px;
  padding: 30px;
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(35, 87, 216, 0.28), rgba(15, 23, 42, 0.9)),
    url("data:image/svg+xml,%3Csvg width='720' height='720' viewBox='0 0 720 720' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.12'%3E%3Ccircle cx='360' cy='360' r='80'/%3E%3Ccircle cx='360' cy='360' r='150'/%3E%3Ccircle cx='360' cy='360' r='240'/%3E%3Cpath d='M82 358h556M360 82v556M162 162l396 396M558 162 162 558'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #2e72ff;
  font-size: 22px;
  font-weight: 900;
}

.brand-row strong,
.brand-row span {
  display: block;
}

.brand-row span {
  margin-top: 4px;
  color: #b9c6da;
  font-size: 13px;
}

.hero-copy {
  margin-top: auto;
  padding-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #70a5ff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 520px;
  margin: 0 0 16px;
  font-size: 38px;
  line-height: 1.16;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: #d4ddec;
  line-height: 1.8;
}

.status-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #35d39b;
  box-shadow: 0 0 0 5px rgba(53, 211, 155, 0.14);
}

.status-card strong,
.status-card p {
  display: block;
  margin: 0;
}

.status-card p {
  margin-top: 4px;
  color: #cbd7ea;
}

.form-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
}

.form-header {
  margin-bottom: 20px;
}

.form-header h2 {
  margin: 0;
  font-size: 28px;
}

.form-card {
  display: grid;
  gap: 16px;
}

.register-card {
  position: relative;
  padding-top: 4px;
}

.register-card.is-locked::after {
  content: "请先验证卡密";
  position: absolute;
  inset: 48px 0 0;
  display: grid;
  place-items: center;
  border: 1px dashed #c9d6e6;
  border-radius: 8px;
  background: rgba(246, 248, 251, 0.78);
  color: #526174;
  font-weight: 800;
  pointer-events: none;
}

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

.verified-card-row {
  opacity: 0.76;
}

label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(35, 87, 216, 0.14);
}

input:disabled,
select:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.inline-control {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 10px;
}

.primary-button,
.danger-button,
.ghost-button,
.mini-button,
.tutorial-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.danger-button {
  background: #fff1f3;
  color: var(--red);
  border: 1px solid #f2c1c9;
}

.ghost-button,
.mini-button,
.tutorial-actions button {
  background: var(--panel-soft);
  color: #334155;
  border: 1px solid var(--line);
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  background: #eaf3ff;
  color: var(--blue-dark);
  line-height: 1.6;
}

.notice.error {
  background: #fff1f3;
  color: var(--red);
}

.notice.success {
  background: #e7f7ef;
  color: var(--green);
}

.button-grid {
  display: grid;
  gap: 10px;
}

.info-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.loading-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 42px 18px;
  text-align: center;
}

.loading-box h3,
.loading-box p {
  margin: 0;
}

.loading-box p {
  color: var(--muted);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbe4ef;
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 30;
  min-width: 220px;
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.modal-card {
  width: min(560px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.btn-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  text-align: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.info-card p {
  margin: 0 0 8px;
  color: #334155;
  line-height: 1.7;
}

.info-card p:last-child {
  margin-bottom: 0;
}

#mailTarget {
  color: var(--blue);
  font-weight: 800;
}

.tutorial-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 26px;
  color: #aebbd0;
  text-align: center;
  font-size: 13px;
}

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

  .hero-panel {
    min-height: 380px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }
}
