/* ==========================================================================
   MGM · N8 入口页同款 · 登录 / 注册（task-120）
   参照 work/front-entry/index.html（线上 mgm.jp.net 入口页）
   黑 #000 / 红 #DC2D2B / 金 #EEB941 / 深蓝卡 #082040→#183058→#3A2A52
   仅作用于 body.n8auth；保留全部现有 DOM id 与 JS
   ========================================================================== */

body.n8auth {
  --nf-bg: #000;
  --nf-bg-2: #050505;
  --nf-surface: #101010;
  --nf-surface-2: #161616;
  --nf-line: rgba(255, 255, 255, .1);
  --nf-line-strong: rgba(238, 185, 65, .5);
  --nf-text: #f8f8f8;
  --nf-text-dim: #9a9a9a;
  --nf-text-faint: #5f5f5f;
  --nf-gold: #eeb941;
  --nf-gold-2: #d9a423;
  --nf-accent: #dc2d2b;
  --nf-radius: 12px;
  --nf-radius-lg: 16px;
  --nf-shadow-1: 0 10px 30px rgba(0, 0, 0, .55);
  background: #000 !important;
  color: #fff;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.n8auth .nf-app {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 26px 34px;
  background: #000 !important;
  min-height: 100vh;
  box-sizing: border-box;
}
.n8auth .nf-page { padding: 0 !important; background: transparent !important; }

/* 隐藏 mountChrome 生成的旧顶栏/旧页脚（入口页没有这些） */
.n8auth .nf-top { display: none !important; }
.n8auth .nf-footer { display: none !important; }

/* ---- 右上角语言切换（样式即可） ---- */
.n8a-lang {
  position: fixed; top: 14px; right: 16px; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: #8a8a8a; letter-spacing: .5px;
}
.n8a-lang span { cursor: pointer; transition: color .15s; }
.n8a-lang span.on { color: #eeb941; font-weight: 800; }
.n8a-lang span:active { color: #eeb941; }
.n8a-lang i { width: 1px; height: 10px; background: #2a2a2a; display: inline-block; }

/* ---- 居中徽标 + 品牌 + POKER · CASINO ---- */
.n8a-logo {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 0 0;
  text-align: center;
}
.n8a-badge {
  width: 58px; height: 58px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 900; letter-spacing: .5px; color: #fff;
  background: linear-gradient(145deg, #e5302e, #b3181a);
  box-shadow: 0 10px 30px rgba(220, 45, 43, .45), 0 0 26px rgba(220, 45, 43, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
  position: relative;
}
.n8a-badge::after {
  content: ''; position: absolute; inset: -6px; border-radius: 18px;
  background: radial-gradient(circle, rgba(220, 45, 43, .28), transparent 68%);
  z-index: -1;
}
.n8a-brand {
  margin-top: 12px;
  font-size: 30px; font-weight: 900; letter-spacing: 4px; color: #fff;
  line-height: 1.15; white-space: nowrap;
}
.n8a-brand span { color: #eeb941; }
.n8a-sub {
  margin-top: 6px;
  font-size: 11px; letter-spacing: 5px; text-transform: uppercase;
  color: #8a8a8a;
}

/* ---- 深蓝信息卡 ---- */
.n8a-hero {
  margin: 20px 0 18px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #082040, #183058 55%, #3a2a52);
  padding: 18px 18px; text-align: left; position: relative;
  border: 1px solid rgba(120, 170, 240, .18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.n8a-hero::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(238, 185, 65, .35), transparent 70%);
  pointer-events: none;
}
.n8a-hero b { display: block; font-size: 19px; font-weight: 900; color: #f8f8f8; letter-spacing: .5px; }
.n8a-hero p { margin-top: 6px; color: #cfd6e4; font-size: 12px; line-height: 1.65; }
.n8a-hero .tag {
  display: inline-block; margin-top: 10px; padding: 4px 9px; border-radius: 6px;
  background: rgba(238, 185, 65, .16); color: #eeb941;
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
}

/* ---- 表单卡 #101010 ---- */
.n8auth .nf-card,
.n8auth .n8a-form-card {
  background: #101010 !important;
  border: 1px solid #232323 !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5) !important;
}
.n8auth .n8a-form-card { position: relative; overflow: hidden; }
.n8auth .n8a-form-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 185, 65, .55), transparent);
}
.n8a-form-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px;
}
.n8a-form-head b { font-size: 17px; font-weight: 900; color: #f8f8f8; letter-spacing: 1px; }
.n8a-form-head span { font-size: 8.5px; color: #6e6e6e; letter-spacing: 1.6px; text-transform: uppercase; }

/* 输入框 / label */
.n8auth .nf-form { display: flex; flex-direction: column; gap: 12px; }
.n8auth .nf-field { display: flex; flex-direction: column; gap: 6px; }
.n8auth .nf-label {
  font-size: 11px; font-weight: 800; color: #eeb941 !important; letter-spacing: 1px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.n8auth .nf-label em { color: #6e6e6e !important; font-style: normal; font-weight: 600; font-size: 9px; }
.n8auth .nf-input {
  height: 46px !important; background: #0a0a0a !important;
  border: 1px solid #2a2a2a !important; border-radius: 12px !important;
  color: #f8f8f8 !important; font-size: 13.5px !important; padding: 0 14px !important;
}
.n8auth .nf-input::placeholder { color: #5a5a5a !important; }
.n8auth .nf-input:focus {
  border-color: #eeb941 !important;
  box-shadow: 0 0 0 2px rgba(238, 185, 65, .14), 0 0 14px rgba(238, 185, 65, .1) !important;
}
.n8auth .nf-input.suffix { padding-right: 44px !important; }
.n8auth .nf-suffix-btn { color: #8a8a8a !important; }
.n8auth .nf-hint { color: #5f5f5f !important; font-size: 9px !important; }
.n8auth .nf-err { color: #ff8a8a !important; font-size: 9.5px !important; }
.n8auth .nf-check { display: flex; align-items: center; gap: 8px; color: #9a9a9a !important; font-size: 11px !important; }
.n8auth .nf-check input { accent-color: #eeb941 !important; width: 14px; height: 14px; margin: 0; }

/* 按钮：红主 / 金次 / 深灰第三 */
.n8a-btn {
  display: flex; align-items: center; justify-content: center;
  height: 52px; border-radius: 999px;
  font-size: 16px; font-weight: 800; letter-spacing: 1px;
  text-decoration: none; border: 0; cursor: pointer;
  font-family: inherit; width: 100%;
  transition: transform .12s ease, filter .12s ease;
}
.n8a-btn:active { transform: scale(.985); filter: brightness(1.05); }
.n8a-btn.primary {
  background: linear-gradient(135deg, #e5302e, #c01f1f);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 45, 43, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
  margin-top: 4px;
}
.n8a-btn.gold { background: linear-gradient(135deg, #f4cd64, #d9a423); color: #1a1200; }
.n8a-btn.ghost { background: #141414; color: #ddd; border: 1px solid #262626; }
.n8a-btn.loading, .n8a-btn:disabled { opacity: .7; pointer-events: none; }
.n8a-btn .nf-spin { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }

/* 金色链接 / 分隔 */
.n8a-switch {
  margin: 14px 0 12px; text-align: center;
  color: #8a8a8a; font-size: 12px; letter-spacing: .3px;
}
.n8a-switch a { color: #eeb941; font-weight: 800; text-decoration: none; }
.n8a-switch a:active { text-decoration: underline; }
.n8a-divider { height: 1px; background: #1f1f1f; margin: 0 0 12px; }

/* 已登录会话卡 */
.n8auth .nf-session-card { color: #f8f8f8 !important; }
.n8auth .nf-session-card .nf-avatar {
  background: #141414 !important; border: 1px solid rgba(238, 185, 65, .5) !important; color: #eeb941 !important;
}
.n8auth .nf-session-card b { color: #f8f8f8 !important; }
.n8auth .nf-session-card .faint { color: #8a8a8a !important; }
.n8auth .nf-btn-row { display: flex; gap: 10px; }
.n8auth .nf-btn-row .n8a-btn { flex: 1; height: 46px; font-size: 14px; }

/* 密码强度 */
.n8auth .nf-strength { display: flex; align-items: center; gap: 4px; }
.n8auth .nf-strength i { flex: 1; height: 4px; border-radius: 2px; background: #222 !important; }
.n8auth .nf-strength i.on { box-shadow: 0 0 8px currentColor; }
.n8auth .nf-strength.lv1 i.on { background: #ff8a8a !important; }
.n8auth .nf-strength.lv2 i.on { background: #eeb941 !important; }
.n8auth .nf-strength.lv3 i.on { background: #5bbe35 !important; }
.n8auth .nf-strength small { color: #8a8a8a !important; font-size: 9px; min-width: 14px; }

/* 错误 banner */
.n8auth .nf-banner { background: #241012 !important; border: 1px solid #6a1a22 !important; color: #ff8a8a !important; border-radius: 10px !important; padding: 9px 11px !important; font-size: 11px !important; }

/* 页脚 18+ */
.n8a-foot {
  margin-top: 18px; color: #5f5f5f; font-size: 10.5px; line-height: 1.8; text-align: center;
  letter-spacing: .3px;
}
.n8a-foot div + div { margin-top: 2px; }
.n8a-foot b { color: #8a8a8a; font-weight: 600; }

/* toast 适配 */
.n8auth .nf-toast-root .nf-toast { background: #141414 !important; border-color: #2a2a2a !important; color: #f8f8f8 !important; }

/* 小屏适配 */
@media (max-width: 360px) {
  .n8auth .nf-app { padding: 0 18px 26px; }
  .n8a-brand { font-size: 26px; letter-spacing: 3px; }
  .n8a-hero b { font-size: 17px; }
}

/* ===== task-132 · N8 desktop (>=1100px) ===== */
@media (min-width:1100px){
  body.n8auth{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:36px 20px;background:radial-gradient(1200px 620px at 50% -10%,#0d1c30,#050505 62%,#000)}
  .n8auth .nf-app{width:1180px;max-width:1180px;min-height:640px;margin:0;padding:24px 40px 22px;display:flex;flex-direction:column;background:radial-gradient(760px 420px at 16% 24%,rgba(24,48,88,.55),transparent 62%),#050505;border:1px solid #1e1e1e;border-radius:24px;box-shadow:0 28px 90px rgba(0,0,0,.65)}
  .n8auth .nf-top{height:44px;padding:0 4px;background:transparent;border:0}
  .n8auth .nf-page{display:grid;grid-template-columns:minmax(0,1fr) 480px;grid-template-areas:"logo form" "hero form" "foot form";column-gap:72px;align-items:start;padding:4px 8px 0}
  .n8auth .n8a-logo{grid-area:logo;margin-top:18px}
  .n8auth .n8a-badge{width:78px;height:78px;font-size:46px;border-radius:20px}
  .n8auth .n8a-brand{font-size:46px}
  .n8auth .n8a-sub{font-size:12px;letter-spacing:4px}
  .n8auth .n8a-hero{grid-area:hero;margin:28px 0 0;padding:20px 22px;border-radius:16px;max-width:560px}
  .n8auth .n8a-hero b{font-size:19px}
  .n8auth .n8a-hero p{font-size:13px;line-height:1.9}
  .n8auth .n8a-form-card{grid-area:form;width:100%;max-width:480px;justify-self:end;align-self:center;margin:0;padding:22px 24px;border-radius:20px}
  .n8auth #sessionCard{grid-area:form;justify-self:end;width:100%;max-width:480px}
  .n8auth .n8a-foot{grid-area:foot;margin-top:30px;max-width:560px}
  .n8auth .n8a-lang{position:fixed;top:22px;right:26px}
}

/* task-132 二次修正：桌面登录/注册卡片居中 420-480 */
@media (min-width:1100px){
  .n8auth .nf-page{display:flex;flex-direction:column;align-items:center;gap:18px;padding:6px 8px 0}
  .n8auth .n8a-logo{order:0;margin-top:6px;text-align:center}
  .n8auth .n8a-form-card{order:1;width:100%;max-width:480px;margin:0;justify-self:auto;align-self:auto;padding:24px 26px;border-radius:20px}
  .n8auth #sessionCard{order:1;width:100%;max-width:480px;justify-self:auto}
  .n8auth .n8a-hero{order:2;width:100%;max-width:600px;margin:4px 0 0;text-align:center}
  .n8auth .n8a-foot{order:3;width:100%;max-width:600px;margin-top:6px;text-align:center}
  .n8auth .nf-app{min-height:auto;padding-bottom:26px}
}