/* ============================================================
   cs 站点 · 登录 / 账号页 公共样式
   被 public/login.html 和 public/account.html 共同引用。
   改配色或尺寸只需要改这里一处。
   ============================================================ */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #1f2937;
  --ink-2: #6b7280;
  --line: #e5e7eb;
  --danger: #dc2626;
  --ok: #059669;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(125deg, #eaf2ff 0%, #f4f0ff 42%, #ffeef4 100%);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 整体布局：左品牌区 + 右卡片区 ---------- */
.page {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
}

/* ---------- 左侧品牌区 ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6vh 5vw 6vh 7vw;
  position: relative;
  overflow: hidden;
}
.kicker {
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: .18em;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.35;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: .01em;
}
.grad {
  background: linear-gradient(96deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quote { color: #c7d2fe; font-weight: 400; }
.hero .sub {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 26px;
  max-width: 30em;
}
.hero-art { width: min(100%, 460px); height: auto; margin-top: 4px; }
.hero-art .float-a { animation: float 6s ease-in-out infinite; }
.hero-art .float-b { animation: float 6s ease-in-out infinite .8s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ---------- 右侧卡片区 ---------- */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 6vw 40px 3vw;
}
.card {
  width: 100%;
  max-width: 396px;
  background: #fff;
  border-radius: 18px;
  padding: 38px 36px 30px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, .13),
              0 2px 8px rgba(15, 23, 42, .04);
  position: relative;
}
/* 卡片右上角四格装饰块 */
.card::after {
  content: "";
  position: absolute;
  top: 20px; right: 20px;
  width: 30px; height: 30px;
  border-radius: 8px;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 0 / 12px 12px no-repeat,
    linear-gradient(#c7d2fe, #c7d2fe) 18px 0 / 12px 12px no-repeat,
    linear-gradient(#c7d2fe, #c7d2fe) 0 18px / 12px 12px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 18px 18px / 12px 12px no-repeat;
  opacity: .5;
}
.card h2 {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 26px;
  letter-spacing: .04em;
}

/* ---------- 表单字段 ---------- */
.field { position: relative; margin-bottom: 14px; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input::placeholder { color: #9ca3af; }
.field input:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field.has-toggle input { padding-right: 46px; }

.pwd-toggle {
  position: absolute;
  top: 0; right: 4px;
  width: 40px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; cursor: pointer;
  color: #9ca3af; padding: 0;
}
.pwd-toggle:hover { color: var(--blue); }
.pwd-toggle .slash { display: none; }
.pwd-toggle.revealed .slash { display: block; }

/* 藏掉浏览器自带的密码显隐按钮，否则会和上面自制的眼睛并排出现两个。
   Edge/IE 用 ::-ms-reveal，Chrome/Safari 用 ::-webkit-* 那几个自动填充按钮。 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
  margin: 2px 2px 18px;
}

/* ---------- 按钮 ---------- */
.btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(96deg, #2563eb, #4f46e5);
  cursor: pointer;
  transition: filter .15s, transform .06s;
}
.btn:hover:not(:disabled) { filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
  font-weight: 500;
  letter-spacing: 0;
}
.btn.ghost:hover { background: #f8fafc; }
/* 相邻按钮之间留出间距，省得在 HTML 里塞空 div */
.btn + .btn { margin-top: 11px; }

/* ---------- 提示条 ---------- */
.alert {
  display: none;
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.alert.show { display: block; }
.alert.ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- 文字链接 / 说明 ---------- */
.switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 20px;
}
.switch a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.switch a:hover { text-decoration: underline; }

.divider { height: 1px; background: var(--line); margin: 18px 0 14px; }

.tips {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.7;
  margin: 8px 0 0;
}
/* 放在表单上方的说明文字 */
.tips.lead { margin: 0 0 16px; font-size: 12.5px; }
.tips.lead b { color: var(--ink); font-weight: 600; }

.field-warn {
  display: none;
  font-size: 12px;
  color: var(--danger);
  line-height: 1.6;
  margin: -6px 2px 14px;
}
.field-warn.show { display: block; }

/* ---------- 账号信息块 ---------- */
.who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
}
.avatar {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.who .name { font-weight: 600; font-size: 15px; }
.who .meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* 账号页里的单行信息（例如邮箱） */
.bound {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13.5px;
}
.bound .k { color: var(--ink-2); flex: 0 0 auto; }
.bound .v { font-weight: 600; word-break: break-all; text-align: right; }
.bound .v.empty { font-weight: 400; color: #9ca3af; }

/* 验证码输入框 */
.code-input input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 10px;
  font-weight: 700;
  padding-left: 10px;
  height: 54px;
}

/* ---------- 底部 ---------- */
.page-foot {
  position: fixed;
  left: 0; right: 0; bottom: 10px;
  text-align: center;
  font-size: 11px;
  color: rgba(107, 114, 128, .62);
  pointer-events: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .hero { display: none; }
  .panel { padding: 40px 20px 60px; }
  .card { box-shadow: 0 10px 30px rgba(37, 99, 235, .12); }
}
@media (max-height: 760px) and (min-width: 901px) {
  .hero-art { display: none; }
}
