/* JX21 login / character-select / character-create theme.
   Assets: img/jx21 (extracted from JX21 ui textures, WebP).
   This file overrides the runtime styles injected by app.js, so the JX21
   art and layout win without changing the game logic. */

:root {
  --j21-gold: #e8c37a;
  --j21-gold-deep: #a4712c;
  --j21-ink: #0b0906;
  --j21-panel: rgba(14, 11, 7, .82);
  --j21-line: rgba(226, 186, 112, .38);
}

/* ------------------------------------------------------------------ login */
body.ngate-on #app {
  background: #0b0805 !important;
}
body.ngate-on #app > :not(#modal) {
  opacity: 0 !important;
  pointer-events: none !important;
}
body.ngate-on #app #modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 226, 170, .10) 0%, rgba(8, 6, 4, .30) 46%, rgba(6, 4, 2, .86) 100%),
    linear-gradient(180deg, rgba(6, 4, 2, .40), rgba(6, 4, 2, .80)),
    url(img/jx21/login-bg.webp) center / cover no-repeat !important;
}
body.ngate-on #app #modal::before {
  content: none !important;
  display: none !important;
}
body.ngate-on #modal .mbox {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.ngate-on #modal #mBody {
  width: min(460px, 92vw) !important;
  margin: 0 auto !important;
}
body.ngate-on #modal #mBody::before {
  content: "";
  display: block;
  width: min(430px, 84vw);
  aspect-ratio: 1600 / 520;
  margin: 0 auto 4px;
  background: url(img/jx21/logo.webp) center / contain no-repeat;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .72));
}
.jx21-logo {
  display: block;
  width: min(430px, 82vw);
  height: auto;
  margin: 4px auto 2px;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .72));
  user-select: none;
  pointer-events: none;
}
body.ngate-on #modal #mBody::after {
  content: "GIANG HỒ TÁI KHỞI · BẢN JX21";
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: .28em;
  color: rgba(240, 220, 178, .72);
  margin: 0 0 16px;
}
body.ngate-on #modal .mx,
body.ngate-on #modal #mClose {
  display: none !important;
}

body.ngate-on #modal .ng2 {
  width: 100% !important;
  aspect-ratio: 308 / 197 !important;
  padding: 0 !important;
  background:
    linear-gradient(160deg, rgba(48, 34, 16, .94) 0%, rgba(20, 14, 8, .96) 42%, rgba(8, 6, 4, .97) 100%) !important;
  border: 1px solid var(--j21-line) !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .75),
    0 0 0 5px rgba(150, 108, 48, .12),
    0 18px 48px rgba(0, 0, 0, .72),
    inset 0 0 40px rgba(232, 180, 90, .05) !important;
  backdrop-filter: blur(7px);
}
body.ngate-on #modal .ng2::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(232, 195, 122, .16);
  border-radius: 10px;
  pointer-events: none;
}
body.ngate-on #modal .ng2 .t {
  color: #f6dfae !important;
  font-family: "Palatino Linotype", "Noto Serif", Georgia, serif;
  letter-spacing: .06em;
  text-shadow: 0 0 10px rgba(232, 166, 58, .45), 0 1px 0 #000 !important;
}
body.ngate-on #modal .ng2 .l {
  color: #d8c7a1 !important;
  letter-spacing: .02em;
}
body.ngate-on #modal .ng2 input {
  background: rgba(0, 0, 0, .42) !important;
  border: 1px solid rgba(226, 186, 112, .30) !important;
  border-radius: 5px !important;
  color: #ffe6b0 !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .75) !important;
}
body.ngate-on #modal .ng2 input:focus {
  border-color: var(--j21-gold) !important;
  box-shadow: 0 0 0 1px rgba(232, 195, 122, .35), inset 0 1px 4px #000 !important;
  outline: 0 !important;
}
body.ngate-on #modal .ng2 .cb {
  border: 1px solid rgba(226, 186, 112, .40) !important;
  border-radius: 3px !important;
  background: rgba(0, 0, 0, .35) !important;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.ngate-on #modal .ng2 .cb::after {
  content: "";
  color: #241606;
  font-weight: 900;
  font-size: 3.6cqw;
  line-height: 1;
}
body.ngate-on #modal .ng2 .cb.on {
  background: linear-gradient(#f3d38b, #b4802f) !important;
  border-color: #ffe6ad !important;
  box-shadow: 0 0 10px rgba(232, 176, 74, .55) !important;
}
body.ngate-on #modal .ng2 .cb.on::after {
  content: "✓";
}
body.ngate-on #modal .ng2 .cl {
  color: #e9dcc0 !important;
}
body.ngate-on #modal .ng2 .b {
  background: linear-gradient(180deg, #6b4a1c 0%, #2c1c0a 100%) !important;
  border: 1px solid rgba(232, 195, 122, .55) !important;
  border-radius: 6px !important;
  color: #ffe9b6 !important;
  letter-spacing: .04em;
  box-shadow: 0 1px 0 rgba(255, 220, 150, .18) inset, 0 6px 16px rgba(0, 0, 0, .55) !important;
}
body.ngate-on #modal .ng2 .b:hover {
  background: linear-gradient(180deg, #b07a2a 0%, #5a3a12 100%) !important;
  color: #fff6db !important;
}
body.ngate-on #modal .ng2 .b:active,
body.ngate-on #modal .ng2 .b[disabled] {
  background: linear-gradient(180deg, #4d4a44, #1d1b18) !important;
  color: #bdbbb4 !important;
}
body.ngate-on #modal .ng2x {
  color: rgba(232, 224, 204, .78) !important;
  text-shadow: 0 1px 3px #000 !important;
}
body.ngate-on #modal .ng2x a {
  color: var(--j21-gold) !important;
  text-decoration: none !important;
}
body.ngate-on #modal .ng2x a:hover {
  text-decoration: underline !important;
}

/* -------------------------------------------------------- character select */
body #csel,
body #cnew {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(180deg, rgba(8, 6, 4, .38), rgba(8, 6, 4, .88)),
    url(img/jx21/login-bg.webp) center / cover no-repeat !important;
  font-family: "Palatino Linotype", "Noto Serif", Georgia, serif;
}
body #csel h1,
body #cnew h1 {
  color: #f6dfae !important;
  letter-spacing: .18em !important;
  text-shadow: 0 0 18px rgba(232, 166, 58, .5), 0 2px 0 #2a1a07, 0 6px 18px #000 !important;
}
body #csel .cs-sub,
body #cnew .cn-sub {
  color: rgba(240, 220, 178, .72) !important;
  letter-spacing: .24em !important;
}
body #csel .cs-row {
  align-items: stretch !important;
  max-width: 1100px !important;
  gap: clamp(10px, 2.4vw, 26px) !important;
}
body #csel .cs-slot {
  max-width: 320px !important;
  padding: 7px 7px 9px !important;
  border: 1px solid var(--j21-line) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(28, 21, 12, .88), rgba(8, 6, 4, .94)) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .65), inset 0 0 24px rgba(232, 180, 90, .05) !important;
  overflow: hidden !important;
}
body #csel .cs-slot.on {
  border-color: var(--j21-gold) !important;
  box-shadow: 0 0 0 2px rgba(232, 195, 122, .28), 0 16px 40px rgba(0, 0, 0, .72), 0 0 26px rgba(232, 166, 58, .22) !important;
}
body #csel .cs-art {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 702 / 384 !important;
  border-radius: 8px !important;
  background-size: cover !important;
  background-position: center center !important;
  background-color: #15100a !important;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 180, .10) !important;
}
body #csel .cs-slot.empty .cs-art {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(232, 195, 122, .18), rgba(0, 0, 0, .65)) !important;
}
body #csel .cs-slot canvas {
  display: none !important;
}
body #csel .cs-slot .ped {
  display: none !important;
}
body #csel .cs-slot .nm {
  margin-top: 8px !important;
  font-family: "Palatino Linotype", "Noto Serif", Georgia, serif !important;
}
body #csel .cs-slot .lv {
  color: #cbb88f !important;
}
body #csel .cs-panel {
  background: var(--j21-panel) !important;
  border: 1px solid var(--j21-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .7), inset 0 0 30px rgba(232, 180, 90, .04) !important;
  backdrop-filter: blur(6px);
}
body #csel .cs-btns button,
body #cnew .cn-btns button {
  background: linear-gradient(180deg, #6b4a1c, #2c1c0a) !important;
  border: 1px solid rgba(232, 195, 122, .5) !important;
  color: #ffe9b6 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 0 rgba(255, 220, 150, .15) inset, 0 6px 16px rgba(0, 0, 0, .5) !important;
}
body #csel .cs-btns button.go,
body #cnew .cn-btns button.go {
  background: linear-gradient(180deg, #c08a32, #5c3a10) !important;
  border-color: #ffe0a0 !important;
  color: #fff6db !important;
  box-shadow: 0 0 18px rgba(232, 166, 58, .35), 0 6px 16px rgba(0, 0, 0, .5) !important;
}
body #csel .cs-btns button.red {
  background: linear-gradient(180deg, #7a2a1c, #34100a) !important;
  border-color: rgba(220, 120, 90, .6) !important;
}

/* -------------------------------------------------------- character create */
body #cnew .cn-main {
  max-width: 1080px !important;
}
body #cnew .cn-art {
  display: block !important;
  width: min(460px, 82vw) !important;
  aspect-ratio: 702 / 384 !important;
  border-radius: 14px !important;
  border: 1px solid var(--j21-line) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-color: #15100a !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .72), 0 0 28px rgba(232, 166, 58, .12), inset 0 0 0 1px rgba(255, 232, 180, .10) !important;
}
body #cnew #cnCv {
  display: none !important;
}
body #cnew .ped {
  display: none !important;
}
body #cnew .cn-preview {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.3;
  color: #cbb88f;
  text-align: center;
  min-height: 16px;
  letter-spacing: .02em;
}
body #cnew .cn-ser button {
  border-color: var(--j21-line) !important;
  background: linear-gradient(180deg, rgba(34, 25, 14, .92), rgba(10, 8, 5, .94)) !important;
  color: #d9c9a8 !important;
}
body #cnew .cn-ser button.on {
  border-color: var(--c) !important;
  color: #fff !important;
}
body #cnew .cn-info {
  background: var(--j21-panel) !important;
  border: 1px solid var(--j21-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .68), inset 0 0 30px rgba(232, 180, 90, .04) !important;
  backdrop-filter: blur(6px);
}
body #cnew .cn-info h3 {
  color: var(--j21-gold) !important;
  font-family: "Palatino Linotype", "Noto Serif", Georgia, serif;
}
body #cnew .cn-name input {
  background: rgba(0, 0, 0, .45) !important;
  border: 1px solid rgba(226, 186, 112, .35) !important;
  color: #ffe6b0 !important;
  border-radius: 6px !important;
}
body #cnew .cn-sex button {
  border: 1px solid var(--j21-line) !important;
  background: rgba(0, 0, 0, .35) !important;
  color: #d9c9a8 !important;
  border-radius: 6px !important;
}
body #cnew .cn-sex button.on {
  border-color: var(--j21-gold) !important;
  color: #ffe2a6 !important;
  background: rgba(90, 60, 22, .65) !important;
  box-shadow: 0 0 12px rgba(232, 166, 58, .25) !important;
}
body #cnew .cn-fac div {
  border: 1px solid var(--j21-line) !important;
  background: linear-gradient(180deg, rgba(26, 19, 11, .9), rgba(8, 6, 4, .95)) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: border-color .15s, box-shadow .15s, transform .15s !important;
}
body #cnew .cn-fac div:hover {
  border-color: rgba(232, 195, 122, .75) !important;
  transform: translateY(-2px) !important;
}
body #cnew .cn-fac div.on {
  border-color: var(--j21-gold) !important;
  box-shadow: 0 0 0 1px rgba(232, 195, 122, .35), 0 8px 20px rgba(0, 0, 0, .55) !important;
}
body #cnew .cn-fac div.no {
  opacity: .38 !important;
  filter: grayscale(1) !important;
}
body #cnew .cn-fac .cf-art {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 702 / 384 !important;
  background-size: cover !important;
  background-position: center !important;
  background-color: #15100a !important;
  border-radius: 5px !important;
  margin: 0 auto 5px !important;
}
body #cnew .cn-fac div canvas {
  display: none !important;
}
body #cnew .cn-fac div {
  padding: 5px 5px 7px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}
body #cnew .cn-st b {
  color: #ffe0a4 !important;
}

/* compact character picker modal (account / slots) */
.slotrow img {
  width: 60px !important;
  height: 64px !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 7px !important;
  border: 1px solid rgba(226, 186, 112, .35) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55) !important;
}

@media (max-width: 820px) {
  body #csel .cs-row {
    align-items: stretch !important;
  }
  body #csel .cs-slot {
    max-width: none !important;
  }
  body #cnew .cn-art {
    width: min(280px, 74vw) !important;
  }
}
