/* H5 游戏门户样式（index.html / login.html 共用） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eef2ff 0%, #f6f8fd 40%, #eef1f6 100%);
  color: #222;
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== 游戏大厅 ===== */
.hall-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(30,50,100,.06);
  position: sticky; top: 0; z-index: 20;
}
.hall-top .logo { font-size: 17px; font-weight: 800; background: linear-gradient(120deg,#4a6cf7,#8a5cf7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.userbox { display: flex; align-items: center; gap: 10px; }
.uname { font-size: 13px; color: #555; max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.logout { border: 1px solid #dde3f0; background: #fff; color: #666; font-size: 12px; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.logout:active { background: #f0f3fa; }
.hero { text-align: center; padding: 26px 16px 8px; }
.hero h2 { margin: 0 0 6px; font-size: 22px; }
.hero p { margin: 0; color: #8a93a8; font-size: 13px; }
.hall { max-width: 640px; margin: 0 auto; padding: 6px 16px 40px; }
.sec-title { font-size: 15px; font-weight: 700; margin: 18px 4px 10px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff; border-radius: 16px; overflow: hidden; cursor: pointer;
  box-shadow: 0 3px 12px rgba(30,50,100,.08);
  transition: transform .12s;
}
.card:active { transform: scale(.97); }
.cover { height: 84px; display: flex; align-items: center; justify-content: center; position: relative; }
.cicon { font-size: 38px; }
.ctag {
  position: absolute; top: 8px; right: 8px; font-size: 10px; color: #fff;
  background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 8px;
}
.meta { padding: 10px 12px 12px; }
.cname { font-size: 14px; font-weight: 700; }
.cdesc { font-size: 11px; color: #98a1b3; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hall-foot { text-align: center; color: #b3bac9; font-size: 11px; padding: 10px 0 26px; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px;
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 22px;
  padding: 34px 26px 26px; box-shadow: 0 10px 34px rgba(30,50,100,.12);
}
.login-card .logo { font-size: 42px; text-align: center; }
.login-card h1 { text-align: center; font-size: 21px; margin: 8px 0 4px; }
.login-card .sub { text-align: center; color: #98a1b3; font-size: 12px; margin: 0 0 22px; }
.field {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #e2e7f2; border-radius: 12px; padding: 0 12px; height: 46px; margin-bottom: 12px;
  background: #fafbfe;
}
.field:focus-within { border-color: #4a6cf7; box-shadow: 0 0 0 3px rgba(74,108,247,.12); }
.prefix { color: #666; font-size: 14px; }
.field input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: #222; min-width: 0;
}
.field .send {
  border: none; background: none; color: #4a6cf7; font-size: 13px;
  white-space: nowrap; cursor: pointer; padding: 4px 0;
}
.field .send:disabled { color: #b0b8c9; }
.primary {
  width: 100%; height: 46px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(120deg, #6a8dff, #4a6cf7);
  color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(74,108,247,.35);
  margin-top: 6px;
}
.primary:active { transform: scale(.98); }
.primary:disabled { opacity: .6; }
.agree { text-align: center; color: #b3bac9; font-size: 11px; margin: 12px 0 0; }
.hint {
  text-align: center; color: #e6542c; font-size: 12px; margin: 8px 0 0;
  background: #fff3ef; border-radius: 8px; padding: 6px 10px;
}
.hint:empty { display: none; }
.login-foot { text-align: center; color: #b3bac9; font-size: 11px; margin-top: 26px; }

/* ===== 轻提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px);
  background: rgba(30,35,50,.9); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 200; max-width: 82vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
