#account-overlay {
  --account-scale: 1;
  position: fixed;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  color: #3a2519;
  background: rgba(24, 17, 12, 0.72);
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#account-overlay * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.account-window-shell {
  width: 582px;
  flex: 0 0 582px;
  transform: scale(var(--account-scale));
  transform-origin: center;
}

.account-window {
  position: relative;
  width: 582px;
  min-height: 560px;
  padding: 61px 54px 42px;
  background: url("../../../resources/img/battleUI/giveUpDialog/bg.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 16px 12px rgba(24, 13, 7, 0.48));
  animation: account-window-enter 180ms ease-out both;
}

.account-window.is-compact {
  min-height: 500px;
}

.account-close {
  position: absolute;
  top: 27px;
  right: 31px;
  width: 54px;
  height: 52px;
  padding: 0;
  border: 0;
  background: url("../../../resources/img/pvpUI/close.png") center / contain no-repeat;
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.account-close:hover { transform: rotate(5deg) scale(1.05); }
.account-close:active { transform: translateY(3px) scale(0.94); }

.account-seal {
  position: absolute;
  top: -37px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border: 6px solid #43271b;
  border-radius: 50%;
  color: #fff3cb;
  background: #9b3e31;
  box-shadow: inset 0 0 0 5px #d79a58, 0 5px 0 rgba(61, 34, 21, 0.28);
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%) rotate(-3deg);
  animation: account-seal-float 1700ms steps(5, end) infinite;
}

.account-heading { text-align: center; }

.account-title-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 310px;
  height: 72px;
  margin: 0 auto;
  background: url("../../../resources/img/pvpUI/titleShadow.png") center / 100% 100% no-repeat;
}

.account-title-ribbon h2 {
  margin: -4px 0 0;
  color: #3b2016;
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 2px 0 #f5dfae;
}

.account-kicker {
  min-height: 30px;
  margin: 8px 0 0;
  color: #7c4b27;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 330px;
  height: 54px;
  margin: 11px auto 3px;
  border: 3px solid #5e3926;
  border-radius: 6px;
  overflow: hidden;
  background: #d7bf8f;
}

.account-tab {
  border: 0;
  color: #573725;
  background: transparent;
  font-family: inherit;
  font-size: 25px;
  font-weight: 800;
  cursor: pointer;
}

.account-tab + .account-tab { border-left: 3px solid #5e3926; }

.account-tab.is-active {
  color: #fff8dc;
  background: #8d362c;
  text-shadow: 0 2px 0 #3b2117;
}

.account-field-label {
  margin: 9px 0 0;
  color: #4b2d1e;
  font-size: 21px;
  font-weight: 800;
  text-align: center;
}

.account-input-panel,
.account-info-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 466px;
  min-height: 116px;
  margin: 7px auto 5px;
  padding: 21px 38px 27px;
  background: url("../../../resources/img/pvpUI/panelBg.png") center / 100% 100% no-repeat;
}

.account-info-panel {
  min-height: 132px;
  flex-direction: column;
  gap: 10px;
}

.account-input-panel.is-code {
  min-height: 98px;
  padding-top: 17px;
  padding-bottom: 23px;
}

.account-field {
  width: 100%;
  height: 58px;
  padding: 6px 15px 4px;
  border: 3px solid #5e3926;
  border-radius: 5px;
  outline: 0;
  color: #321e14;
  background: #f7e9c8;
  box-shadow: inset 0 4px 0 rgba(115, 74, 42, 0.16);
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  text-align: center;
  user-select: text;
}

.account-field:focus {
  border-color: #8a3025;
  box-shadow: inset 0 4px 0 rgba(115, 74, 42, 0.16), 0 0 0 3px rgba(198, 145, 57, 0.4);
}

.account-code-field {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-retry-link { margin-top: 5px; }

.account-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 466px;
  margin: 2px auto 6px;
  color: #4b2d1e;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.account-remember input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #8d362c;
  cursor: pointer;
}

.account-hint {
  min-height: 25px;
  margin: 2px 0 4px;
  color: #795739;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

.account-feedback {
  min-height: 28px;
  margin: 0;
  color: #8e3026;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.account-feedback.is-ok { color: #37653b; }

.account-actions {
  display: grid;
  grid-template-columns: 228px 228px;
  justify-content: center;
  gap: 8px 17px;
  margin-top: 3px;
}

.account-actions-gm {
  grid-template-columns: 196px 196px;
  gap: 12px;
  margin-bottom: 2px;
}

/* 只有一个按钮（未激活账号没有「打开修改器」）时别留空格子 */
.account-actions-gm.is-single { grid-template-columns: 196px; }

/* 激活权益清单：整块跟着窗口一起缩放，不做内部滚动
 * （DOM 面板叠在 Laya 上、overlay 带 touch-action，内层 overflow 在安卓 WebView 里滚不动） */
.account-perk-list {
  width: 466px;
  margin: 8px auto 5px;
  padding: 4px 14px;
  list-style: none;
  border: 3px solid #5e3926;
  border-radius: 6px;
  background: rgba(255, 248, 230, 0.92);
  box-shadow: inset 0 4px 0 rgba(115, 74, 42, 0.1);
  text-align: left;
}

.account-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 2px;
  border-top: 1px dashed rgba(94, 57, 38, 0.26);
}

.account-perk:first-child { border-top: 0; }

.account-perk-mark {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  margin-top: 1px;
  border: 2px solid #a0958a;
  border-radius: 50%;
  color: #8d7f74;
  font: 700 15px/21px Arial, sans-serif;
  text-align: center;
}

.account-perk.is-on .account-perk-mark {
  border-color: #37653b;
  color: #37653b;
}

.account-perk-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.account-perk-body strong {
  color: #4b2a1b;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.account-perk-body span {
  color: #6d4a30;
  font-size: 17px;
  line-height: 1.36;
  word-break: break-word;
}

.account-perk.is-on .account-perk-body strong { color: #8a3025; }

.account-gm-log-panel {
  width: 466px;
  max-height: 280px;
  margin: 8px auto 4px;
  padding: 12px 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 3px solid #5e3926;
  border-radius: 6px;
  background: rgba(255, 248, 230, 0.92);
  touch-action: pan-y;
}

.account-gm-log-text {
  margin: 0;
  color: #3b2016;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.account-actions.is-single { grid-template-columns: 228px; }
.account-actions.is-secondary { grid-template-columns: 196px 196px; gap: 12px; }

.account-game-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 228px;
  height: 104px;
  padding: 0 12px 8px;
  border: 0;
  color: #fff;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-family: inherit;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  text-shadow: -2px -2px 0 #342018, 2px -2px 0 #342018, -2px 2px 0 #342018, 2px 2px 0 #342018;
  cursor: pointer;
  transition: transform 90ms ease-out, filter 90ms ease-out;
}

.account-game-btn.is-blue { background-image: url("../../../resources/img/pvpUI/blueBtn.png"); }
.account-game-btn.is-red { background-image: url("../../../resources/img/pvpUI/redBtn.png"); }

.account-game-btn.is-small {
  width: 196px;
  height: 90px;
  gap: 6px;
  padding: 0 10px 7px;
  font-size: 24px;
}

.account-game-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.account-game-btn:active:not(:disabled) { filter: brightness(0.92); transform: translateY(5px) scale(0.98); }
.account-game-btn:disabled { filter: grayscale(0.8); opacity: 0.56; cursor: default; }

.account-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: Arial, sans-serif;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.account-server-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  margin: -2px auto 0;
  padding: 0 8px;
  border: 0;
  color: #68452e;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.account-server-link img {
  width: 25px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
}

.account-email {
  max-width: 390px;
  overflow: hidden;
  color: #3b2117;
  font-family: Arial, sans-serif;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-client-version {
  color: #765238;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.account-version-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 466px;
  margin: 20px auto 12px;
  padding: 23px 28px 27px;
  background: url("../../../resources/img/pvpUI/panelBg.png") center / 100% 100% no-repeat;
}

.account-version-panel div {
  min-width: 0;
  text-align: center;
}

.account-version-panel span,
.account-version-panel strong {
  display: block;
}

.account-version-panel span {
  color: #765238;
  font-size: 17px;
  font-weight: 700;
}

.account-version-panel strong {
  margin-top: 5px;
  overflow: hidden;
  color: #44271a;
  font-family: Arial, sans-serif;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-update-message {
  width: 430px;
  min-height: 32px;
  margin: 0 auto 8px;
  color: #8e3026;
  font-size: 21px;
  line-height: 1.45;
  font-weight: 800;
  text-align: center;
}

.account-update-actions {
  gap: 1px;
}

.account-sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #5d402c;
  font-size: 20px;
  font-weight: 800;
}

.account-status-dot {
  width: 15px;
  height: 15px;
  border: 3px solid #4c2c1d;
  border-radius: 50%;
  background: #7ab15f;
}

.account-status-dot.is-pending { background: #d5a13d; animation: account-dot-pulse 650ms steps(3, end) infinite; }
.account-status-dot.is-offline,
.account-status-dot.is-error { background: #ad493b; }

.account-confirm-copy {
  width: 420px;
  margin: 25px auto 28px;
  color: #5c3825;
  font-size: 25px;
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
}

.account-loading-mark {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 23px auto 15px;
}

.account-loading-mark::before,
.account-loading-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 8px solid #853027;
  transform: rotate(45deg);
  animation: account-loading-pulse 720ms steps(4, end) infinite alternate;
}

.account-loading-mark::after {
  inset: 29px;
  border-color: #d7a43b;
  animation-delay: 180ms;
}

@keyframes account-window-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes account-seal-float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg); }
  50% { transform: translateX(-50%) translateY(-4px) rotate(2deg); }
}

@keyframes account-dot-pulse {
  from { opacity: 0.45; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes account-loading-pulse {
  from { opacity: 0.42; transform: rotate(45deg) scale(0.78); }
  to { opacity: 0.95; transform: rotate(45deg) scale(1); }
}

.account-window.is-purchase { min-height: 760px; padding-left: 48px; padding-right: 48px; }
.account-window.is-payment { min-height: 650px; }
.account-window.is-payment-method { min-height: 620px; }
.account-package-loading,
.account-package-empty {
  width: 440px;
  min-height: 180px;
  margin: 22px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #765036;
  font-size: 23px;
  font-weight: 800;
}
.account-package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 474px;
  margin: 13px auto 8px;
}
.account-package-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 150px;
  padding: 12px 13px 10px;
  border: 3px solid #654029;
  border-radius: 6px;
  background: #efd9a7;
  box-shadow: inset 0 3px 0 #fff1c8, 0 4px 0 #8b5b36;
}
.account-package-card.is-vip {
  border-color: #8d3b31;
  background: #f0c9a0;
}
.account-package-name { color: #4b2a1b; font-size: 23px; font-weight: 900; }
.account-package-description {
  margin: 5px 0 8px;
  color: #765035;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.account-package-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.account-package-footer strong { color: #a33728; font: 900 24px/1 Arial, sans-serif; }
.account-package-buy {
  width: 76px;
  height: 42px;
  border: 3px solid #4e2c1c;
  border-radius: 5px;
  color: #fff5d4;
  background: #a84638;
  box-shadow: inset 0 2px 0 #e88c6f, 0 3px 0 #5a2f20;
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.account-package-buy:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 2px 0 #e88c6f; }
.account-package-buy:disabled { filter: grayscale(0.8); opacity: 0.55; }
.account-payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 430px;
  margin: 20px auto 14px;
  padding: 17px 22px;
  border: 3px solid #69432b;
  border-radius: 6px;
  background: #f3dfb0;
  box-shadow: inset 0 3px 0 #fff2cc, 0 4px 0 #8b5b36;
}
.account-payment-summary span { color: #765035; font-size: 20px; font-weight: 800; }
.account-payment-summary strong { color: #a33728; font: 900 31px/1 Arial, sans-serif; }
.account-payment-methods { display: grid; gap: 14px; width: 430px; margin: 0 auto 18px; }
.account-payment-method {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  padding: 9px 16px;
  border: 4px solid #4d2e20;
  border-radius: 7px;
  color: #3f291e;
  background: #f8e9bf;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.65), 0 5px 0 #825438;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.account-payment-method:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.65), 0 1px 0 #825438; }
.account-payment-method-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px solid #4d2e20;
  border-radius: 50px;
  color: #fff;
  background: #2589d8;
  font-size: 29px;
  font-weight: 900;
}
.account-payment-method.is-wechat .account-payment-method-icon { background: #2ba84a; }
.account-payment-method > span:nth-child(2) { display: grid; gap: 3px; }
.account-payment-method strong { font-size: 23px; }
.account-payment-method small { color: #806043; font-size: 15px; font-weight: 700; }
.account-payment-method b { font-size: 31px; }
.account-payment-note { margin: 12px 16px 6px; color: #765035; font-size: 16px; text-align: center; }
.account-payment-order {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 12px 10px;
  width: 440px;
  min-height: 240px;
  margin: 18px auto 10px;
  padding: 24px 28px;
  border: 4px solid #64402a;
  border-radius: 7px;
  background: #f3dfb0;
  box-shadow: inset 0 4px 0 #fff2cc, 0 5px 0 #8b5b36;
}
.account-payment-order span { color: #775137; font-size: 19px; font-weight: 800; }
.account-payment-order strong {
  overflow-wrap: anywhere;
  color: #45291b;
  font: 800 17px/1.25 ui-monospace, "SFMono-Regular", Menlo, monospace;
}
.account-payment-order b { color: #a33728; font: 900 34px/1 Arial, sans-serif; }
.account-payment-order em { color: #8e4a2c; font-size: 22px; font-style: normal; font-weight: 900; }
.account-payment-order em.is-paid { color: #3b713d; }

@media (prefers-reduced-motion: reduce) {
  .account-window,
  .account-seal,
  .account-status-dot,
  .account-loading-mark::before,
  .account-loading-mark::after { animation: none; }
}
