html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #61cfe1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#GameCanvas, #splash {
  display: none;
}

#account-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  color: #55301f;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,210,.9) 0 4%, rgba(91,255,159,.5) 5% 19%, transparent 36%),
    radial-gradient(ellipse at 16% 25%, rgba(255,255,255,.8) 0 12%, transparent 13%),
    radial-gradient(ellipse at 86% 35%, rgba(255,255,255,.72) 0 15%, transparent 16%),
    linear-gradient(180deg, #43a8de 0%, #65dbe2 48%, #7adc65 78%, #43a64c 100%);
}

#account-gate[hidden],
.account-field[hidden] {
  display: none !important;
}

#account-gate::before,
#account-gate::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -12%;
  height: 42%;
  border-radius: 50% 50% 0 0;
  background: rgba(65, 166, 70, .55);
  transform: rotate(-3deg);
}

#account-gate::after {
  bottom: -24%;
  background: rgba(28, 115, 56, .45);
  transform: rotate(5deg);
}

.account-card {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  padding: 30px 28px 26px;
  box-sizing: border-box;
  border: 3px solid #784121;
  border-radius: 22px;
  background: rgba(255, 244, 210, .96);
  box-shadow: 0 16px 45px rgba(26, 74, 70, .38), inset 0 0 0 4px rgba(255,255,255,.55);
}

.account-logo {
  margin: 0 0 4px;
  text-align: center;
  color: #d1711f;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: 3px;
}

.account-subtitle {
  margin: 0 0 22px;
  text-align: center;
  color: #8a5a3b;
  font-size: 14px;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.account-tab {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  background: #ead4aa;
  color: #74482e;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.account-tab.active {
  background: #d7792b;
  color: white;
  box-shadow: inset 0 -3px 0 rgba(107, 48, 18, .3);
}

.account-field {
  display: block;
  margin-bottom: 14px;
  color: #704329;
  font-size: 14px;
  font-weight: 700;
}

.account-field input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  box-sizing: border-box;
  border: 2px solid #c69a64;
  border-radius: 10px;
  outline: none;
  background: #fffdf4;
  color: #4f3428;
  font: inherit;
  font-size: 16px;
}

.account-field input:focus {
  border-color: #db792a;
  box-shadow: 0 0 0 3px rgba(219, 121, 42, .16);
}

#account-submit {
  width: 100%;
  margin-top: 5px;
  padding: 14px 18px;
  border: 2px solid #8a431d;
  border-radius: 12px;
  background: linear-gradient(#ffbe4f, #ee7e25);
  color: white;
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #9d481d;
  cursor: pointer;
}

#account-submit:disabled {
  cursor: wait;
  filter: grayscale(.35);
  opacity: .7;
}

#account-message {
  min-height: 20px;
  margin: 15px 0 0;
  color: #c33e2f;
  text-align: center;
  font-size: 14px;
}

.account-note {
  margin: 10px 0 0;
  color: #907056;
  text-align: center;
  font-size: 12px;
}

@media (max-height: 600px) {
  .account-card { padding: 18px 24px; }
  .account-logo { font-size: 28px; }
  .account-subtitle { margin-bottom: 12px; }
  .account-field { margin-bottom: 9px; }
  .account-field input { padding: 9px 12px; }
}
