.* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #14120e; color: #ece5d8; overflow: hidden;
}

/* ── 极光背景 ── */
.aurora { position: fixed; inset: 0; overflow: hidden; filter: blur(40px); opacity: .5; }
.aurora span { position: absolute; border-radius: 50%; }
.aurora span:nth-child(1) { width: 420px; height: 420px; left: -100px; top: -120px;
  background: radial-gradient(circle, #b98a3d, transparent 65%); animation: drift 14s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 460px; height: 460px; right: -100px; top: 12%;
  background: radial-gradient(circle, #8a6a2f, transparent 65%); animation: drift 18s ease-in-out infinite reverse; }
.aurora span:nth-child(3) { width: 360px; height: 360px; left: 28%; bottom: -150px;
  background: radial-gradient(circle, #d8b46a, transparent 60%); animation: drift 26s ease-in-out infinite; }
.aurora span:nth-child(4) { width: 300px; height: 300px; right: 22%; bottom: -80px;
  background: radial-gradient(circle, #6b543a, transparent 62%); animation: drift 16s ease-in-out infinite reverse; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.12); }
  66% { transform: translate(-50px, 36px) scale(.94); }
}

/* ── 星尘 ── */
.stars { position: fixed; inset: 0; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #d8b46a; opacity: .5; animation: tw 3s ease-in-out infinite; }
@keyframes tw { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }

/* ── 卡片 ── */
.wrap { position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card {
  width: 400px; padding: 40px 38px 30px; border-radius: 20px;
  background: rgba(28, 25, 19, .78); backdrop-filter: blur(22px);
  border: 1px solid rgba(216, 180, 106, .28);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(216, 180, 106, .18);
  animation: cardIn .7s cubic-bezier(.2, .9, .3, 1.2);
  position: relative; overflow: hidden;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(34px) scale(.96); } }
.glow { position: absolute; top: -70px; right: -70px; width: 190px; height: 190px;
  border-radius: 50%; background: radial-gradient(circle, rgba(216,180,106,.32), transparent 65%);
  pointer-events: none; }

.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.mark { width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(145deg, #d8b46a, #9a6f2f);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #1c1913;
  box-shadow: 0 10px 26px rgba(185, 138, 61, .45), inset 0 1px 0 rgba(255,255,255,.4); }
.bt h1 { font-size: 21px; letter-spacing: 2px; color: #f0e9d8; }
.bt p { font-size: 10.5px; letter-spacing: 3px; color: rgba(216, 180, 106, .7); margin-top: 5px; }

/* ── 输入 ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; color: rgba(236, 229, 216, .72);
  letter-spacing: 2px; margin-bottom: 8px; }
.in { position: relative; }
.in .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: rgba(216, 180, 106, .65); }
.in input {
  width: 100%; padding: 13px 14px 13px 40px; font-size: 14.5px; font-family: inherit;
  color: #f0e9d8; background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(216, 180, 106, .22); border-radius: 11px;
  outline: none; transition: all .25s;
}
.in input::placeholder { color: rgba(236, 229, 216, .32); }
.in input:focus {
  border-color: rgba(216, 180, 106, .75); background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 4px rgba(185, 138, 61, .18), 0 0 24px rgba(185, 138, 61, .14);
}

/* ── 滑块验证码 ── */
.captcha { margin-bottom: 22px; }
.cap-img { position: relative; width: 320px; height: 160px; margin: 0 auto 12px;
  border-radius: 10px; overflow: hidden; border: 1px solid rgba(216, 180, 106, .22); }
.cap-img img { display: block; }
#capBg { width: 320px; height: 160px; }
.cap-hole { position: absolute; left: 0; width: 44px; height: 44px; pointer-events: none; }
.cap-piece { position: absolute; left: 0; width: 44px; height: 44px;
  cursor: grab; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); border-radius: 4px; }
.cap-piece:active { cursor: grabbing; }
.cap-slider { position: relative; width: 320px; height: 44px; margin: 0 auto;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(216, 180, 106, .25);
  border-radius: 22px; overflow: hidden; }
.cap-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(185, 138, 61, .45), rgba(216, 180, 106, .3)); }
.cap-tip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: rgba(236, 229, 216, .55); letter-spacing: 2px;
  transition: color .2s; user-select: none; }
.cap-tip.ok { color: #8fd19e; }
.cap-handle { position: absolute; left: 0; top: 0; width: 60px; height: 42px;
  background: linear-gradient(145deg, #d8b46a, #9a6f2f); border-radius: 20px;
  display: flex; align-items: center; justify-content: center; cursor: grab;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4); touch-action: none; }
.cap-handle svg { width: 20px; height: 20px; fill: none; stroke: #1c1913;
  stroke-width: 2.4; stroke-linecap: round; }
.cap-handle:active { cursor: grabbing; }
.cap-handle.ok { background: linear-gradient(145deg, #8fd19e, #4f9e68); }

/* ── 提交 ── */
.submit {
  width: 100%; padding: 14px; font-size: 15.5px; letter-spacing: 8px; font-family: inherit;
  color: #1c1913; font-weight: 700; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #d8b46a, #b98a3d 55%, #9a6f2f);
  box-shadow: 0 12px 30px rgba(185, 138, 61, .4);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.submit:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(185, 138, 61, .5);
  filter: brightness(1.06); }
.submit:active { transform: translateY(0); }
.submit.loading { pointer-events: none; filter: grayscale(.4); opacity: .7; }

.err { min-height: 20px; margin-top: 12px; text-align: center;
  font-size: 12.5px; color: #e08a7a; }
.err.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)}
  50%{transform:translateX(6px)} 75%{transform:translateX(-4px)} }

.foot { text-align: center; margin-top: 22px; font-size: 11px;
  color: rgba(236, 229, 216, .3); letter-spacing: 1px; }

@media (max-width: 460px) {
  .card { width: 92%; padding: 30px 24px; }
  .cap-img, .cap-slider { width: 100%; }
}

/* 小屏手机（≤400px）：验证码底图是固定 320px 的位图 + 固定像素的滑块，
 *  不能缩放（会破坏拖拽对位），所以改为把卡片留白压到最小、让 320px 放得下。 */
@media (max-width: 400px) {
  .card { width: 96%; padding: 24px 12px 20px; border-radius: 16px; }
  .brand { gap: 12px; margin-bottom: 22px; }
  .mark { width: 46px; height: 46px; font-size: 22px; }
  .bt h1 { font-size: 18px; letter-spacing: 1px; }
  .bt p { font-size: 9.5px; letter-spacing: 2px; }
  .submit { letter-spacing: 5px; }
}
