/* register page (refactor) */
:root{
  --bg: #ffd6dd;
  --card: #ffffff;
  --text: #222;
  --muted: #666;
  --line: rgba(0,0,0,.08);
  --primary: #ff3b5c;
  --primary-pressed: #f02b4f;
  --danger: #ff0101;
  --shadow: 0 18px 40px rgba(0,0,0,.12);
  --radius: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
}

/* 确保 hidden 属性在我们的自定义 display 样式下仍然生效 */
[hidden]{
  display: none !important;
}

.page{
  min-height:100%;
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 24px 14px 40px;
}

.bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(255,59,92,.38) 0%, rgba(255,59,92,0) 58%),
    radial-gradient(900px 420px at 20% 10%, rgba(255,122,143,.42) 0%, rgba(255,122,143,0) 62%),
    linear-gradient(180deg, #fff0f3 0%, #ffd2db 48%, #ffbcc9 100%);
  opacity: 1;
  pointer-events:none;
}

.card{
  width:min(520px, 100%);
  position:relative;
  margin-top: 26vh;
  background:var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  border: 1px solid rgba(0,0,0,.06);
}

.title{
  margin: 4px 0 14px;
  text-align:center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
}

.form{ display:flex; flex-direction:column; gap: 12px; }

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.field-row{ flex-direction:row; align-items:flex-end; gap:10px; }
.grow{ flex: 1 1 auto; }

.label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

input{
  width:100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 15px;
  outline:none;
  background:#f7f7f7;
}
input:focus{
  border-color: rgba(248,128,38,.65);
  box-shadow: 0 0 0 3px rgba(248,128,38,.15);
  background:#fff;
}

button{
  height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor:pointer;
  font-size: 15px;
  font-weight: 700;
}
button:disabled{
  opacity: .6;
  cursor:not-allowed;
}

.primary{
  background: var(--primary);
  color:#fff;
}
.primary:active{ background: var(--primary-pressed); }

.secondary{
  background:#fff;
  color: var(--primary);
  border-color: rgba(248,128,38,.6);
}

.ghost{
  background:#fff;
  color: var(--danger);
  border-color: rgba(255,1,1,.35);
  padding: 0 12px;
  white-space: nowrap;
}

.captcha{
  width: 132px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background:#fff;
  overflow:hidden;
}
.captcha img{
  width:100%;
  height:100%;
  display:block;
  object-fit: contain;
}

.hint{
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align:center;
}

.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  background: rgba(0,0,0,.82);
  color:#fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  max-width: min(520px, calc(100vw - 24px));
  z-index: 50;
}

.loading{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 60;
}
.loading-box{
  background:#fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

@media (max-width: 380px){
  .card{ margin-top: 22vh; }
  .captcha{ width: 118px; }
}


