/* Bát Hoang Lục website: ink ground, jade accents, seal red. Pages: index.html, tai-khoan.html. */
:root {
  --ink: #0b0c0f;
  --ink-2: #0e1014;
  --panel: #12141a;
  --line: #262a33;
  --line-2: #2d3139;
  --text: #e9e4d4;
  --text-2: #b3bcb6;
  --muted: #8f9a93;
  --title: #f1ecdd;
  --jade: #3f9e78;
  --jade-dark: #2f7a5e;
  --jade-light: #9be3c2;
  --gold: #e3c06b;
  --seal: #c4473d;
  --serif: 'Noto Serif', Georgia, serif;
  --sans: 'Be Vietnam Pro', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); }
a { color: #7fd3ac; }
a:hover { color: #b4ecd0; }
img { max-width: 100%; }
.px { image-rendering: pixelated; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px;
  border-radius: 4px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn-play { background: var(--jade); color: #06110c; border: 2px solid var(--jade-light); box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--jade-dark); }
.btn-play:hover { background: #56b98f; color: #06110c; }
.btn-ghost { background: rgba(11, 12, 15, 0.6); color: var(--text); border: 2px solid #4a4f58; }
.btn-ghost:hover { border-color: var(--jade-light); color: #fff; }
.btn-gm { background: #2a1513; color: #f1c9c4; border: 2px solid var(--seal); }
.btn-gm:hover { background: #3a1b18; color: #fff; }
.btn-block { width: 100%; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--jade-dark);
  box-shadow: 0 3px 0 var(--ink), 0 4px 0 #1d3a2f; }
.site-header nav { min-height: 68px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; }
.brand { align-self: flex-start; display: block; margin-bottom: -26px; padding: 10px 14px 12px; background: var(--ink-2);
  border: 2px solid var(--line-2); border-top: 0; box-shadow: inset 0 0 0 1px var(--ink), inset 0 -3px 0 var(--jade-dark), 0 6px 0 rgba(0, 0, 0, 0.45); }
.brand img { display: block; width: 220px; height: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 22px; }
.nav-links a { color: #c9d3cc; text-decoration: none; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: #fff; border-bottom-color: var(--jade); }
.nav-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nav-actions .btn { font-size: 14px; padding: 0 18px; }
.who { font-size: 14px; color: #c9d3cc; }
.who strong { color: var(--gold); }
[hidden] { display: none !important; }

/* hero */
.hero { position: relative; overflow: hidden; min-height: 860px; display: flex; align-items: center; border-bottom: 1px solid #23272e; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-veil { position: absolute; inset: 0; background: rgba(8, 9, 12, 0.5); box-shadow: inset 0 0 260px 120px var(--ink), inset 0 -160px 120px -40px var(--ink); }
.hero-seal { position: absolute; top: 120px; right: 7%; writing-mode: vertical-rl; background: #b23a31; color: #fbe9e4; font-family: var(--serif);
  font-size: 30px; font-weight: 700; padding: 14px 8px; border: 3px solid #7d221c; box-shadow: inset 0 0 0 2px #e0857b; letter-spacing: 0.1em; }
.hero-inner { position: relative; width: 100%; padding: 120px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.chip { font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--jade-light); background: rgba(11, 12, 15, 0.7); padding: 8px 14px; border: 1px solid var(--jade-dark); }
.hero-logo { width: 880px; max-width: 100%; height: auto; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.55)); }
.hero-lead { margin: 0; max-width: 660px; font-size: 19px; line-height: 1.65; color: #d6dcd6; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 6px; }
.hero-note { font-size: 13px; color: var(--text-2); }
.facts { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; border: 1px solid var(--line-2); background: rgba(11, 12, 15, 0.78); }
.facts div { padding: 14px 28px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-2); }
.facts div:last-child { border-right: 0; }
.facts b { font-family: var(--serif); font-size: 26px; color: var(--gold); }
.facts span { font-size: 12px; color: #a9b3ac; letter-spacing: 0.12em; }

/* sections */
.section { padding: 96px 0 24px; }
.kicker { font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--jade-light); }
.section h2 { margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--title); line-height: 1.2; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.section-head.center { align-items: center; text-align: center; }
.section-head p { margin: 0; max-width: 680px; color: #a9b3ac; font-size: 16px; line-height: 1.6; }
.seal-dot { display: inline-block; width: 30px; height: 30px; background: var(--seal); color: #f6e6e2; font-family: var(--serif); font-size: 16px; line-height: 30px; text-align: center; }

.grid { display: grid; gap: 20px; }
.grid-features { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card:hover { border-color: var(--jade); }
.card-head { display: flex; align-items: center; gap: 12px; }
.glyph { width: 40px; height: 40px; flex: none; border: 1px solid var(--jade-dark); background: #0f1c17; color: var(--jade-light);
  font-family: var(--serif); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.card h3 { margin: 0; font-size: 19px; font-weight: 600; color: var(--title); }
.card p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.65; }

.world { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.world-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.world-text p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tags span { font-size: 13px; padding: 6px 10px; border: 1px solid #2c3139; border-radius: 3px; color: #cfd6d0; background: #101217; }
.world figure { flex: 1 1 560px; min-width: 0; margin: 0; border: 1px solid #2c3139; border-radius: 6px; overflow: hidden; background: var(--ink-2); }
.world figure img { display: block; width: 100%; height: auto; }
figcaption { padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid #23272e; }

.realms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.realms li { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 104px; }
.realms small { font-size: 12px; color: #7f8a83; letter-spacing: 0.12em; }
.realms b { font-family: var(--serif); font-size: 22px; }
.realms span { font-size: 13px; color: #a9b3ac; }

.grid-weapons { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.weapon { border-top-width: 3px; padding: 22px; gap: 10px; }
.weapon .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.weapon h3 { font-family: var(--serif); font-size: 26px; font-weight: 700; }
.weapon .el { font-size: 13px; font-weight: 600; }
.weapon p { font-size: 14px; }

.grid-shots { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--ink-2); }
.shot .frame { height: 240px; overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.shot:hover img { transform: scale(1.03); }
.shot figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.shot figcaption b { color: var(--title); font-weight: 600; }

.cta { position: relative; overflow: hidden; margin-top: 96px; border-top: 1px solid #23272e; border-bottom: 1px solid #23272e; }
.cta > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-veil { position: absolute; inset: 0; background: rgba(8, 9, 12, 0.74); }
.cta-inner { position: relative; max-width: 900px; margin: 0 auto; padding: 96px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.cta h2 { margin: 0; font-family: var(--serif); font-size: 44px; color: var(--title); }
.cta p { margin: 0; color: #c9d3cc; font-size: 17px; line-height: 1.6; }

.site-footer { padding: 40px 24px 56px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.site-footer .brand-foot { display: flex; align-items: center; gap: 14px; }
.site-footer .brand-foot img { width: 180px; height: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer nav a { color: #a9b3ac; }

/* account page */
.account { min-height: 100vh; display: flex; flex-wrap: wrap; }
.account-art { flex: 1 1 520px; min-width: 0; min-height: 320px; position: relative; overflow: hidden; }
.account-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-art .veil { position: absolute; inset: 0; background: rgba(8, 9, 12, 0.58); box-shadow: inset 0 0 160px 40px var(--ink); }
.account-art .inner { position: relative; height: 100%; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: #c9d3cc; text-decoration: none; font-size: 14px; min-height: 44px; }
.account-art .lead { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.account-art .lead img { width: 480px; height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.55)); }
.account-art .lead p { margin: 0; font-size: 17px; line-height: 1.65; color: #d6dcd6; }
.account-main { flex: 1 1 460px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.account-box { width: 100%; max-width: 420px; background: #101217; border: 2px solid var(--line-2); box-shadow: inset 0 0 0 1px var(--ink), inset 0 0 0 3px var(--jade-dark);
  border-radius: 4px; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 20px; }
.tabs { display: flex; }
.tab { flex: 1; min-height: 46px; background: transparent; border: 0; border-bottom: 2px solid #2a2e36; color: #9aa59e; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--jade-light); border-bottom-color: var(--jade); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.form .hint { color: #7f8a83; font-size: 13px; }
.field { width: 100%; min-height: 46px; padding: 0 14px; background: #0a0b0e; border: 1px solid #3a3f48; border-radius: 3px; color: #ece7d8; font: inherit; font-size: 15px; }
.field:focus { outline: 2px solid var(--jade); outline-offset: 1px; border-color: var(--jade); }
.check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--jade); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.small { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.or { display: flex; align-items: center; gap: 12px; color: #6f7a73; font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.status { margin: 0; padding: 10px 12px; border-radius: 3px; font-size: 14px; line-height: 1.5; }
.status.error { background: #2a1513; color: #f6c3bc; border: 1px solid #5a2620; }
.status.ok { background: #14231d; color: #b4ecd0; border: 1px solid var(--jade-dark); }

@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .hero { min-height: 0; }
  .hero-inner { padding: 96px 16px 72px; }
  .section h2 { font-size: 30px; }
  .brand { margin-bottom: 0; }
  .brand img { width: 160px; }
  .grid-shots { grid-template-columns: 1fr; }
  .account-art .inner { padding: 24px; }
}
