/* OVO · 登录 / 注册 —— 与首页同一套浅色液态毛玻璃 */
:root {
  --ink: #1a2030;
  --ink2: #465066;
  --dim: #7a8398;
  --a1: #7486ff;
  --a2: #ff8db8;
  --err: #e0496a;
  --ok: #1f9e74;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #dfe6ff, #fde3ef 50%, #e2f5f1);
  min-height: 100svh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }

/* 壁纸 */
#wp { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
#wp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; transform: scale(1.05); }
#wp img.on { opacity: 1; }
#veil { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(244, 246, 255, .24)), radial-gradient(70% 60% at 50% 50%, transparent, rgba(30, 36, 60, .12)); }

/* 液态玻璃 */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(140deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .28) 45%, rgba(255, 255, 255, .38));
  backdrop-filter: blur(24px) saturate(185%) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(185%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 24px rgba(255, 255, 255, .2), 0 30px 70px -28px rgba(28, 36, 72, .45), 0 2px 8px rgba(28, 36, 72, .06);
}
.refract .glass.liquid { backdrop-filter: url(#liquid) blur(18px) saturate(185%) brightness(1.04); }
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

.top { display: flex; justify-content: flex-end; padding: 16px clamp(16px, 4vw, 40px); }
.back {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; color: var(--ink2); transition: color .25s;
}
.back:hover { color: var(--ink); }

main { flex: 1; display: grid; place-items: center; padding: 10px 16px 50px; }

.panel {
  width: 100%; max-width: 420px; border-radius: 32px;
  padding: 34px clamp(22px, 5vw, 36px) 28px;
  animation: in .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.mark {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 18px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 6px rgba(255, 255, 255, .55), 0 14px 30px -10px rgba(116, 134, 255, .8);
  display: grid; place-items: center;
}
.mark svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1 { text-align: center; font: 700 26px/1.3 var(--serif); letter-spacing: .06em; }
.lead { text-align: center; color: var(--ink2); font-size: 13px; margin: 6px 0 22px; }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px;
  border-radius: 16px; background: rgba(255, 255, 255, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
}
.tabs button {
  all: unset; cursor: pointer; text-align: center; padding: 10px 0; border-radius: 12px;
  font-size: 14px; color: var(--ink2); transition: background .25s, color .25s, box-shadow .25s;
}
.tabs button[aria-selected="true"] {
  color: var(--ink); font-weight: 600; background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 16px -8px rgba(28, 36, 72, .4), inset 0 1px 0 #fff;
}
.tabs[hidden] { display: none; }

form { display: grid; gap: 14px; }
form[hidden] { display: none; }
label { display: grid; gap: 6px; font-size: 12px; color: var(--ink2); letter-spacing: .04em; font-weight: 500; }
.field { position: relative; display: flex; gap: 8px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; min-width: 0; padding: 13px 15px; border-radius: 14px;
  font: 15px/1.2 var(--sans); color: var(--ink);
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 2px rgba(28, 36, 72, .06);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus { background: rgba(255, 255, 255, .9); border-color: rgba(116, 134, 255, .65); box-shadow: 0 0 0 4px rgba(116, 134, 255, .16); }
input::placeholder { color: #9aa1b3; }
.eye { all: unset; cursor: pointer; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--dim); padding: 4px 6px; }
.eye:hover { color: var(--a1); }
.has-eye input { padding-right: 52px; }

.cap {
  flex: none; width: 112px; height: 46px; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: #fff; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px -6px rgba(28, 36, 72, .3);
}
.cap svg { width: 100%; height: 100%; display: block; }
.cap span { font-size: 11px; color: #666; }

.btn {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center;
  height: 50px; padding: 0 18px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font: 600 15px/1 var(--sans); letter-spacing: .16em; text-indent: .16em; color: #fff;
  background: linear-gradient(180deg, #2b3247 0%, #161b29 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 14px 30px -14px rgba(18, 22, 40, .75);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 4px rgba(116, 134, 255, .18), 0 18px 36px -14px rgba(18, 22, 40, .8); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.sec {
  flex: none; height: auto; padding: 0 16px; border-radius: 14px; font-size: 13px; letter-spacing: .04em; text-indent: 0; white-space: nowrap;
  color: var(--ink); background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px #fff, 0 4px 12px -6px rgba(28, 36, 72, .3);
}
.btn.sec:hover { background: #fff; box-shadow: inset 0 0 0 1px #fff, 0 0 0 4px rgba(255, 141, 184, .16), 0 6px 16px -6px rgba(28, 36, 72, .35); }

.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink2); letter-spacing: 0; font-weight: 400; cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--a1); }
.agree a { color: #4a58cf; text-decoration: underline; text-underline-offset: 3px; }
.agree[hidden] { display: none; }

.row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.link { all: unset; cursor: pointer; color: var(--ink2); font-size: 13px; }
.link:hover { color: var(--a1); }

.msg { min-height: 20px; font-size: 13px; text-align: center; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.maint { max-width: 420px; width: 100%; margin: 0 auto 14px; padding: 10px 14px; border-radius: 14px; font-size: 13px; color: #fff; background: rgba(26, 32, 48, .82); }
.maint[hidden] { display: none; }

/* 使用规范弹窗 */
dialog {
  margin: auto; width: min(640px, calc(100vw - 28px)); max-height: min(80vh, 760px);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 26px; padding: 0; color: var(--ink);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 40px 100px -30px rgba(28, 36, 72, .6);
}
dialog::backdrop { background: rgba(30, 36, 60, .28); backdrop-filter: blur(6px); }
.dlg { display: flex; flex-direction: column; max-height: min(80vh, 760px); }
.dlg header { padding: 18px 24px; border-bottom: 1px solid rgba(26, 32, 48, .08); font: 700 17px/1.3 var(--serif); letter-spacing: .04em; }
.dlg .body { padding: 18px 24px; overflow: auto; font-size: 14px; color: var(--ink2); }
.dlg .body h1, .dlg .body h2, .dlg .body h3 { font-family: var(--serif); color: var(--ink); margin: 18px 0 8px; font-size: 16px; text-align: left; letter-spacing: .02em; }
.dlg .body h1 { font-size: 19px; margin-top: 0; }
.dlg .body p { margin: 6px 0; }
.dlg .body ul { margin: 6px 0 6px 20px; }
.dlg .body li { margin: 3px 0; }
.dlg .body blockquote { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: rgba(116, 134, 255, .1); color: #3c47a8; }
.dlg .body hr { border: 0; border-top: 1px solid rgba(26, 32, 48, .08); margin: 14px 0; }
.dlg .body strong { color: var(--ink); }
.dlg footer { padding: 14px 24px 18px; border-top: 1px solid rgba(26, 32, 48, .08); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.dlg footer .hint { margin-right: auto; font-size: 12px; color: var(--dim); }
.dlg footer .btn { height: 42px; padding: 0 18px; }

.foot { text-align: center; font-size: 12px; color: var(--ink2); padding: 0 0 22px; text-shadow: 0 1px 2px rgba(255, 255, 255, .6); }

@media (max-width: 720px) { .refract .glass.liquid { backdrop-filter: blur(20px) saturate(180%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
