/* 制药工程新生研讨课 · 登录页 */
:root {
  --bg: #050914;
  --ink: #eaf2ff;
  --muted: #8ea0bf;
  --line: rgba(140, 170, 230, .18);
  --cyan: #3fe0ff;
  --violet: #8f7bff;
  --pink: #ff7ac8;
  --mint: #5cffc4;
  --danger: #ff6b8a;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.sm-login {
  background: radial-gradient(1200px 700px at 30% 40%, #0b1636 0%, var(--bg) 60%) var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#sm-scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  display: block; z-index: 0;
  opacity: 0; transition: opacity 1.2s ease;
}
.sm-scene-ready #sm-scene { opacity: 1; }
.sm-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 9, 20, .82) 0%, rgba(5, 9, 20, .35) 34%, rgba(5, 9, 20, 0) 52%, rgba(5, 9, 20, .25) 75%, rgba(5, 9, 20, .6) 100%),
    radial-gradient(ellipse at 50% 120%, rgba(5, 9, 20, .9), transparent 60%);
}
.sm-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 50%, transparent 30%, #000 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 30%, #000 85%);
}

/* 顶栏 */
.sm-top, .sm-stage, .sm-foot { position: relative; z-index: 2; }
.sm-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(16px, 4vw, 56px);
  animation: sm-rise .9s .1s cubic-bezier(.2, .7, .2, 1) backwards;
}
.sm-brand { display: flex; align-items: center; gap: 12px; }
.sm-brand b { display: block; font-size: 16px; letter-spacing: .04em; }
.sm-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.sm-logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, rgba(63, 224, 255, .25), rgba(143, 123, 255, .3));
  border: 1px solid rgba(143, 200, 255, .35);
  box-shadow: 0 0 24px rgba(63, 224, 255, .25), inset 0 0 12px rgba(255, 255, 255, .08);
}
.sm-status {
  font-size: 12px; color: var(--muted); padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10, 18, 40, .45); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.sm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: sm-blink 2.4s infinite; }

/* 主体 */
.sm-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 420px);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: 12px clamp(16px, 5vw, 80px) 24px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
.sm-hero { max-width: 560px; }
.sm-eyebrow {
  font-size: 12px; letter-spacing: .22em; color: var(--cyan); margin: 0 0 18px;
  animation: sm-rise .9s .2s cubic-bezier(.2, .7, .2, 1) backwards;
}
.sm-hero h1 {
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.15; margin: 0 0 20px; font-weight: 800; letter-spacing: .01em;
}
.sm-h1-line { display: block; animation: sm-rise 1s cubic-bezier(.2, .7, .2, 1) backwards; }
.sm-h1-line:nth-child(1) { animation-delay: .3s; }
.sm-h1-line:nth-child(2) { animation-delay: .42s; }
.sm-grad {
  background: linear-gradient(90deg, var(--cyan), var(--violet) 45%, var(--pink) 70%, var(--cyan));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sm-rise 1s .42s cubic-bezier(.2, .7, .2, 1) backwards, sm-flow 8s linear infinite;
}
.sm-sub {
  color: #b5c3dd; font-size: 15px; line-height: 1.85; margin: 0 0 26px; max-width: 30em;
  animation: sm-rise 1s .55s cubic-bezier(.2, .7, .2, 1) backwards;
}
.sm-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; animation: sm-rise 1s .68s cubic-bezier(.2, .7, .2, 1) backwards; }
.sm-tags li {
  font-size: 13px; color: #d6e2f7; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(12, 22, 48, .5); backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 7px;
}
.sm-tags i { color: var(--cyan); }

/* 登录卡片：旋转描边 */
@property --sm-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.sm-card-wrap { animation: sm-rise 1s .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.sm-card {
  position: relative; padding: 34px 32px 26px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(18, 28, 58, .72), rgba(8, 13, 30, .78));
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  isolation: isolate;
  transition: box-shadow .4s ease, transform .4s ease;
}
.sm-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--sm-angle), rgba(63, 224, 255, .0), rgba(63, 224, 255, .85), rgba(143, 123, 255, .85), rgba(255, 122, 200, .6), rgba(63, 224, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: sm-spin 7s linear infinite;
  opacity: .7; transition: opacity .4s;
}
.sm-card.is-focus { box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 60px rgba(63, 224, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .08); }
.sm-card.is-focus::before { animation-duration: 2.6s; opacity: 1; }
.sm-card.is-shake { animation: sm-shake .45s cubic-bezier(.36, .07, .19, .97); }

.sm-card-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.sm-card-head p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

.sm-field { display: block; margin-bottom: 16px; }
.sm-label { display: block; font-size: 13px; color: #c4d1ea; margin-bottom: 8px; }
.sm-input {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px;
  background: rgba(4, 9, 22, .6); border: 1px solid rgba(140, 170, 230, .22);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.sm-input > i { color: #7f93b8; font-size: 17px; transition: color .2s; }
.sm-input:focus-within { border-color: rgba(63, 224, 255, .75); box-shadow: 0 0 0 4px rgba(63, 224, 255, .12); background: rgba(6, 14, 32, .75); }
.sm-input:focus-within > i { color: var(--cyan); }
.sm-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 500 15px var(--font); letter-spacing: .02em;
}
.sm-input input::placeholder { color: #5f7195; }
.sm-input input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; caret-color: var(--ink); }
.sm-eye { background: none; border: 0; color: #7f93b8; cursor: pointer; font-size: 17px; padding: 4px; line-height: 1; }
.sm-eye:hover { color: var(--ink); }

.sm-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin: 4px 0 16px; gap: 10px; }
.sm-check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.sm-check input { position: absolute; opacity: 0; pointer-events: none; }
.sm-check span {
  width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(140, 170, 230, .45); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.sm-check input:checked + span { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; }
.sm-check input:checked + span::after { content: ""; width: 7px; height: 4px; border: 2px solid #031020; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.sm-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(63, 224, 255, .3); }
.sm-hint-trigger { position: relative; cursor: help; outline: none; }
.sm-hint-trigger:hover, .sm-hint-trigger:focus { color: var(--ink); }
.sm-tip {
  position: absolute; right: 0; bottom: calc(100% + 8px); width: 220px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.6;
  background: rgba(14, 22, 46, .96); border: 1px solid var(--line); color: #cfdcf3; opacity: 0; transform: translateY(4px); pointer-events: none; transition: .2s;
}
.sm-hint-trigger:hover .sm-tip, .sm-hint-trigger:focus .sm-tip { opacity: 1; transform: none; }

.sm-error {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--danger);
  background: rgba(255, 107, 138, .08); border: 1px solid rgba(255, 107, 138, .3); padding: 9px 12px; border-radius: 10px; margin-bottom: 14px;
}
.sm-error[hidden] { display: none; }

.sm-submit {
  position: relative; width: 100%; height: 50px; border: 0; border-radius: 13px; cursor: pointer; overflow: hidden;
  font: 700 16px var(--font); letter-spacing: .3em; color: #031020;
  background: linear-gradient(100deg, var(--cyan), #7aa8ff 50%, var(--violet));
  box-shadow: 0 10px 30px rgba(63, 224, 255, .25);
  transition: transform .15s, box-shadow .3s, filter .2s;
}
.sm-submit::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: sm-sweep 3.2s 1.5s ease-in-out infinite;
}
.sm-submit:hover { box-shadow: 0 14px 40px rgba(63, 224, 255, .38); filter: brightness(1.06); }
.sm-submit:active { transform: scale(.985); }
.sm-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sm-submit:disabled { cursor: progress; }
.sm-spinner { display: none; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid rgba(3, 16, 32, .25); border-top-color: #031020; animation: sm-rot .8s linear infinite; }
.sm-submit.is-loading .sm-submit-text { visibility: hidden; }
.sm-submit.is-loading .sm-spinner { display: block; }

.sm-note { display: flex; gap: 7px; align-items: flex-start; margin: 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sm-note i { color: var(--cyan); margin-top: 1px; }

.sm-foot { text-align: center; font-size: 12px; color: #5f7195; padding: 18px 16px 22px; animation: sm-rise 1s .8s backwards; }

/* 登录成功穿梭：界面淡出 */
.sm-top, .sm-hero, .sm-card-wrap, .sm-foot, .sm-veil, .sm-grid { transition: opacity .6s ease, transform .8s cubic-bezier(.6, 0, .3, 1), filter .6s; }
.is-warping .sm-top, .is-warping .sm-hero, .is-warping .sm-foot { opacity: 0; transform: translateY(-10px); filter: blur(6px); }
.is-warping .sm-card-wrap { opacity: 0; transform: scale(.92); filter: blur(8px); }
.is-warping .sm-veil, .is-warping .sm-grid { opacity: 0; }

/* 无 WebGL 兜底 */
.sm-no-webgl body, .sm-no-webgl .sm-login {
  background: radial-gradient(900px 600px at 25% 35%, rgba(63, 224, 255, .18), transparent 60%),
              radial-gradient(800px 600px at 70% 70%, rgba(143, 123, 255, .2), transparent 60%), var(--bg);
}

@keyframes sm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sm-flow { to { background-position: -220% 0; } }
@keyframes sm-spin { to { --sm-angle: 360deg; } }
@keyframes sm-sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes sm-rot { to { transform: rotate(360deg); } }
@keyframes sm-blink { 50% { opacity: .35; } }
@keyframes sm-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }

@media (max-width: 1023px) {
  .sm-stage { grid-template-columns: 1fr; justify-items: center; align-content: end; padding-top: 0; }
  .sm-veil { background: linear-gradient(180deg, rgba(5, 9, 20, .2) 0%, rgba(5, 9, 20, .1) 35%, rgba(5, 9, 20, .82) 62%, rgba(5, 9, 20, .95) 100%); }
  .sm-hero { text-align: center; margin-top: 30vh; }
  .sm-tags { justify-content: center; }
  .sm-card-wrap { width: 100%; max-width: 440px; }
}
@media (max-width: 640px) {
  .sm-status { display: none; }
  .sm-top { padding: 16px; }
  .sm-hero { margin-top: 22vh; }
  .sm-eyebrow { letter-spacing: .12em; font-size: 11px; margin-bottom: 12px; }
  .sm-hero h1 { font-size: 30px; margin-bottom: 4px; }
  .sm-sub { display: none; }
  .sm-tags { display: none; }
  .sm-card { padding: 26px 20px 20px; border-radius: 18px; }
  .sm-stage { gap: 20px; padding: 0 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #sm-scene { opacity: 1; }
}

/* 2026-10-08 响应式审计：iPhone SE(375×667)、iPad mini 竖屏(768×1024) 登录按钮掉出首屏 */
@media (max-width: 1023px) {
  .sm-hero { margin-top: 16vh; }
  .sm-sub, .sm-tags { display: none; }
  .sm-hero h1 { margin-bottom: 8px; }
}
@media (max-width: 1023px) and (max-height: 720px) {
  .sm-hero { margin-top: 8vh; }
  .sm-eyebrow { display: none; }
  .sm-hero h1 { font-size: 26px; }
  .sm-card { padding-top: 22px; }
  .sm-card-head p { margin-bottom: 14px; }
  .sm-field { margin-bottom: 12px; }
  .sm-note { display: none; }
}

/* 新 logo */
img.sm-logo { width: 40px; height: 40px; padding: 0; background: none; border: 0; border-radius: 11px; box-shadow: 0 0 24px rgba(63, 224, 255, .3); }

/* 登录页「手机扫码访问」（2026-10-08）：窄屏/矮屏不显示（手机上本来就在手机里，且会把登录按钮挤出首屏） */
.sm-qr-chip { display: inline-flex; align-items: center; gap: 16px; margin-top: 26px; padding: 12px 18px 12px 12px; border-radius: 18px;
  background: rgba(12, 22, 48, .55); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: sm-rise 1s .8s cubic-bezier(.2, .7, .2, 1) backwards; position: relative; z-index: 3; }
.sm-qr-img { flex: none; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 0 24px rgba(63, 224, 255, .25);
  transform-origin: left bottom; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; cursor: zoom-in; }
.sm-qr-img img { display: block; width: 88px; height: 88px; border-radius: 6px; }
.sm-qr-chip:hover .sm-qr-img { transform: scale(2.3); box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(63, 224, 255, .35); }
.sm-qr-text b { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink); }
.sm-qr-text b i { color: var(--cyan); }
.sm-qr-text span { display: block; font-size: 13px; color: #b5c3dd; margin: 4px 0 2px; }
.sm-qr-text small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 1023px), (max-height: 699px) { .sm-qr-chip { display: none; } }
.is-warping .sm-qr-chip { opacity: 0; }
