:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #111512;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body, canvas, div {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body { background: #111512; }

[hidden] { display: none !important; }

.auth-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
  background: #111512;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 10, .96) 0%, rgba(8, 12, 10, .72) 46%, rgba(8, 12, 10, .9) 100%),
    url("assets/bundle/native/11/118647220.png") center / cover no-repeat;
  filter: saturate(.72) contrast(1.06);
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  padding: 34px 36px 32px;
  border: 1px solid rgba(207, 180, 112, .3);
  border-radius: 8px;
  background: rgba(18, 23, 19, .94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .52);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  text-align: left;
}

.brand-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #b99b58;
  color: #dcc47d;
  font-size: 25px;
}

.brand h1 {
  margin: 0 0 5px;
  color: #f0e5c4;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand p { margin: 0; color: #919b92; font-size: 13px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  border-bottom: 1px solid #343c35;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #8f9991;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-tab.active { border-bottom-color: #c1a45f; color: #eadcae; }

form { display: grid; gap: 10px; text-align: left; }
form, .password-field, .confirm-group { min-width: 0; }

label { color: #bcc4bd; font-size: 13px; }

input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #3b463d;
  border-radius: 4px;
  outline: none;
  color: #eef2ee;
  background: #101511;
  font: inherit;
  user-select: text;
}

input:focus { border-color: #b89b58; box-shadow: 0 0 0 3px rgba(184, 155, 88, .12); }
input::placeholder { color: #626c64; }

.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  border: 0;
  color: #8d978f;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.confirm-group { display: grid; gap: 10px; }

.auth-message {
  min-height: 20px;
  margin: 2px 0 0;
  color: #e28776;
  font-size: 13px;
  line-height: 20px;
}

.primary-button {
  height: 48px;
  border: 1px solid #d0b36a;
  border-radius: 4px;
  color: #171b17;
  background: #c9ad65;
  font: 600 15px inherit;
  cursor: pointer;
}

.primary-button:hover { background: #ddc47f; }
.primary-button:disabled { cursor: wait; opacity: .62; }

#GameDiv, #Cocos3dGameContainer, #GameCanvas { width: 100%; height: 100%; }
canvas { display: block; background: transparent; }

.logout-button {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  min-width: 64px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, .48);
  cursor: pointer;
}

.cashier {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #17211a;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.cashier-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(5, 9, 6, .78);
  backdrop-filter: blur(6px);
}

.cashier-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(218, 191, 119, .52);
  border-radius: 14px;
  background: #f8f6ef;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}

.cashier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px 20px;
  color: #f4e8c4;
  background: linear-gradient(135deg, #18261c, #263b2b);
}

.cashier-kicker {
  display: block;
  margin-bottom: 4px;
  color: #b9a369;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.cashier-header h2 { margin: 0; font-size: 23px; font-weight: 650; }
.cashier-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #e8e1ce;
  background: rgba(255, 255, 255, .06);
  font-size: 25px;
  line-height: 30px;
  cursor: pointer;
}

.cashier-order {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e5e0d2;
}

.cashier-label { display: block; margin-bottom: 7px; color: #7d837e; font-size: 12px; }
.cashier-order strong { color: #202b23; font-size: 16px; }
.cashier-amount { flex: 0 0 auto; text-align: right; }
.cashier-amount strong { color: #a54a34; font-size: 30px; font-weight: 700; }
.cashier-amount small { margin-right: 3px; font-size: 16px; }

.cashier-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  color: #7b817c;
  background: #f0ede4;
  font-size: 12px;
}
.cashier-meta code {
  min-width: 0;
  overflow: hidden;
  color: #4d574f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cashier-meta button { margin-left: auto; border: 0; color: #7d6730; background: transparent; cursor: pointer; }

.cashier-methods { display: grid; gap: 10px; margin: 0; padding: 22px 26px 8px; border: 0; }
.cashier-methods legend { padding: 0; color: #4b554d; font-size: 13px; font-weight: 600; }
.cashier-method {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid #ddd9ce;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.cashier-method.active { border-color: #af9450; box-shadow: 0 0 0 2px rgba(175, 148, 80, .12); }
.cashier-method input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cashier-method strong, .cashier-method small { display: block; }
.cashier-method strong { margin-bottom: 4px; color: #263029; font-size: 14px; }
.cashier-method small { color: #8a918c; font-size: 11px; }
.cashier-method i { width: 16px; height: 16px; border: 1px solid #c7c9c6; border-radius: 50%; }
.cashier-method.active i { border: 5px solid #ad9149; }
.pay-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 9px; color: #fff; font-weight: 700; }
.pay-icon.wechat { background: #13aa56; }
.pay-icon.alipay { background: #1677ff; }

.cashier-qr { margin: 10px auto 0; text-align: center; }
.cashier-qr img { width: 176px; height: 176px; padding: 8px; border: 1px solid #ddd8ca; background: #fff; object-fit: contain; }
.cashier-qr p { margin: 6px 0 0; color: #777f79; font-size: 12px; }
.cashier-message { min-height: 20px; margin: 15px 26px 12px; color: #6d756f; font-size: 12px; line-height: 20px; text-align: center; }
.cashier-message.error { color: #b54c39; }
.cashier-message.success { color: #22844c; }
.cashier-pay {
  display: block;
  width: calc(100% - 52px);
  height: 50px;
  margin: 0 26px;
  border: 0;
  border-radius: 7px;
  color: #fff9e9;
  background: linear-gradient(135deg, #aa8a43, #c5a759);
  box-shadow: 0 8px 20px rgba(146, 115, 47, .23);
  font: 600 15px inherit;
  cursor: pointer;
}
.cashier-pay:hover { filter: brightness(1.06); }
.cashier-pay:disabled { cursor: wait; filter: grayscale(.45); opacity: .7; }
.cashier-footnote { margin: 13px 26px 20px; color: #969b97; font-size: 10px; line-height: 17px; text-align: center; }

@media (max-width: 520px) {
  .auth-screen { padding: 16px; }
  .auth-panel { padding: 28px 22px 24px; }
  .brand h1 { font-size: 27px; }
  .cashier { padding: 12px; }
  .cashier-panel { max-height: calc(100vh - 24px); }
  .cashier-header { padding: 20px; }
  .cashier-order, .cashier-methods { padding-left: 20px; padding-right: 20px; }
  .cashier-meta { padding-left: 20px; padding-right: 20px; }
  .cashier-pay { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
}
