#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-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-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.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-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); }
}

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