/* ============ 登录页 ============ */
:root {
  --bg: #0a0a0f;
  --bg-soft: #12121a;
  --card: #14141d;
  --card-2: #1a1a25;
  --border: #24243a;
  --border-hi: #33334d;
  --text: #e8e8f0;
  --text-dim: #8a8aa3;
  --text-mute: #5a5a72;
  --accent: #e94560;
  --accent-2: #ff5c75;
  --accent-glow: rgba(233, 69, 96, .28);
  --gold: #e9c46a;
  --ok: #4ecca3;
  --warn: #f4a261;
  --danger: #e94560;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景装饰 */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 78%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 720px; height: 720px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 62%);
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: .42; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: .62; transform: translate(-50%, -50%) scale(1.08); }
}

/* 容器 */
.login-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px;
  z-index: 1;
  animation: rise .5s cubic-bezier(.2,.8,.3,1);
}

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

/* 品牌 */
.brand { text-align: center; margin-bottom: 26px; }

.logo {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(233,69,96,.16), rgba(233,69,96,.04));
  border: 1px solid rgba(233,69,96,.26);
  box-shadow: 0 8px 32px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.06);
}
.logo svg { width: 34px; height: 34px; }

.brand h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(100deg, #fff, #ffb3c0 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 2.4px;
}

/* 卡片 */
.login-card {
  background: linear-gradient(168deg, var(--card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 22px 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 24px 60px -20px rgba(0,0,0,.85),
    0 0 0 1px rgba(0,0,0,.3);
  backdrop-filter: blur(12px);
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 7px;
  letter-spacing: .3px;
  font-weight: 500;
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input-wrap .ico {
  position: absolute;
  left: 13px;
  width: 17px; height: 17px;
  color: var(--text-mute);
  pointer-events: none;
  transition: color .18s;
}

.input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  background: #0c0c13;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.input-wrap input::placeholder { color: var(--text-mute); font-size: 13.5px; }

.input-wrap input:hover { border-color: var(--border-hi); }

.input-wrap input:focus {
  border-color: rgba(233,69,96,.62);
  background: #0e0e16;
  box-shadow: 0 0 0 3px rgba(233,69,96,.1);
}

.input-wrap:focus-within .ico { color: var(--accent); }

.toggle-pw {
  position: absolute;
  right: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-mute);
  cursor: pointer;
  transition: color .16s, background .16s;
}
.toggle-pw:hover { color: var(--text-dim); background: rgba(255,255,255,.05); }
.toggle-pw svg { width: 17px; height: 17px; }
.toggle-pw.on { color: var(--accent); }

/* 行 */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 16px;
  min-height: 18px;
}

.check {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid var(--border-hi);
  border-radius: 4px;
  background: #0c0c13;
  cursor: pointer;
  position: relative;
  transition: all .16s;
}
.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hint {
  font-size: 11.5px;
  color: var(--warn);
  opacity: 0;
  transition: opacity .2s;
}
.hint.show { opacity: 1; }

/* 提示 */
.alert {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  background: rgba(233,69,96,.1);
  border: 1px solid rgba(233,69,96,.3);
  color: #ff8fa2;
  animation: shake .32s;
}
.alert.warn {
  background: rgba(244,162,97,.1);
  border-color: rgba(244,162,97,.3);
  color: #f4a261;
}
.alert[hidden] { display: none; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-5px); }
  75%     { transform: translateX(5px); }
}

/* 按钮 */
.btn-login {
  width: 100%;
  height: 47px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #c23152);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .12s, box-shadow .2s, filter .2s;
  box-shadow: 0 10px 26px -10px var(--accent-glow);
  display: flex; align-items: center; justify-content: center; gap: 9px;
}

.btn-login::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.2) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s;
}
.btn-login:hover::before { transform: translateX(120%); }
.btn-login:hover { box-shadow: 0 14px 32px -10px rgba(233,69,96,.5); }
.btn-login:active { transform: scale(.985); }
.btn-login:disabled {
  cursor: not-allowed;
  filter: saturate(.5) brightness(.8);
  transform: none;
}
.btn-login:disabled::before { display: none; }

.spin {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rot .62s linear infinite;
}
.spin[hidden] { display: none; }

@keyframes rot { to { transform: rotate(360deg); } }

/* 底部 */
.foot {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.6;
}

.copyright {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #35354a;
}

/* 移动端 */
@media (max-width: 420px) {
  .login-wrap { padding: 20px 16px; }
  .login-card { padding: 22px 18px 18px; border-radius: 16px; }
  .logo { width: 54px; height: 54px; }
  .brand h1 { font-size: 19px; }
}
