/* 网页版登录层（/play/）—— 外观照官网首页：水墨底 + 楷体 + 朱红点睛
   登录／注册框的**风格与布局照手机端**（透明框、黑底绿字输入框、绿底按钮），
   只是尺寸整体放大一档；字体按他的要求统一用主页那套楷体（含按钮）。
   进游戏后 body 加 .in-game：登录层整块隐藏，MUD 终端接管。 */

/* 页面本体是黑底终端配色：登录层要换成官网的浅色底，进游戏再回黑 */
body:not(.in-game) { background: #f4f2ec; }

#pg-shell {
  position: fixed; inset: 0; z-index: 30;
  display: flex; flex-direction: column;
  font-family: "LXGW WenKai", "Kaiti SC", KaiTi, STKaiti, "Noto Serif SC", "Songti SC", SimSun, serif;
  color: #1f2328;
  overflow: auto;
}
.pg-bg { position: fixed; inset: 0; z-index: -1; background: url("img/home_bg.jpg") center / cover no-repeat; }
.pg-bg::after { content: none; }

/* ── 顶部导航（与官网同一套图与字号） ── */
.pg-nav {
  position: sticky; top: 0; z-index: 20;
  background: transparent;
  border-bottom: 1px solid rgba(60, 52, 40, .22);
}
.pg-wrap { width: min(1200px, 94vw); margin: 0 auto; display: flex; align-items: center; gap: 40px; height: 92px; }
.pg-logo { display: block; height: 72px; width: auto; }
.pg-menu { display: flex; align-items: center; gap: 26px; flex: 1 1 auto; }
.pg-menu a {
  color: #1f2328; text-decoration: none; font-size: 18px; letter-spacing: 1px;
  padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.pg-menu a:hover { color: #8c2f24; }
.pg-menu a.on { color: #8c2f24; font-weight: 700; border-bottom-color: #8c2f24; }
.pg-login {
  color: #8c2f24; text-decoration: none; font-size: 16px; letter-spacing: 2px;
  padding: 7px 24px; border: 1px solid #8c2f24; border-radius: 4px;
  background: rgba(255, 255, 255, .72); white-space: nowrap;
}
.pg-login:hover { background: #8c2f24; color: #fff; }

/* ── 中间：登录／注册框（照手机端，放大一档） ── */
.pg-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 36px 16px; }

/* 登录框：完全透明，不画背景、不画边框、不做毛玻璃，只留控件（同手机端 #m-login .lg-box） */
.pg-card {
  width: min(430px, 92vw);
  background: transparent;
  border: 0; box-shadow: none;
  padding: 6px 0;
}
/* 注册框：手机端是一块淡墨绿半透明板，这里照抄，只是放大 */
.pg-card.pg-wide {
  box-sizing: border-box;
  width: min(520px, 94vw);
  padding: 20px 20px 16px;
  background: rgba(0, 12, 6, .45);
  border: 1px solid rgba(0, 190, 95, .35);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.pg-title {
  margin: 0 0 12px; text-align: center; color: #fff;
  font-size: 21px; letter-spacing: 6px; font-weight: 400;
}

/* 输入框：黑底半透明 + 绿框绿字（同手机端，放大到 48px 高） */
.pg-card input[type=text], .pg-card input[type=password] {
  box-sizing: border-box; width: 100%; height: 48px; margin-bottom: 12px; padding: 0 14px;
  background: rgba(0, 0, 0, .45); color: #00ff66;
  border: 1px solid rgba(0, 150, 75, .8); border-radius: 6px;
  font-family: inherit; font-size: 18px; letter-spacing: 1px; outline: none;
}
.pg-card input::placeholder { color: rgba(160, 220, 180, .6); font-size: 15px; letter-spacing: 0; }
.pg-card input:focus { border-color: rgba(0, 230, 115, .95); box-shadow: 0 0 0 2px rgba(0, 190, 95, .18); }

.lg-pw-wrap { position: relative; }
.lg-pw-wrap input { padding-right: 78px; }
.lg-eye {
  position: absolute; right: 8px; top: 9px; width: 58px; height: 30px;
  background: transparent; color: #7fd39c; border: 1px solid rgba(0, 190, 95, .55); border-radius: 4px;
  font-family: inherit; font-size: 14px; letter-spacing: 0; cursor: pointer;
}
.lg-eye:hover { background: rgba(0, 130, 65, .45); color: #fff; }

.lg-rem { display: flex; align-items: center; gap: 22px; color: #0f7a45; font-size: 14px; margin: 2px 0 16px; }
.lg-rem label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lg-rem input { width: 16px; height: 16px; accent-color: #007733; }

#lg-go, #rg-go {
  width: 100%; height: 48px; cursor: pointer;
  color: #fff; border: 0; border-radius: 6px;
  font-family: inherit; font-size: 19px; letter-spacing: 6px;
}
#lg-go { background: #007733; }
#lg-go:hover { background: #008a3c; }
#rg-go { background: rgba(0, 120, 60, .85); border: 1px solid rgba(0, 220, 110, .7); }
#rg-go:hover { background: rgba(0, 160, 80, .9); }

#lg-msg, #rg-msg { min-height: 22px; margin: 8px 0 2px; text-align: center; font-size: 14px; line-height: 1.5; }
#lg-msg { color: #b23b2e; }
#rg-msg { color: #ff8844; }
/* 空着时给一句引导（同手机端 #lg-msg:empty::before） */
#lg-msg:empty::before { content: "请输入你在风云2026的账号和密码进入游戏"; color: #5f7f6c; }

.lg-acts, .rg-acts { display: flex; gap: 12px; margin-top: 8px; }
.lg-acts button, .rg-acts button {
  flex: 1 1 0; height: 40px; cursor: pointer;
  background: rgba(0, 70, 35, .5); color: #fff;
  border: 1px solid rgba(0, 190, 95, .45); border-radius: 5px;
  font-family: inherit; font-size: 16px; letter-spacing: 3px;
}
.lg-acts button:hover, .rg-acts button:hover { background: rgba(0, 120, 60, .75); }

.lg-legal { margin-top: 18px; font-size: 13px; line-height: 1.7; color: #4a5f52; text-align: center; }

/* 注册框：性别／民族（同手机端 grid 排法） */
.rg-lab { margin: 2px 0 8px; color: #0f7a45; font-size: 14px; letter-spacing: 1px; }
.rg-races { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.rg-races label {
  display: flex; align-items: center; justify-content: center; min-height: 36px;
  border-radius: 5px; cursor: pointer; font-size: 15px; letter-spacing: 0;
  background: rgba(0, 20, 8, .72); color: #7fd39c;
  border: 1px solid rgba(0, 120, 60, .7);
}
.rg-races label.on {
  background: rgba(8, 44, 26, .92); color: #f6ecd8;
  border-color: #c9a961; box-shadow: inset 0 1px 0 rgba(255, 235, 180, .25);
}
.rg-two { grid-template-columns: repeat(2, 1fr); }

/* ── 页脚 ── */
.pg-ft {
  margin-top: 8px; padding: 18px 0 20px; text-align: center; font-size: 14.5px; color: #4a4f49; line-height: 1.8;
  background: transparent;
  border-top: 1px solid rgba(60, 52, 40, .22);
}
.pg-ft-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 6px 0; }
.pg-ft-links a {
  display: inline-block; padding: 5px 16px; font-size: 14px; color: #8c2f24; text-decoration: none;
  border: 1px solid rgba(140, 47, 36, .45); border-radius: 4px; background: rgba(255, 255, 255, .55);
}
.pg-ft-links a:hover { background: #8c2f24; color: #fff; }
.pg-ft-copy { margin: 0; font-size: 13.5px; color: #8a8a8a; }

/* ── 风云天条弹窗 ── */
#tt-mask { display: none; position: fixed; inset: 0; z-index: 60; align-items: center; justify-content: center; background: rgba(20, 18, 14, .5); }
#tt-mask.show { display: flex; }
#tt-box {
  width: min(760px, 92vw); max-height: 84vh; overflow: auto;
  background: linear-gradient(160deg, #f8fbf5 0%, #eff6ea 45%, #e5efdf 100%);
  border: 1px solid rgba(140, 47, 36, .18); border-radius: 10px;
  padding: 26px 32px 20px; text-align: left; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  font-family: inherit; font-size: 15px; line-height: 1.85; color: #1f2328;
}
#tt-box h2 { margin: 0 0 14px; font-size: 22px; color: #111417; letter-spacing: 4px; text-align: center; }
#tt-box h3 { margin: 18px 0 6px; font-size: 17px; color: #8c2f24; letter-spacing: 2px; }
#tt-box p { margin: 6px 0; }
#tt-close-wrap { text-align: center; margin-top: 18px; }
#tt-close {
  padding: 8px 34px; font-family: inherit; font-size: 16px; letter-spacing: 3px;
  color: #8c2f24; background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(140, 47, 36, .45); border-radius: 5px; cursor: pointer;
}
#tt-close:hover { background: #8c2f24; color: #fff; }

/* ── 进游戏后：登录层收起，MUD 界面接管 ──
   注意：登录期间**不能**把 #container 设成 display:none ——
   xterm 的 fit() 会因为拿不到尺寸算出小数并抛「This API only accepts integers」，
   整个页面的初始化就断在那儿（ws 都连不上、按钮全哑）。所以改成布局照旧、只是被登录层盖住且不响应点击。 */
body:not(.in-game) #container { pointer-events: none; }
/* 登录层还盖着的时候，浮窗（地图/常用/互动三囊方向）不许露出来 —— 它们 z-index 比登录层高 */
body:not(.in-game) .map-win,
body:not(.in-game) .cv-win,
body:not(.in-game) .fy-pane { display: none !important; }
body.in-game #pg-shell { display: none !important; }

/* 窄屏（电脑小窗）收一收 */
@media (max-width: 900px) {
  .pg-wrap { height: 74px; gap: 18px; }
  .pg-logo { height: 56px; }
  .pg-menu { gap: 14px; overflow-x: auto; }
  .pg-menu a { font-size: 16px; }
  .pg-card { width: min(400px, 94vw); }
  .pg-card.pg-wide { width: min(460px, 94vw); padding: 16px 14px 12px; }
}

:root {
  --hp-nav-h: 96px;
  --hp-ft-min: 118px;
  --hp-ink: #111417;
  --hp-body: #1f2328;
  --hp-dim: #5f5f5f;
  --hp-accent: #8c2f24;
  --hp-line: rgba(0, 0, 0, .12);
  --hp-text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

:root {
  --hp-nav-h: 96px;
  --hp-ft-min: 118px;
  --hp-ink: #111417;
  --hp-body: #1f2328;
  --hp-dim: #5f5f5f;
  --hp-accent: #8c2f24;
  --hp-line: rgba(0, 0, 0, .12);
  --hp-text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

/* ── 顶栏/底栏样式与官网 home2026.css 逐条一致 ── */
.hp-nav { flex: 0 0 auto; }
.hp-wrap { width: min(1200px, 94vw); margin: 0 auto; }
.hp-nav { position: sticky; top: 0; z-index: 20;
  background: transparent;
  border-bottom: 1px solid rgba(60, 52, 40, .22); }
.hp-nav-inner, .hp-ft > .hp-wrap { position: relative; z-index: 1; }
.hp-nav-inner { display: flex; align-items: center; gap: 44px; height: var(--hp-nav-h); }
.hp-logo-a { display: block; flex: 0 0 auto; }
.hp-logo { display: block; height: 76px; width: auto; }
.hp-menu { display: flex; align-items: center; gap: 28px; flex: 1 1 auto; }
.hp-menu a { color: var(--hp-body); text-decoration: none; font-size: 19px; letter-spacing: 1px;
  padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.hp-menu a:hover { color: var(--hp-accent); }
.hp-menu a.on { color: var(--hp-accent); font-weight: 700; border-bottom-color: var(--hp-accent); }
.hp-login { flex: 0 0 auto;
  color: var(--hp-accent); text-decoration: none; font-size: 17px; letter-spacing: 2px;
  padding: 8px 26px; border: 1px solid var(--hp-accent); border-radius: 4px;
  background: rgba(255, 255, 255, .72); }
.hp-login:hover { background: var(--hp-accent); color: #fff; }
.hp-ft { position: relative;
  margin-top: 0; padding: 10px 0 22px;      
  min-height: var(--hp-ft-min);
  background: transparent;
  border-top: 1px solid rgba(60, 52, 40, .22);
  text-align: center; font-size: 13px; color: #3d423c; line-height: 1.5; }
.hp-ft > .hp-wrap { width: min(1200px, 94vw); }
.hp-ft-legal { margin: 0; font-size: 14px; line-height: 1.7; }
.hp-ft-copy { margin: 0; font-size: 13.5px; line-height: 1.6; }
.hp-ft-legal, .hp-ft-copy, .hp-ft-links { text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
.hp-ft-legal { margin: 0; }
.hp-tiantiao { color: #b23b2e; font-weight: 700; cursor: pointer; }
.hp-tiantiao:hover { text-decoration: underline; }
.hp-ft-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 6px 0 6px; }
.hp-ft-links a { display: inline-block; padding: 5px 16px; font-size: 14.5px; line-height: 1.6;
  color: var(--hp-accent); text-decoration: none;
  border: 1px solid rgba(140, 47, 36, .45); border-radius: 4px;
  background: rgba(255, 255, 255, .55); }
.hp-ft-links a:hover { background: var(--hp-accent); color: #fff; border-color: var(--hp-accent); }
.hp-ft-copy { margin: 0; font-size: 14px; color: #8a8a8a; }
.hp-me { flex: 0 0 auto; color: var(--hp-body); font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.hp-me-lv { color: var(--hp-accent); }
.hp-logout { font-size: 15px; letter-spacing: 1px; padding: 6px 16px; }
