/* ============================================================
   登录 / 注册弹窗（点「在线玩」未登录时弹出，不跳页）
   只作用于首页，独立文件，避免和 home.css 的布局规则互相影响
   ============================================================ */
.hp-modal[hidden] { display: none !important; }
.hp-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;                 /* 高于 logo(9999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hp-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, .62);
  backdrop-filter: blur(3px);
}
.hp-modal-card {
  position: relative;
  width: 380px;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 22px 22px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--hp-line, #e8eaef);
  box-shadow: 0 24px 60px rgba(6, 12, 24, .45);
  animation: hpModalIn .2s ease both;
}
@keyframes hpModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.hp-modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #98a0ad;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.hp-modal-x:hover { background: #f1f3f8; color: #1f2430; }

.hp-modal-tabs {
  display: flex;
  gap: 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--hp-line, #e8eaef);
}
.hp-tab {
  padding: 8px 2px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #7b8494;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
  cursor: pointer;
}
.hp-tab.is-on { color: var(--hp-brand, #3f6bff); border-bottom-color: var(--hp-brand, #3f6bff); }

.hp-modal-form { display: block; }
.hp-modal-form[hidden] { display: none !important; }
.hp-field { display: block; margin-bottom: 14px; }
.hp-field > span { display: block; font-size: 13px; color: #7b8494; margin-bottom: 6px; }
.hp-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 15px;
  color: #1f2430;
  border: 1px solid var(--hp-line, #e8eaef);
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}
.hp-field input:focus { border-color: var(--hp-brand, #3f6bff); box-shadow: 0 0 0 3px rgba(63, 107, 255, .12); outline: 0; }
.hp-pass { position: relative; display: block; }
.hp-pass input { padding-right: 42px; }
.hp-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #9aa1ad;
  font-size: 15px;
  cursor: pointer;
}
.hp-eye:hover { background: #f1f3f8; color: var(--hp-brand, #3f6bff); }

.hp-modal-submit { width: 100%; margin-top: 4px; height: 44px; border-radius: 10px; border: 1px solid var(--hp-brand, #3f6bff); background: var(--hp-brand, #3f6bff); color: #fff; font: 600 16px/1 -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif; cursor: pointer; }
.hp-modal-submit:hover { filter: brightness(1.06); }
.hp-modal-submit[disabled] { opacity: .6; cursor: default; }

.hp-alert { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: #e0483b; }
.hp-alert.ok { color: #1a9d5a; }
.hp-alert:empty { display: none; }

@media screen and (max-width: 480px) {
  .hp-modal-card { width: 100%; padding: 18px 16px 14px; border-radius: 14px; }
  .hp-field input { font-size: 16px; }   /* 防 iOS 聚焦缩放 */
}

/* 弹窗按钮（原来没有样式，浏览器默认灰按钮） */
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin-top: 6px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.hp-btn-primary {
  background: linear-gradient(180deg, #5b86ff, #3f6bf0);
  color: #fff;
  box-shadow: 0 8px 18px rgba(63, 107, 240, .28);
}

.hp-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 22px rgba(63, 107, 240, .34); }
.hp-btn-primary:active { transform: translateY(1px); filter: brightness(.98); }
.hp-btn:disabled { opacity: .62; cursor: default; box-shadow: none; }

/* 弹窗里的提示文案 */
.hp-alert { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: #e5484d; }
.hp-alert:empty { display: none; }
