:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: rgba(10, 22, 32, 0.94);
  --panel-strong: rgba(8, 18, 28, 0.98);
  --line: rgba(222, 190, 117, 0.42);
  --line-soft: rgba(137, 164, 188, 0.22);
  --gold: #e4bd69;
  --gold-strong: #f2cd7c;
  --text: #f6f0e4;
  --muted: #9caebd;
  --good: #4fd08e;
  --bad: #ff6a6a;
  --field: rgba(2, 9, 16, 0.74);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(6, 13, 20, 0.82), rgba(6, 13, 20, 0.9)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
    linear-gradient(135deg, #102233, #060b12 54%, #1c1820);
}

button,
input {
  font: inherit;
}

.register-shell {
  width: min(1040px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 32px 0;
}

.brand-panel,
.form-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.brand-panel {
  min-height: 530px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(228, 189, 105, 0.16), transparent 44%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.brand-panel > * {
  position: relative;
}

.brand-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #221300;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffdf85, #b97822);
  box-shadow: 0 12px 34px rgba(216, 166, 64, 0.22);
}

.eyebrow {
  margin: 24px 0 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 42px;
  line-height: 1.12;
}

.brand-copy {
  max-width: 360px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.invite-card {
  width: min(320px, 100%);
  margin-top: 42px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.invite-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.invite-card strong {
  display: block;
  margin-top: 7px;
  color: var(--gold-strong);
  font-size: 24px;
  word-break: break-all;
}

.form-panel {
  padding: 32px;
  background: var(--panel-strong);
}

.panel-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head .eyebrow {
  margin-top: 0;
}

h2 {
  margin-top: 6px;
  font-size: 28px;
}

.register-form {
  margin-top: 24px;
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--field);
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228, 189, 105, 0.12);
}

button,
.result-panel a {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #271700;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe090, #c17c22);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.46), 0 14px 28px rgba(190, 124, 34, 0.22);
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.35);
  opacity: 0.74;
}

.result-panel {
  margin-top: 18px;
  padding: 18px;
  border-color: rgba(79, 208, 142, 0.44);
}

.result-panel strong {
  color: var(--good);
  font-size: 20px;
}

.result-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.result-panel a {
  margin-top: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  max-width: min(520px, calc(100% - 28px));
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 18, 28, 0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .register-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand-panel {
    min-height: auto;
  }

  h1 {
    font-size: 34px;
  }
}
