/* 趣味星球 · 登录/注册页通用样式 */
:root {
  --ink: #15233d;
  --muted: #687690;
  --line: #dce8f4;
  --accent: #5bce74;
  --accent-deep: #2aaa56;
  --blue: #1689ef;
  --blue-dark: #1268c4;
  --orange: #ff982e;
  --orange-deep: #f36b12;
  --shadow: 0 14px 40px rgba(32, 72, 118, 0.12);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.12) 100%),
    url("../brand/fun-planet/backgrounds/auth-pc.webp") center / cover no-repeat fixed,
    #bfe3ff;
}

.auth-wrap {
  width: min(480px, calc(100vw - 36px));
  transform-origin: center center;
}

.auth-wrap.scroll-mode {
  padding-bottom: 40px;
}

button, input, a { font: inherit; }
a { color: var(--blue-dark); }

.auth-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  box-shadow: 0 20px 65px rgba(19, 71, 116, .2);
  backdrop-filter: blur(12px);
  padding: 34px 38px 30px;
}

.auth-logo {
  display: block;
  width: 245px;
  margin: 0 auto 10px;
}

.auth-title {
  margin: 4px 0 2px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.auth-sub {
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.return-target {
  margin: -10px 0 20px;
  padding: 10px 13px;
  color: #315b86;
  background: #eef7ff;
  border: 1px solid #d4eaff;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.return-target strong { color: var(--blue-dark); }

.field { margin-bottom: 16px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 800;
}

.field-label .step-no {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.field-input {
  position: relative;
}

.field-input input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fbfdff;
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field-input input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 125, 225, 0.12);
}

.field-input input.is-error {
  border-color: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.1);
}

.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #93a3bb;
  font-size: 17px;
  cursor: pointer;
}

.field-hint {
  margin: 7px 2px 0;
  color: #8fa0b8;
  font-size: 12.5px;
  line-height: 1.5;
}

.field-error {
  margin: 7px 2px 0;
  color: #d92d20;
  font-size: 12.5px;
  font-weight: 700;
  min-height: 0;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}

.code-btn {
  height: 50px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  color: var(--blue-dark);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.code-btn:disabled {
  color: #9aa8bd;
  border-color: #d6e0ec;
  background: #f4f7fb;
  cursor: not-allowed;
}

.protocol {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.protocol input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 105, 28, 0.25);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.submit-btn:hover { transform: translateY(-2px); }
.submit-btn:disabled {
  background: #c9d4e2;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
}

.auth-links.center { justify-content: center; }

.auth-note {
  margin-top: 22px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #4c6he0;
  background: #f0f6ff;
  border: 1px solid #dbe9ff;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-note b { color: var(--blue-dark); }

.demo-badge {
  margin: 18px auto 0;
  width: fit-content;
  padding: 6px 14px;
  color: #805b00;
  background: #fff2bb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 20px;
  color: #fff;
  background: rgba(21, 35, 61, 0.92);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast .code {
  color: #ffd86b;
  font-size: 18px;
  letter-spacing: 0.15em;
}

/* 注册前必读 */
.guide-section {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px dashed #e2ebf4;
}

.guide-section:last-of-type { border-bottom: 0; }

.guide-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 21px;
  background: #fff3e6;
}

.guide-icon.g2 { background: #e8f9ef; }
.guide-icon.g3 { background: #e9f1ff; }
.guide-icon.g4 { background: #f3ecff; }

.guide-section h2 {
  margin: 2px 0 6px;
  font-size: 16px;
}

.guide-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.guide-warn {
  margin: 16px 0 20px;
  padding: 12px 14px;
  color: #805b00;
  background: #fff8e1;
  border: 1px solid #ffe9a8;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.guide-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.order-help-link {
  flex: 0 0 auto;
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.order-help-link:hover {
  text-decoration: underline;
}

/* 订单编号查看教程页 */
.help-steps {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}

.help-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fbfdff;
}

.help-step figcaption {
  padding: 10px 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  background: #fff;
  border-bottom: 1px solid #eef3f9;
}

.help-step img {
  display: block;
  width: 100%;
  height: auto;
}

.help-step .img-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #93a3bb;
  font-size: 13.5px;
  background: repeating-linear-gradient(45deg, #f4f8fc, #f4f8fc 12px, #eef4fa 12px, #eef4fa 24px);
}

@media (max-width: 520px) {
  .auth-card { padding: 28px 22px 24px; }
  .auth-logo { width: 210px; }
}

@media (max-width: 720px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(20, 100, 182, .12) 0%, rgba(255,255,255,.18) 100%),
      url("../brand/fun-planet/backgrounds/auth-mobile.webp");
    background-position: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
