:root {
  color-scheme: dark;
  --page: #090909;
  --panel: #111;
  --panel-2: #181818;
  --line: rgba(219, 171, 72, 0.5);
  --gold: #d7a641;
  --gold-bright: #ffe08a;
  --text: #fff;
  --muted: #c9c1ad;
  --danger: #ff6868;
  --success: #52d989;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(226, 178, 72, 0.18), transparent 34rem),
    linear-gradient(180deg, #161616 0%, var(--page) 55%, #050505 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 28px 14px;
}

.register-panel {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.97);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
  padding: 18px;
}

.modal-header h1 {
  margin: 0;
  color: var(--gold-bright);
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  font-weight: 900;
}

.modal-header hr {
  height: 1px;
  margin: 14px 0 18px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.standard-sub-section {
  margin: 0 0 18px;
}

.standard-form-title {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.standard-form-content {
  display: grid;
  gap: 13px;
}

.form-group label,
.referral-code-header {
  display: block;
  margin: 0 0 7px;
  color: #f2f2f2;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.required-form-group > label::after {
  content: " *";
  color: var(--gold-bright);
}

.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(225, 187, 91, 0.42);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  outline: 0;
  padding: 0 12px;
  font-size: 15px;
  line-height: 44px;
}

.form-control:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(255, 224, 138, 0.15);
}

.lowercase {
  text-transform: lowercase;
}

.standard-required-message,
.terms-text {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.standard-password-field {
  position: relative;
}

.standard-password-field .form-control {
  padding-right: 78px;
}

.password-input-trigger {
  position: absolute;
  right: 7px;
  top: 28px;
  height: 30px;
  min-width: 58px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: #222;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.phone-input-group {
  position: relative;
}

.dialing-code-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
}

.contact-input {
  padding-left: 52px;
}

.referral-code-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
  padding: 4px 0 9px;
  cursor: pointer;
  text-align: left;
}

.referral-chevron {
  color: var(--gold-bright);
  font-size: 24px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.referral-code-header[aria-expanded="true"] .referral-chevron {
  transform: rotate(90deg);
}

.referral-code-content {
  padding-top: 12px;
}

.standard-button-group {
  margin-top: 18px;
}

.standard-secondary-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 234, 170, 0.95);
  border-radius: 5px;
  background: linear-gradient(180deg, #ffe08a 0%, #daa541 48%, #a96913 100%);
  color: #170d00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 8px 22px rgba(218, 165, 65, 0.25);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.standard-secondary-button[disabled] {
  cursor: wait;
  filter: grayscale(0.7);
  opacity: 0.7;
}

.form-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.form-alert-error {
  border: 1px solid rgba(255, 104, 104, 0.42);
  background: rgba(255, 104, 104, 0.12);
  color: #ffd5d5;
}

.form-alert-success {
  border: 1px solid rgba(82, 217, 137, 0.42);
  background: rgba(82, 217, 137, 0.12);
  color: #ddffe9;
}

.success-panel h2 {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 24px;
  line-height: 1.2;
}

.success-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.credential-card {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(219, 171, 72, 0.46);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.credential-card label {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.credential-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.credential-control input {
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(225, 187, 91, 0.7);
  border-radius: 4px;
  background: #050505;
  color: #fff;
  padding: 0 10px;
  font-size: 17px;
  font-weight: 900;
}

.credential-control button,
.continue-login-button {
  min-height: 42px;
  border: 1px solid rgba(225, 187, 91, 0.74);
  border-radius: 4px;
  background: #d6a33d;
  color: #170d00;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.continue-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  min-height: 50px;
  text-transform: uppercase;
}

@media (max-width: 430px) {
  .register-panel {
    padding: 15px;
  }

  .credential-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
