/* 雪夜小测 —— 冬日主题空壳 */
:root {
  --ink: #eaf2f8;
  --ink-dim: rgba(234, 242, 248, .62);
  --ink-faint: rgba(234, 242, 248, .36);
  --ice: #7fc4dc;
  --aurora: #5fe3c0;
  --violet: #9b7bd4;
  --radius: 20px;
  --stagger: cubic-bezier(.2, .8, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #07141f 0%, #0b1b2b 38%, #12314f 72%, #1b4468 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 背景 ---------- */
.scene {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora {
  position: absolute;
  inset: -18% -12% auto -12%;
  height: 72%;
  background:
    radial-gradient(45% 55% at 20% 42%, rgba(95, 227, 192, .28), transparent 70%),
    radial-gradient(50% 60% at 72% 30%, rgba(155, 123, 212, .30), transparent 72%),
    radial-gradient(42% 52% at 48% 8%, rgba(127, 196, 220, .22), transparent 70%);
  filter: blur(38px);
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, -2%, 0) scale(1.08); }
}

.moon {
  position: absolute;
  top: 7%;
  right: 13%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #ffffff, #cfe4f0 58%, rgba(207, 228, 240, 0) 72%);
  box-shadow: 0 0 70px 22px rgba(207, 228, 240, .16);
  opacity: .9;
}

.stars i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: .7;
  animation: twinkle var(--tw) ease-in-out var(--td) infinite alternate;
}

@keyframes twinkle {
  from { opacity: .12; }
  to   { opacity: .85; }
}

.snow i {
  position: absolute;
  top: -10vh;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  opacity: var(--op);
  animation: fall var(--dur) linear var(--delay) infinite;
  will-change: transform;
}

@keyframes fall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(var(--drift), 118vh, 0); }
}

/* ---------- 雪坡 ---------- */
.hill {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 36vh;
  min-height: 200px;
  z-index: 1;
  pointer-events: none;
}

.hill-back { fill: #234a68; opacity: .85; }
.hill-front { fill: #dcebf5; }

/* ---------- 舞台 ---------- */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 20px calc(36vh + 16px);
}

/* ---------- 卡片 ---------- */
.card {
  width: 100%;
  max-width: 400px;
  padding: 30px 24px 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    0 28px 64px -24px rgba(0, 0, 0, .7),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  animation: rise .55s var(--stagger) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: .42em;
  color: var(--ice);
  opacity: .85;
}

h1 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .01em;
}

.sub {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-dim);
}

.hint {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ---------- 输入 ---------- */
input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px; /* 16px 以下 iOS 会自动放大页面 */
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder { color: var(--ink-faint); }

input:focus {
  border-color: var(--ice);
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 3px rgba(127, 196, 220, .16);
}

/* ---------- 按钮 ---------- */
.btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #06202e;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #7fc4dc, #5fe3c0);
  box-shadow: 0 12px 28px -14px rgba(95, 227, 192, .9);
}

.btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 5px 16px -12px rgba(95, 227, 192, .9);
}

.btn.ghost {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ink);
  margin-top: 0;
}

.btn.ghost:active { transform: translateY(2px); }

.actions {
  display: grid;
  gap: 12px;
}

.actions .btn { margin-top: 0; }

.link {
  margin: 0;
  padding: 4px 2px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-faint);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:active { color: var(--ice); }

.footer-links {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 9;
  max-width: min(84vw, 360px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(10, 26, 40, .86);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

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

.hidden { display: none !important; }

/* ---------- 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-height: 560px) {
  .stage { padding-bottom: 180px; }
  .hill { height: 180px; }
  .card { padding: 22px 20px 18px; }
  h1 { font-size: 21px; }
}