/* 登录页：直接用用户提供的 denglu.jpg 作为背景，上面加一个登录框 */
@font-face {
  font-family: "MaShanZheng";
  src: url('../fonts/mashanzheng.ttf') format('truetype');
  font-display: swap;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft YaHei", "STKaiti", "KaiTi", serif; }

html, body { width: 100vw; height: 100vh; overflow: hidden; }
body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #000;
}

/* 背景底图：用户提供的 denglu.jpg 战争沙盘，铺满 */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background: url('../img/denglu.jpg') no-repeat center center / cover;
}

/* ===== 音频控制条 ===== */
.audio-bar {
  position: fixed; top: 14px; right: 14px; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(220,180,100,0.5);
  border-radius: 22px; padding: 5px 10px; backdrop-filter: blur(3px);
}
.a-btn {
  background: none; border: none; cursor: pointer; color: #f5e6c8;
  display: flex; align-items: center; gap: 4px; padding: 2px 6px;
  border-radius: 14px; font-size: 15px;
}
.a-btn:hover { background: rgba(255,255,255,0.12); }
.a-ico { font-size: 16px; line-height: 1; }
.a-dot { width: 7px; height: 7px; border-radius: 50%; background: #7ce38b; }
.a-btn.off .a-dot { background: #d9534f; }
.a-btn.off .a-ico { opacity: 0.4; }
.a-vol { display: flex; align-items: center; gap: 4px; }
.a-vol-ico { font-size: 13px; }
.a-vol input[type=range] { width: 70px; accent-color: #d9b15c; cursor: pointer; }

/* ===== 登录弹窗（参考 denglu 图上的登录框） =====
   面板：暖色古铜底，古铜色描边+内框
   输入框：米白(橄榄白)底 + 古铜描边 + 左侧图标
   按钮：左=铜橙 右=金黄
*/
.login-box {
  position: relative; z-index: 10;
  width: 440px;
  background: linear-gradient(180deg, rgba(240,229,202,0.96), rgba(224,209,176,0.94));
  border: 2px solid #9c7a3e;
  border-radius: 16px;
  padding: 40px 40px 26px;
  box-shadow:
    0 0 0 4px rgba(60,40,10,0.35),
    0 0 0 7px rgba(200,160,80,0.35),
    0 18px 50px rgba(0,0,0,0.65),
    0 0 30px rgba(255,200,90,0.25);
}
.login-box::before {
  content: "";
  position: absolute;
  left: 50%; top: -2px; transform: translateX(-50%);
  width: 120px; height: 5px;
  background: linear-gradient(90deg, transparent, #d9a53a, #ffd066, #d9a53a, transparent);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 0 10px rgba(255,208,102,0.5);
}

/* 输入框 - 参考 denglu：米白底、古铜描边、左侧图标 */
.field {
  position: relative; display: flex; align-items: center;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #d7dcc0, #c3cbA8);  /* 米白橄榄底 */
  border: 1px solid #9a7d46;
  border-radius: 10px;
  height: 55px;
  box-shadow: inset 0 2px 4px rgba(90,70,30,0.18);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within {
  border-color: #e0a93a;
  box-shadow: inset 0 2px 4px rgba(90,70,30,0.12), 0 0 0 3px rgba(255,208,102,0.35);
}
.f-ico {
  padding-left: 16px; font-size: 18px; color: #6b5628;
  opacity: 0.85;
}
.field input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 0 14px; height: 100%;
  font-size: 17px; color: #2a2418; letter-spacing: 1px;
  font-family: inherit;
}
.field input::placeholder { color: #8a7e5e; }

.msg {
  min-height: 20px; text-align: center; font-size: 14px; margin: 4px 0 14px;
}
.msg.error { color: #c83030; font-weight: bold; }
.msg.ok { color: #2a7040; font-weight: bold; }

/* 按钮 - 参考 denglu：左=铜橙 右=金黄 */
.btn-group { display: flex; gap: 18px; justify-content: center; }
.btn {
  flex: 1; height: 58px;
  border-radius: 12px; font-size: 21px; font-weight: bold; letter-spacing: 6px;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .12s, filter .2s, box-shadow .2s;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 7px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.btn-login {
  background: linear-gradient(180deg, #e89a52, #c56a2e);  /* 铜橙 */
  color: #fff;
  border: 1px solid #8a5a1e;
  border-bottom: 3px solid #7a4d18;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.btn-register {
  background: linear-gradient(180deg, #f3d68e, #d9b065);  /* 金黄 */
  color: #5a3c12;
  border: 1px solid #a87c34;
  border-bottom: 3px solid #96702c;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.box-tip {
  text-align: center; font-size: 12px; color: #8f7f57;
  margin-top: 18px;
  letter-spacing: 1px;
}

/* 小屏适配 */
@media (max-width: 600px) {
  .login-box { width: 92vw; padding: 34px 22px 20px; }
  .btn { height: 52px; font-size: 19px; }
  .field { height: 50px; }
}

/* 手机适配（更细粒度） */
@media (max-width: 480px) {
  html, body { overflow: hidden; }
  /* 音频条：顶部居中，收窄 */
  .audio-bar { top: 12px; right: auto; left: 50%; transform: translateX(-50%); gap: 4px; padding: 4px 10px; }
  .audio-bar .a-vol input[type=range] { width: 52px; }
  /* 登录框：更紧凑，贴合小屏高度 */
  .login-box { width: 90vw; padding: 30px 20px 18px; border-radius: 14px; }
  .field { height: 50px; margin-bottom: 14px; }
  .field input { font-size: 16px; }
  .f-ico { padding-left: 13px; font-size: 16px; }
  .btn { height: 50px; font-size: 18px; letter-spacing: 4px; border-radius: 10px; }
  .btn-group { gap: 12px; }
  .box-tip { font-size: 11px; margin-top: 14px; }
  .msg { margin: 2px 0 10px; font-size: 13px; }
}

/* 超小屏（如 iPhone SE）兜底：允许纵向滚动防溢出 */
@media (max-height: 560px) {
  html, body { overflow: hidden; }
  .login-box { padding: 18px 20px 14px; transform: scale(0.92); }
  .field { margin-bottom: 10px; height: 46px; }
  .btn { height: 46px; }
}
