/* ============================================================
   贝思特英语 · 三端登录页共用主题 (蓝白 · 科技/游戏/大气)
   角色变体: body.theme-student / theme-org / theme-admin
   ============================================================ */
:root {
  --c-blue: #2563EB;
  --c-blue-d: #1d4ed8;
  --c-cyan: #06b6d4;
  --c-violet: #7c6cff;
  --c-sky: #38bdf8;
  --c-ink: #0f1f3d;
  --c-ink-2: #3a4a66;
  --c-mute: #7b8aa6;
  --c-line: #e4ebf7;
  --c-bg: #f4f8ff;
  --c-card: rgba(255, 255, 255, 0.78);
  --grad-primary: linear-gradient(135deg, #2563EB 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(37,99,235,.12), rgba(6,182,212,.12));
  --shadow-card: 0 24px 70px rgba(31, 79, 191, .18);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--c-ink);
  background: var(--c-bg);
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 动态背景 ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(6,182,212,.18), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(124,108,255,.16), transparent 60%),
    linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(8px);
  opacity: .55; animation: drift 18s ease-in-out infinite;
}
.blob.b1 { width: 420px; height: 420px; background: radial-gradient(circle at 30% 30%, #5b8cff, #2563EB); top: -120px; left: -80px; }
.blob.b2 { width: 360px; height: 360px; background: radial-gradient(circle at 30% 30%, #2dd4bf, #06b6d4); bottom: -120px; right: -70px; animation-delay: -6s; }
.blob.b3 { width: 240px; height: 240px; background: radial-gradient(circle at 30% 30%, #a78bfa, #7c6cff); top: 40%; left: 60%; animation-delay: -11s; opacity:.4; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.06); }
  66% { transform: translate(-30px,25px) scale(.96); }
}
/* 科技网格(机构/总后台更明显) */
.grid-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 80%);
}
/* 漂浮粒子(学生端游戏感) */
.spark {
  position: fixed; z-index: 0; width: 10px; height: 10px; border-radius: 50%;
  background: var(--grad-primary); opacity: .5; animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) translateX(0); opacity:.5; }
  50% { transform: translateY(-40px) translateX(14px); opacity:.9; }
}

/* ---------- 布局 ---------- */
.stage {
  position: relative; z-index: 2; height: 100%; padding: 0 4vw 46px;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
}
/* 登录卡内顶部区域：云学谷 LOGO（无白底，上下左右居中，作为框内主视觉） */
.panel-logo { width: 100%; display: flex; align-items: center; justify-content: center; min-height: 56px; margin-bottom: 14px; }
.panel-logo img { height: 44px; width: auto; display: block; }
/* 页面底部版权（黑色，居中；深色后台改为浅色保证可读） */
.login-footer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; text-align: center; padding: 12px 0; font-size: 12px; letter-spacing: .4px; color: #1a1a1a; pointer-events: none; }
body.theme-admin .login-footer { color: rgba(255,255,255,.6); }
@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; }
  .hero { display: none !important; }
}
.hero {
  padding: 6vh 5vw; color: #fff; position: relative;
}
.hero .halo { position: absolute; inset: 0; background: var(--grad-primary); opacity: .96; clip-path: polygon(0 0, 100% 0, 86% 100%, 0% 100%); z-index:-1; }
.hero h1 { font-size: clamp(30px, 4vw, 52px); margin: 18px 0 10px; line-height: 1.15; letter-spacing: 1px; text-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hero p.lead { font-size: 17px; opacity: .92; max-width: 44ch; line-height: 1.7; }
.hero .feats { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.hero .feat { display: flex; align-items: center; gap: 12px; font-size: 15px; opacity: .95; }
.hero .feat .dot { width: 34px; height: 34px; border-radius: 10px; display:grid; place-items:center; background: rgba(255,255,255,.18); font-size: 17px; }
.hero .badge-soft { display:inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 13px; letter-spacing: 2px; }

.panel {
  display: grid; place-items: center; padding: 4vh 4vw;
}
.card {
  width: min(420px, 92vw); background: var(--c-card); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 34px 32px 30px;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
  display: flex; flex-direction: column; align-items: center;
}
/* 表单元素在居中的卡片内保持满宽 */
.card > .field, .card > .btn, .card > .hint, .card > .err, .card > .links { width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity:1; transform: none; } }

/* ---------- 品牌 / LOGO ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 6px 14px rgba(37,99,235,.35)); object-fit: contain; }
/* 左侧品牌区 LOGO（白色爱学LOGO）放大 */
.hero .logo-mark { width: auto; max-width: 220px; height: auto; max-height: 80px; }
/* 右侧登录卡 LOGO（AI蓝色LOGO）适中 */
.panel .card .head .logo-mark { width: auto; max-width: 72px; height: auto; max-height: 56px; }
.brand .name { font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--c-ink); }
.brand .name small { display:block; font-size: 11px; font-weight: 600; color: var(--c-mute); letter-spacing: 3px; margin-top: 2px; }
/* 右侧登录卡：LOGO 右侧的「贝思特英语」文字（浅色卡用墨色，admin 深色卡用白色） */
.head .brand .login-name { font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--c-ink); }
body.theme-admin .head .brand .login-name { color: #fff; }
.center { text-align: center; }
.head { margin-bottom: 22px; }
.head .title { font-size: 24px; font-weight: 800; margin: 14px 0 4px; color: var(--c-ink); }
.head .sub { font-size: 13.5px; color: var(--c-mute); }

/* ---------- 表单 ---------- */
.field { margin-top: 16px; }
.field label { display:block; font-size: 13px; color: var(--c-ink-2); margin-bottom: 7px; font-weight: 600; }
.input {
  width: 100%; height: 50px; padding: 0 16px; font-size: 15px; color: var(--c-ink);
  background: #fff; border: 1.5px solid var(--c-line); border-radius: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.input::placeholder { color: #aab4c8; }

.btn {
  width: 100%; height: 52px; margin-top: 24px; border: 0; border-radius: 14px; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #fff; background: var(--grad-primary);
  letter-spacing: 2px; position: relative; overflow: hidden;
  box-shadow: 0 12px 28px rgba(37,99,235,.36); transition: transform .12s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(37,99,235,.44); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .7; cursor: default; transform: none; }
.btn .spin { display:none; width:18px;height:18px;border:2.5px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;vertical-align:middle;margin-right:8px;}
.btn.loading .spin{display:inline-block;}
@keyframes spin{to{transform:rotate(360deg);}}

.hint { margin-top: 16px; font-size: 12.5px; color: var(--c-mute); text-align: center; line-height: 1.6; }
.links { margin-top: 18px; display:flex; justify-content: center; gap: 16px; font-size: 12.5px; }
.links a { color: var(--c-blue); text-decoration: none; opacity: .85; }
.links a:hover { opacity: 1; text-decoration: underline; }
/* line-height 保障「网络不一致」这类较长提示换行后仍可读 */
.err { margin-top: 14px; font-size: 13px; color: #e23a4e; text-align: center; min-height: 18px; line-height: 1.6; }

/* 顶部细进度条 */
.topbar-prog { position: fixed; top:0; left:0; height:3px; width:0; background: var(--grad-primary); z-index: 50; transition: width .25s; }

/* ---------- 角色主题微调 ---------- */
/* 学生端：更轻盈、游戏感(默认即是) */
body.theme-student .hero .halo { background: linear-gradient(135deg,#3b82f6,#06b6d4); }
body.theme-student .card { border-radius: 26px; }
/* 左侧品牌副标题压在蓝色 halo 上，灰色看不清 → 改白(强制) */
body.theme-student .hero .brand .name small { color: #fff !important; opacity: .9; }
/* 左侧"贝思特英语"主标题同样压在蓝色 halo 上 → 改白(强制) */
body.theme-student .hero .brand .name { color: #fff !important; }

/* 机构端：更大气、硬朗 */
body.theme-org { --c-blue:#1e5eff; --grad-primary:linear-gradient(135deg,#1e5eff,#0ea5e9); }
body.theme-org .hero .halo { background: linear-gradient(135deg,#1e3a8a,#1e5eff); }
body.theme-org .card { border-radius: 18px; }
/* 机构端左侧品牌压在深蓝 halo 上 → 主标题与副标题改白(强制) */
body.theme-org .hero .brand .name,
body.theme-org .hero .brand .name small { color: #fff !important; }
body.theme-org .hero .brand .name small { opacity: .9; }

/* 总后台：深色尊贵控制感 */
body.theme-admin { --c-bg:#0b1733; }
body.theme-admin .bg {
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(37,99,235,.30), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(6,182,212,.22), transparent 60%),
    linear-gradient(180deg, #0b1733 0%, #0a1230 100%);
}
body.theme-admin .grid-lines { opacity:.5; background-image: linear-gradient(rgba(120,160,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,255,.08) 1px, transparent 1px); }
body.theme-admin .card { background: rgba(18,32,66,.72); border-color: rgba(120,160,255,.22); color:#eaf1ff; }
body.theme-admin .brand .name, body.theme-admin .head .title { color:#fff; }
/* 总后台左侧品牌副标题在深色底上 → 改白(强制) */
body.theme-admin .hero .brand .name small { color: #fff !important; opacity: .9; }
body.theme-admin .head .sub, body.theme-admin .field label { color:#9fb2da; }
body.theme-admin .input { background: rgba(10,20,45,.7); border-color: rgba(120,160,255,.22); color:#eaf1ff; }
body.theme-admin .input:focus { border-color:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,.2); }
body.theme-admin .input::placeholder { color:#5f73a0; }
body.theme-admin .hint, body.theme-admin .links a { color:#8fa6d6; }
body.theme-admin .hero .halo { background: linear-gradient(135deg,#1e3a8a,#2563eb); }
