:root {
  --bg: #06090c;
  --panel: rgba(8, 13, 16, 0.94);
  --panel-soft: rgba(11, 17, 20, 0.9);
  --gold: #d8ad5c;
  --gold-2: #f3d18a;
  --gold-dark: #80602c;
  --line: rgba(213, 168, 83, 0.38);
  --text: #f0e7d4;
  --muted: #b9ad99;
  --danger: #d04e3b;
  --header-height: 64px;
  --site-max: 1536px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #000; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: #000;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.45;
  overflow-x: hidden;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.page-shell {
  width: min(100%, var(--site-max));
  margin-inline: auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.9);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-height);
  background:
    linear-gradient(180deg, rgba(8, 12, 15, 0.99), rgba(4, 8, 11, 0.98)),
    radial-gradient(circle at 20% 0, rgba(205, 160, 75, 0.1), transparent 35%);
  border-bottom: 1px solid rgba(220, 176, 92, 0.24);
}
.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  width: 90px;
  height: 64px;
  opacity: .45;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 42%, rgba(218, 174, 91, .5) 43% 45%, transparent 46%) 0 0 / 18px 18px;
}
.topbar::before { left: 0; }
.topbar::after { right: 0; transform: scaleX(-1); }
.topbar-inner {
  width: min(94%, 1380px);
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; height: 64px; width: 214px; overflow: hidden; }
.brand img { width: 214px; height: 72px; object-fit: cover; object-position: center; transform: translateY(1px); }
.primary-nav { display: flex; justify-content: center; align-items: stretch; height: 100%; gap: 28px; }
.primary-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #e7ddc8;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .025em;
  white-space: nowrap;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  background: linear-gradient(90deg, #a77a32, #f6d889, #a77a32);
  box-shadow: 0 0 14px rgba(229, 183, 88, .5);
  transition: transform .2s ease;
}
.primary-nav a:hover,
.primary-nav a.active { color: var(--gold-2); }
.primary-nav a:hover::after,
.primary-nav a.active::after { transform: scaleX(1); }
.account-actions { display: flex; align-items: center; gap: 10px; }
.btn-account,
.btn-gold-small {
  min-width: 112px;
  height: 38px;
  padding: 0 18px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.btn-account {
  background: rgba(12, 16, 18, .76);
  border: 1px solid rgba(221, 178, 91, .38);
  color: #e9d9b6;
}
.btn-gold-small {
  border: 1px solid #e1ba69;
  color: #2d210f;
  background: linear-gradient(180deg, #f6d58d, #c78c2f);
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 5px 18px rgba(0, 0, 0, .25);
}
.btn-account:hover,
.btn-gold-small:hover { transform: translateY(-1px); filter: brightness(1.08); }
.user-chip { text-transform: none; min-width: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #5bc37b; box-shadow: 0 0 9px #5bc37b; }
.menu-button { display: none; }

.hero {
  position: relative;
  min-height: 526px;
  background-image: url("../img/hero-bg.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  border-bottom: 1px solid rgba(220, 177, 91, .2);
}
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .04) 0 50%, transparent 68%),
    linear-gradient(180deg, transparent 68%, rgba(2, 6, 8, .7) 100%);
}
.hero-inner {
  position: relative;
  width: min(94%, 1380px);
  min-height: 526px;
  margin-inline: auto;
}
.hero-spacer { min-height: 100%; }
.frame-panel {
  position: relative;
  border: 1px solid rgba(225, 179, 86, .55);
  background:
    linear-gradient(180deg, rgba(19, 23, 24, .97), rgba(8, 12, 14, .97)),
    radial-gradient(circle at 50% 0, rgba(218, 170, 77, .12), transparent 40%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .45),
    inset 0 0 0 2px rgba(63, 49, 28, .85),
    inset 0 0 0 4px rgba(8, 10, 11, .9);
}
.frame-panel::before,
.frame-panel::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  border-color: var(--gold);
}
.frame-panel::before { left: 4px; top: 4px; border-left: 2px solid; border-top: 2px solid; }
.frame-panel::after { right: 4px; bottom: 4px; border-right: 2px solid; border-bottom: 2px solid; }
.login-panel {
  position: absolute;
  top: 112px;
  right: 42px;
  z-index: 5;
  width: 285px;
  min-height: 300px;
  padding: 26px 28px 22px;
}
.login-panel h1,
.modal-card h2 {
  margin: 0 0 18px;
  color: #ead09a;
  text-align: center;
  font-size: 25px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.compact-auth { display: grid; gap: 11px; }
.input-wrap { position: relative; display: block; }
.input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: #908474;
  pointer-events: none;
}
.input-wrap input,
.modal-form input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(193, 157, 90, .32);
  border-radius: 2px;
  outline: none;
  color: #eee6d8;
  background: rgba(4, 7, 9, .68);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input-wrap input { padding: 0 12px 0 38px; }
.modal-form input { padding: 0 12px; margin-top: 6px; }
.input-wrap input::placeholder { color: #8d8272; }
.input-wrap input:focus,
.modal-form input:focus { border-color: #d7aa57; box-shadow: 0 0 0 2px rgba(215, 170, 87, .12); }
.forgot-link {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dcc07e;
  font-size: 12px;
  cursor: pointer;
}
.gold-button {
  width: 100%;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid #e0b55e;
  border-radius: 2px;
  background: linear-gradient(180deg, #f3d28a 0%, #c88c30 100%);
  color: #2d210f;
  box-shadow: inset 0 1px rgba(255, 255, 255, .38), 0 8px 24px rgba(0, 0, 0, .25);
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.gold-button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.gold-button:disabled { filter: grayscale(.6); cursor: wait; transform: none; opacity: .7; }
.register-hint { margin: 0; color: #b7aa96; text-align: center; font-size: 12px; }
.register-hint button,
.switch-link,
.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #ddbd73;
  font-weight: 700;
  cursor: pointer;
}
.form-message { min-height: 18px; font-size: 12px; text-align: center; color: #e5c478; }
.form-message.error { color: #f08a78; }
.form-message.success { color: #75d196; }

.hero-links {
  position: absolute;
  left: 280px;
  bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 58px;
  z-index: 4;
}
.hero-link { display: grid; justify-items: center; gap: 7px; min-width: 72px; color: #eadfc7; font-size: 13px; text-transform: uppercase; text-shadow: 0 2px 3px #000; }
.round-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #e8c978;
  background: radial-gradient(circle, #28231a 0 45%, #111417 46% 100%);
  border: 2px solid rgba(221, 176, 87, .72);
  box-shadow: 0 0 0 5px rgba(26, 23, 18, .82), 0 8px 24px rgba(0, 0, 0, .4);
}
.round-icon svg { width: 25px; height: 25px; fill: currentColor; }
.facebook-icon { font: bold 31px/1 Arial, sans-serif; }
.zalo-icon { font: bold 12px/1 Arial, sans-serif; text-transform: none; }
.hero-link:hover .round-icon { filter: brightness(1.2); transform: translateY(-2px); }
.round-icon { transition: transform .18s ease, filter .18s ease; }

.logged-panel { text-align: center; display: grid; gap: 13px; }
.panel-overline { margin: 0; color: #ad8a4c; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; text-align: center; }
.logged-name { color: #f0d28e; font-size: 24px; overflow-wrap: anywhere; }
.account-stats { display: grid; gap: 8px; text-align: left; }
.account-stats div,
.account-detail div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(214, 170, 84, .16); }
.account-stats span,
.account-detail span { color: #a99c89; }
.account-stats b,
.account-detail b { color: #e9d2a1; text-align: right; }
.text-button { justify-self: center; }

.dashboard-section {
  position: relative;
  z-index: 10;
  padding: 0 0 18px;
  background:
    linear-gradient(180deg, rgba(3, 8, 11, .94), rgba(5, 10, 13, .98)),
    url("../img/content-bg.webp") center / cover;
}
.dashboard-grid {
  width: min(88%, 1360px);
  margin: -7px auto 0;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 12px;
}
.event-panel { grid-column: 1 / -1; }
.dark-panel {
  min-height: 318px;
  border: 1px solid rgba(214, 170, 84, .48);
  background: linear-gradient(180deg, rgba(10, 15, 18, .97), rgba(5, 10, 13, .98));
  box-shadow: inset 0 0 0 3px rgba(51, 42, 28, .5), 0 18px 35px rgba(0, 0, 0, .3);
}
.panel-header {
  height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(213, 168, 83, .22);
  background: linear-gradient(90deg, rgba(209, 161, 68, .07), transparent 75%);
}
.panel-header h2 { margin: 0; color: #e0bd78; font-size: 18px; text-transform: uppercase; }
.panel-header a { color: #cda655; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.news-list { padding: 8px 13px 11px; }
.news-row {
  min-height: 61px;
  display: grid;
  grid-template-columns: 112px 46px 1fr;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(180, 148, 88, .16);
}
.news-row:last-child { border-bottom: 0; }
.news-row img { width: 112px; height: 55px; object-fit: cover; border: 1px solid rgba(214, 170, 84, .38); }
.news-row time { display: grid; place-items: center; align-self: stretch; background: rgba(255,255,255,.03); border-right: 1px solid rgba(200,161,84,.15); }
.news-row time b { color: #eee7da; font-size: 22px; line-height: 1; }
.news-row time small { color: #9e8e74; font-size: 8px; }
.news-row h3 { margin: 0 0 3px; color: #d6b66e; font-size: 10px; line-height: 1.3; text-transform: uppercase; }
.news-row h3 span { padding: 2px 4px; border-radius: 2px; background: #c62f2a; color: #fff; font: 8px Arial, sans-serif; }
.news-row p { margin: 0; color: #9e978c; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-row:hover { background: rgba(209, 166, 84, .05); }

.ranking-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 8px 12px 0; }
.ranking-tabs button {
  min-height: 33px;
  border: 0;
  border-bottom: 1px solid rgba(205, 165, 88, .25);
  background: transparent;
  color: #cfc5b3;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.ranking-tabs button.active { color: #f0cc7b; border-bottom-color: #e1b761; background: rgba(214, 170, 84, .05); }
.rank-head,
.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) minmax(76px,.72fr);
  align-items: center;
  min-height: 35px;
  padding: 0 12px;
  gap: 8px;
}
.rank-head { color: #877c6b; font-size: 9px; background: rgba(255,255,255,.025); }
.rank-row { border-top: 1px solid rgba(204, 166, 92, .11); font-size: 10px; color: #ded7ca; }
.rank-row span:last-child { color: #d8b66d; text-align: right; font-variant-numeric: tabular-nums; }
.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  clip-path: polygon(50% 0, 90% 22%, 90% 75%, 50% 100%, 10% 75%, 10% 22%);
  color: #19140c;
  background: linear-gradient(180deg, #f5d57f, #aa7428);
  font-weight: 800;
}
.rank-row:nth-child(2) .rank-badge { background: linear-gradient(180deg, #edf0ef, #858c91); }
.rank-row:nth-child(3) .rank-badge { background: linear-gradient(180deg, #e9b184, #985b35); }
.rank-loading { padding: 38px 12px; color: #9d917e; text-align: center; font-size: 12px; }

.event-panel { padding-bottom: 12px; }
.event-image { position: relative; margin: 11px 12px 0; overflow: hidden; border: 1px solid rgba(214,170,84,.45); }
.event-image img { width: 100%; height: 247px; object-fit: cover; }
.event-cta {
  position: absolute;
  left: 26px;
  bottom: 20px;
  min-width: 135px;
  padding: 10px 14px;
  text-align: center;
  color: #2a1c0b;
  background: linear-gradient(180deg, #f2cf83, #c2852c);
  border: 1px solid #e4b65e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.event-cta:hover { filter: brightness(1.08); }

.feature-bar { background: rgba(5, 10, 13, .98); border-top: 1px solid rgba(213, 168, 83, .1); }
.feature-grid {
  width: min(85%, 1230px);
  margin-inline: auto;
  min-height: 92px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 34px;
}
.feature-grid article { display: grid; grid-template-columns: 55px 1fr; align-items: center; gap: 12px; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(218,174,89,.42);
  background: radial-gradient(circle, rgba(211,167,78,.18), rgba(10,14,16,.9) 70%);
  box-shadow: inset 0 0 0 5px rgba(217, 174, 89, .05);
}
.feature-icon svg { width: 27px; height: 27px; fill: #d8b76f; }
.feature-grid h3 { margin: 0 0 4px; color: #d8b773; text-transform: uppercase; font-size: 12px; }
.feature-grid p { margin: 0; color: #999183; font-size: 10px; }

.simple-section { padding: 70px 20px; background: #090e11; }
.simple-card { width: min(720px, 100%); margin: auto; padding: 40px; text-align: center; border: 1px solid rgba(214,170,84,.25); background: rgba(255,255,255,.025); }
.section-label { color: #bd9550; text-transform: uppercase; letter-spacing: .2em; }
.simple-card h2 { color: #ead3a0; }
.simple-card p { color: #aea491; }
.simple-card code { color: #e2bc72; }
.site-footer { display: grid; justify-items: center; gap: 5px; padding: 24px 20px; background: #04080a; color: #7f776b; font-size: 11px; border-top: 1px solid rgba(214,170,84,.14); }
.site-footer img { width: 160px; height: auto; }
.site-footer p { margin: 0; }

.zalo-float {
  position: fixed;
  right: max(18px, calc((100vw - var(--site-max)) / 2 + 18px));
  bottom: 22px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #087cf2, #5b36f3);
  box-shadow: 0 10px 25px rgba(19, 92, 230, .35);
  color: #fff;
  font: 12px Arial, sans-serif;
}
.zalo-float span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #1378e4; background: #fff; font-weight: 800; }
.zalo-float small { font-weight: 700; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 18px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 34px 32px 30px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(213,168,83,.24);
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  color: #d1b06e;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.modal-form { display: grid; gap: 13px; }
.modal-form label { display: grid; color: #c8bca7; font-size: 12px; }
.modal-form label small { color: #827969; }
.switch-link { justify-self: center; font-size: 12px; }
.login-required { display: grid; gap: 15px; text-align: center; color: #b5aa97; }
.account-detail { display: grid; gap: 4px; }
.danger-button { width: 100%; min-height: 41px; margin-top: 8px; border: 1px solid rgba(207, 73, 54, .6); background: rgba(128, 31, 25, .35); color: #ef9789; cursor: pointer; text-transform: uppercase; font-weight: 700; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  transform: translate(-50%, 30px);
  border: 1px solid rgba(215,170,85,.4);
  background: rgba(8,13,16,.96);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  color: #e9d8b7;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(220,81,63,.55); color: #f2a093; }


@media (min-width: 981px) {
  .hero-links { opacity: 0; }
  .hero-links:focus-within { opacity: 1; }
}
@media (max-width: 1240px) {
  .topbar-inner { grid-template-columns: 190px 1fr auto; gap: 12px; }
  .brand { width: 190px; }
  .brand img { width: 190px; object-fit: contain; }
  .primary-nav { gap: 12px; }
  .primary-nav a { font-size: 12px; }
  .btn-account, .btn-gold-small { min-width: 98px; padding-inline: 12px; font-size: 12px; }
  .login-panel { right: 30px; }
  .hero-links { left: 250px; }
  .dashboard-grid { width: 94%; }
}

@media (max-width: 980px) {
  :root { --header-height: 58px; }
  .topbar { height: var(--header-height); }
  .topbar-inner { width: 94%; grid-template-columns: 1fr auto auto; }
  .brand { width: 180px; height: 58px; }
  .brand img { width: 180px; height: 62px; }
  .menu-button {
    display: grid;
    gap: 4px;
    width: 40px;
    height: 38px;
    place-content: center;
    border: 1px solid rgba(214,170,84,.3);
    background: rgba(255,255,255,.02);
    cursor: pointer;
  }
  .menu-button span { width: 20px; height: 2px; background: #d9ba76; }
  .primary-nav {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    height: auto;
    display: none;
    padding: 10px 3%;
    background: rgba(5,9,11,.98);
    border-bottom: 1px solid rgba(214,170,84,.28);
    box-shadow: 0 12px 25px rgba(0,0,0,.45);
  }
  .primary-nav.open { display: grid; }
  .primary-nav a { min-height: 42px; justify-content: center; }
  .account-actions .btn-account { display: none; }
  .account-actions .btn-gold-small { min-width: 92px; }
  .hero { min-height: 610px; background-size: auto 526px; background-position: 42% top; background-color: #071015; }
  .hero-inner { min-height: 610px; }
  .login-panel { top: auto; bottom: 18px; right: 20px; width: 270px; }
  .hero-links { left: 70px; bottom: 28px; gap: 38px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .event-panel { grid-column: 1 / -1; }
  .top-one-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .event-image img { height: 300px; }
  .feature-grid { width: 92%; grid-template-columns: 1fr 1fr; padding: 18px 0; }
}

@media (max-width: 700px) {
  body { background: #05090b; }
  .page-shell { width: 100%; }
  .topbar-inner { grid-template-columns: 1fr auto auto; gap: 8px; }
  .brand { width: 145px; }
  .brand img { width: 150px; height: 56px; object-fit: contain; }
  .account-actions .btn-gold-small { min-width: 78px; height: 34px; padding-inline: 9px; font-size: 10px; }
  .hero {
    min-height: 760px;
    background-size: auto 480px;
    background-position: 35% 0;
    background-repeat: no-repeat;
  }
  .hero-shade { background: linear-gradient(180deg, transparent 0 46%, #061015 64%, #061015 100%); }
  .hero-inner { width: 100%; min-height: 760px; }
  .login-panel {
    top: 455px;
    bottom: auto;
    left: 50%;
    right: auto;
    width: min(92%, 360px);
    min-height: 276px;
    transform: translateX(-50%);
    padding: 24px;
  }
  .login-panel h1 { font-size: 22px; }
  .hero-links {
    left: 50%;
    bottom: 11px;
    width: min(92%, 360px);
    justify-content: space-around;
    gap: 12px;
    transform: translateX(-50%);
  }
  .hero-link { min-width: 76px; font-size: 10px; }
  .round-icon { width: 44px; height: 44px; }
  .dashboard-section { padding-top: 14px; }
  .dashboard-grid { width: 94%; margin-top: 0; grid-template-columns: 1fr; gap: 13px; }
  .dark-panel { min-height: auto; }
  .news-row { grid-template-columns: 92px 42px 1fr; }
  .news-row img { width: 92px; }
  .event-panel { grid-column: auto; }
  .event-image img { height: auto; min-height: 230px; object-fit: cover; }
  .feature-grid { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .feature-grid article { min-height: 58px; }
  .simple-section { padding: 44px 16px; }
  .simple-card { padding: 28px 20px; }
  .zalo-float { right: 12px; bottom: 12px; padding-right: 9px; }
  .zalo-float small { display: none; }
  .modal-card { padding: 32px 22px 26px; }
  .rank-head, .rank-row { grid-template-columns: 42px minmax(0,1fr) minmax(62px,.75fr); padding-inline: 8px; gap: 5px; }
  .rank-row { font-size: 9px; }
}

@media (max-width: 420px) {
  .brand { width: 132px; }
  .brand img { width: 140px; }
  .menu-button { width: 36px; }
  .account-actions .btn-gold-small { min-width: 70px; font-size: 9px; }
  .news-row { grid-template-columns: 80px 39px 1fr; }
  .news-row img { width: 80px; height: 52px; }
  .news-row h3 { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ===== BẢN V3: nút liên kết sáng, tin tức quản trị và Top 1 động ===== */
@media (min-width: 981px) {
  .hero-links { opacity: 1 !important; }
}
.hero-links { z-index: 12; }
.hero-link {
  width: 118px;
  min-height: 76px;
  padding: 8px 7px 7px;
  border: 1px solid rgba(245, 204, 113, .9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(51, 39, 20, .96), rgba(11, 16, 19, .98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 0 0 3px rgba(6,9,11,.75),
    0 0 22px rgba(236, 179, 70, .46),
    0 10px 24px rgba(0,0,0,.55);
  color: #ffe4a1;
  opacity: 1;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.hero-link:nth-child(1) { background: linear-gradient(180deg, rgba(129,88,22,.98), rgba(29,23,14,.98)); }
.hero-link:nth-child(2) { background: linear-gradient(180deg, rgba(24,70,139,.98), rgba(10,25,54,.98)); }
.hero-link:nth-child(3) { background: linear-gradient(180deg, rgba(25,119,75,.98), rgba(8,47,32,.98)); }
.hero-link:hover {
  transform: translateY(-3px);
  filter: brightness(1.2);
  box-shadow: 0 0 28px rgba(255, 205, 105, .72), 0 12px 28px rgba(0,0,0,.6);
}
.hero-link .round-icon {
  width: 39px;
  height: 39px;
  border-width: 1px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 0 18px rgba(246,204,105,.48);
  background: rgba(4,8,11,.78);
  color: #ffe5a5;
}
.hero-link b { font-size: 11px; letter-spacing: .035em; }

.panel-header-actions { display: flex; align-items: center; gap: 10px; }
.panel-header-actions button,
.panel-header button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #cda655;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.panel-header-actions button:hover,
.panel-header button:hover { color: #f1cf83; }
.panel-loading,
.panel-error,
.panel-empty { padding: 38px 16px; color: #9d917e; text-align: center; font-size: 12px; }
.panel-error { color: #e28c7e; }

.news-row { cursor: pointer; width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; font-family: inherit; color: inherit; }
.news-row.draft { opacity: .62; }
.news-row h3 em { margin-left: 5px; color: #afa38f; font-size: 8px; font-style: normal; }

.top-one-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 11px 12px 12px;
}
.top-one-card {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(214,170,84,.38);
  background:
    radial-gradient(circle at 0 50%, rgba(222,171,69,.18), transparent 38%),
    linear-gradient(105deg, rgba(26,22,17,.98), rgba(7,12,15,.98));
  box-shadow: inset 0 0 18px rgba(221,173,75,.04);
}
.top-one-card::after {
  content: "";
  position: absolute;
  top: -35px;
  right: -20px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(229,185,91,.13);
  transform: rotate(45deg);
}
.top-one-medal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #2b1a06;
  background: radial-gradient(circle at 35% 30%, #fff1b4, #d49b33 48%, #75501c 100%);
  box-shadow: 0 0 0 4px rgba(212,161,61,.12), 0 0 18px rgba(230,176,70,.25);
  font-size: 16px;
  font-weight: 900;
}
.top-one-card:nth-child(2) .top-one-medal { background: radial-gradient(circle at 35% 30%, #d9ecff, #719dd0 48%, #304d73 100%); }
.top-one-card:nth-child(3) .top-one-medal { background: radial-gradient(circle at 35% 30%, #dcffd8, #62a75e 48%, #28512c 100%); }
.top-one-info { min-width: 0; }
.top-one-label { display: block; color: #b49151; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.top-one-name { display: block; margin-top: 2px; overflow: hidden; color: #f0ddaf; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.top-one-detail { display: block; margin-top: 2px; color: #a79c8a; font-size: 9px; }
.top-one-score { position: relative; z-index: 1; color: #efc66e; font-size: 11px; font-weight: 700; text-align: right; white-space: nowrap; }

.news-detail-card { width: min(720px, 100%); padding-top: 28px; }
.news-detail-image { width: 100%; max-height: 280px; margin: 0 0 22px; object-fit: cover; border: 1px solid rgba(213,168,83,.34); }
.news-detail-summary { margin: -7px 0 18px; color: #d1bd94; text-align: center; font-size: 14px; }
.news-detail-content { color: #c1b6a4; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: 14px; }
.news-admin-inline { margin-top: 24px; }
.news-archive-card { width: min(760px, 100%); }
.compact-admin-button { width: auto; min-height: 36px; margin: 0 auto 14px; display: block; padding-inline: 22px; }
.news-archive-list { display: grid; gap: 8px; }
.news-archive-item {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(214,170,84,.2);
  background: rgba(255,255,255,.02);
  cursor: pointer;
}
.news-archive-item:hover { background: rgba(214,170,84,.06); }
.news-archive-item img { width: 86px; height: 54px; object-fit: cover; }
.news-archive-item h3 { margin: 0 0 3px; color: #ddbd75; font-size: 13px; }
.news-archive-item p { margin: 0; color: #958a78; font-size: 10px; }
.news-archive-item time { color: #a89267; font-size: 10px; white-space: nowrap; }
.news-editor-card { width: min(700px, 100%); }
.news-editor-form textarea {
  width: 100%;
  resize: vertical;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(193,157,90,.32);
  border-radius: 2px;
  outline: none;
  color: #eee6d8;
  background: rgba(4,7,9,.68);
  font: 13px/1.55 Arial, sans-serif;
}
.news-editor-form textarea:focus { border-color: #d7aa57; box-shadow: 0 0 0 2px rgba(215,170,87,.12); }
.editor-checks { display: flex; flex-wrap: wrap; gap: 16px; }
.editor-checks label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 7px; }
.editor-checks input { width: 17px; height: 17px; margin: 0; }
.editor-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.editor-delete { min-width: 120px; margin-top: 0; }

@media (max-width: 980px) {
  .hero-link { width: 104px; min-height: 70px; }
  .hero-links { gap: 18px; }
}
@media (max-width: 700px) {
  .hero-links { bottom: 8px; }
  .hero-link { width: 94px; min-width: 0; min-height: 67px; padding: 7px 4px; }
  .hero-link .round-icon { width: 36px; height: 36px; }
  .hero-link b { font-size: 9px; }
  .top-one-list { grid-template-columns: 1fr; }
  .top-one-card { grid-template-columns: 40px minmax(0,1fr) auto; }
  .news-archive-item { grid-template-columns: 70px 1fr; }
  .news-archive-item img { width: 70px; height: 48px; }
  .news-archive-item time { grid-column: 2; }
  .editor-actions { grid-template-columns: 1fr; }
  .editor-delete { width: 100%; }
}
@media (max-width: 420px) {
  .hero-link { width: 88px; }
  .hero-links { width: 96%; gap: 7px; }
  .top-one-score { font-size: 9px; }
}

/* ===== BẢN V4: che nội dung tải game cũ trong ảnh nền + luồng quên mật khẩu ===== */
.hero-links::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -15px -24px -14px;
  border: 1px solid rgba(221, 178, 91, .28);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 20%, rgba(219, 170, 76, .12), transparent 54%),
    linear-gradient(180deg, rgba(5, 10, 13, .98), rgba(3, 7, 9, .99));
  box-shadow: 0 12px 30px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.035);
  pointer-events: none;
}
.hero-link { position: relative; z-index: 1; }
.recovery-note,
.recovery-warning {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(213,168,83,.2);
  background: rgba(213,168,83,.055);
  color: #b9ab93;
  font-size: 11px;
  line-height: 1.5;
}
.recovery-warning { border-color: rgba(197,111,67,.28); background: rgba(116,53,29,.13); color: #cbb19a; }
.admin-panel-button { display: grid; place-items: center; text-align: center; }
.admin-nav-link { color: #ffd77e !important; }
@media (max-width: 700px) {
  .hero-links::before { inset: -9px -7px -8px; border-radius: 9px; }
}


.activation-request-button { margin-top: 10px; }
.activation-request-button.request-sent { border-color: rgba(86,188,116,.65); background: linear-gradient(180deg,#78cf94,#347a4b); color: #07170c; }
.activation-request-note { margin: 7px 0 2px; color: #a99c89; font-size: 12px; line-height: 1.45; text-align: center; }


/* FIX 2026-08-05: thông tin đại hiệp đầy đủ */
.account-profile-detail > div { align-items:flex-start; }
.account-profile-detail > div b { max-width:62%; text-align:right; overflow-wrap:anywhere; }
.account-online-status { display:inline-flex; align-items:center; justify-content:center; min-width:82px; padding:4px 10px; border-radius:999px; }
.account-online-status.is-online { color:#caffd7!important; background:rgba(35,142,75,.28); border:1px solid rgba(82,214,126,.45); }
.account-online-status.is-offline { color:#ffd5d5!important; background:rgba(146,52,52,.25); border:1px solid rgba(229,99,99,.4); }
@media(max-width:560px){.account-profile-detail > div{display:grid;gap:5px}.account-profile-detail > div b{max-width:100%;text-align:left}}

/* ===== FIX V8 2026-08-05: menu tài khoản, xóa pet và responsive smartphone ===== */
img, svg, video, canvas { max-width: 100%; }
main, section, article, aside, nav, header, footer, div, form, label { min-width: 0; }
input, textarea, select, button { max-width: 100%; }
.account-function-menu {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(214,170,84,.18);
}
.account-function-menu > p {
  margin: 0 0 2px;
  color: #c8a55d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-function-button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(214,170,84,.28);
  background: rgba(214,170,84,.055);
  color: #e7d4aa;
  text-align: left;
  cursor: pointer;
}
.account-function-button b { color: #efd18b; font-size: 13px; }
.account-function-button span { color: #9f9482; font-size: 11px; }
.account-function-button:hover { border-color: rgba(230,187,99,.58); background: rgba(214,170,84,.1); }
.account-function-button.danger { border-color: rgba(212,91,70,.4); background: rgba(120,38,28,.16); }
.account-function-button.danger b { color: #f2a495; }

.pet-manager-card { width: min(760px, 100%); }
.pet-manager-note {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(214,170,84,.25);
  background: rgba(214,170,84,.055);
  color: #b9ad99;
  font-size: 12px;
  line-height: 1.55;
}
.pet-manager-note b { color: #f0cf7f; }
.pet-manager-list { display: grid; gap: 12px; max-height: min(54vh, 520px); overflow-y: auto; padding-right: 3px; }
.pet-character-card { border: 1px solid rgba(214,170,84,.24); background: rgba(2,6,8,.44); }
.pet-character-card > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(214,170,84,.18);
  background: rgba(214,170,84,.05);
}
.pet-character-card > header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pet-character-card > header b { color: #f0d38e; overflow-wrap: anywhere; }
.pet-character-card > header strong { color: #d7bd83; font-size: 12px; white-space: nowrap; }
.pet-char-status { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.pet-char-status.online { color: #ffd2cd; border: 1px solid rgba(223,91,73,.45); background: rgba(138,43,31,.23); }
.pet-char-status.offline { color: #cbffda; border: 1px solid rgba(74,204,118,.42); background: rgba(32,126,67,.22); }
.pet-character-pets { display: grid; }
.pet-row {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(214,170,84,.1);
  cursor: pointer;
}
.pet-row:last-child { border-bottom: 0; }
.pet-row:hover { background: rgba(214,170,84,.045); }
.pet-row.locked { opacity: .58; cursor: not-allowed; }
.pet-row input { width: 18px; height: 18px; accent-color: #d7aa57; }
.pet-row > span { display: grid; gap: 3px; }
.pet-row b { color: #e5d4b2; overflow-wrap: anywhere; }
.pet-row small { color: #9c917f; }
.pet-character-empty { margin: 0; padding: 14px; color: #9c917f; text-align: center; }
.pet-manager-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(214,170,84,.18);
  background: rgba(255,255,255,.018);
  color: #a99d8a;
}
.pet-manager-summary b { color: #f0cf7e; }
.pet-delete-submit { margin-top: 10px; }
.pet-refresh-button { width: 100%; margin-top: 10px; text-align: center; }

@media (max-width: 700px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { min-width: 0; }
  .topbar-inner { width: 100%; padding-inline: 10px; }
  .primary-nav { max-height: calc(100dvh - 58px); overflow-y: auto; }
  .hero-links { width: calc(100% - 24px); max-width: 360px; }
  .hero-link { width: calc((100% - 14px) / 3); max-width: 104px; }
  .hero-links::before { left: -4px; right: -4px; }
  .dashboard-grid { width: calc(100% - 20px); }
  .panel-header { height: auto; min-height: 48px; padding: 10px 12px; gap: 8px; }
  .panel-header h2 { min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
  .panel-header-actions { flex: 0 0 auto; gap: 7px; }
  .news-row { grid-template-columns: 72px 38px minmax(0,1fr); padding-inline: 4px; }
  .news-row img { width: 72px; height: 50px; }
  .news-row > div { min-width: 0; }
  .rank-head, .rank-row { grid-template-columns: 36px minmax(0,1fr) minmax(58px,.72fr); }
  .rank-head span, .rank-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-one-card { grid-template-columns: 42px minmax(0,1fr) auto; padding-inline: 8px; }
  .modal { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); align-items: center; }
  .modal-card {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 30px 16px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .modal-form input, .modal-form textarea, .modal-form select { font-size: 16px; }
  .account-detail div, .account-stats div { min-width: 0; }
  .account-profile-detail > div b { max-width: 100%; }
  .pet-manager-list { max-height: 48dvh; }
  .pet-character-card > header { align-items: flex-start; flex-direction: column; }
  .pet-manager-summary { flex-direction: column; gap: 5px; }
  .toast { width: calc(100vw - 24px); max-width: calc(100vw - 24px); }
}

@media (max-width: 390px) {
  .brand { width: 112px; }
  .brand img { width: 118px; }
  .menu-button { width: 34px; }
  .account-actions .btn-gold-small { min-width: 62px; padding-inline: 6px; }
  .hero-link { min-height: 62px; padding-inline: 2px; }
  .hero-link b { font-size: 8px; }
  .news-row { grid-template-columns: 62px 34px minmax(0,1fr); }
  .news-row img { width: 62px; height: 46px; }
  .rank-head, .rank-row { font-size: 8px; gap: 3px; padding-inline: 5px; }
}

/* FIX 2026-08-07: nhận điểm nạp tự động trong Thông tin đại hiệp */
.vip-point-claim-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(215,171,83,.38);
  background:
    radial-gradient(circle at 85% 0%, rgba(220,174,78,.14), transparent 42%),
    rgba(214,170,84,.055);
}
.vip-point-claim-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vip-point-claim-heading > div { display: grid; gap: 3px; }
.vip-point-claim-heading span { color: #b7aa94; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vip-point-claim-heading b { color: #f0cf7e; font-size: 14px; }
.vip-point-claim-heading strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(126,207,151,.35);
  background: rgba(52,122,75,.18);
  color: #9fe4b4;
  font-size: 11px;
}
.vip-point-claim-card > p { margin: 0; color: #aca18f; font-size: 11px; line-height: 1.55; }
.vip-point-claim-card label { display: grid; gap: 6px; color: #d1bd91; font-size: 11px; font-weight: 800; }
.vip-point-claim-card select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(214,170,84,.3);
  background: #080d10;
  color: #efe2c5;
}
.vip-point-claim-button { margin: 0; }
.vip-point-claim-button:disabled { opacity: .5; filter: grayscale(.65); cursor: not-allowed; }
.vip-point-claim-card > small { color: #a99c89; font-size: 11px; line-height: 1.5; text-align: center; }
@media (max-width: 560px) {
  .vip-point-claim-heading { flex-direction: column; }
  .vip-point-claim-heading strong { align-self: flex-start; }
  .vip-point-claim-card select { font-size: 16px; }
}

/* ===== FIX 2026-08-07: hiển thị Thông tin đại hiệp đầy đủ trên smartphone ===== */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.account-modal-card {
  width: min(430px, 100%);
}

@media (max-width: 700px) {
  /* Chuyển khối chào mừng và 3 nút liên kết về luồng dọc.
     Không dùng absolute/bottom vì nội dung đăng nhập thay đổi chiều cao. */
  .hero {
    min-height: 0;
    background-size: auto 480px;
    background-position: 35% 0;
    background-repeat: no-repeat;
  }
  .hero-inner {
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 455px 12px 28px;
  }
  .hero-spacer { display: none; }
  .login-panel {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 360px);
    min-height: 0;
    margin: 0;
    transform: none;
  }
  .hero-links {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 360px);
    margin: 0;
    transform: none;
    justify-content: center;
    flex-wrap: nowrap;
    flex: 0 0 auto;
  }

  /* Người đã đăng nhập có nút mở tài khoản trực tiếp trên thanh đầu.
     Nút đăng xuất được giữ bên trong bảng tài khoản để tránh tràn ngang. */
  .account-actions .user-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    max-width: 86px;
    height: 34px;
    padding: 0 8px;
    font-size: 10px;
  }
  .account-actions .header-logout-button { display: none; }

  /* Dùng chính lớp modal làm vùng cuộn trên iOS/Android.
     Card luôn bắt đầu từ phía trên, không bị trình duyệt căn giữa rồi cắt đầu. */
  .modal {
    align-items: flex-start;
    justify-items: center;
    place-items: start center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      max(12px, env(safe-area-inset-bottom));
  }
  .modal-card {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: none;
    min-height: 0;
    margin: auto 0;
    overflow: visible;
    padding: 34px 16px 22px;
  }
  .account-modal-card {
    width: min(100%, 430px);
    max-width: min(100%, 430px);
  }
  .account-modal-card .account-detail {
    width: 100%;
  }
  .account-modal-card .account-profile-detail > div {
    scroll-margin-top: 12px;
  }
  .modal-close {
    top: 9px;
    right: 10px;
  }
}

@media (max-width: 390px) {
  .hero-inner { padding-inline: 9px; }
  .login-panel { padding: 22px 18px; }
  .hero-links { gap: 6px; }
  .account-actions .user-chip { max-width: 76px; padding-inline: 6px; }
  .account-modal-card { padding-inline: 14px; }
}

/* ===== FIX 2026-08-08: menu bảng xếp hạng mở rộng ===== */
.ranking-menu-open {
  border: 0;
  background: transparent;
  color: #cda655;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}
.ranking-category-menu {
  margin: 8px 12px 0;
  border: 1px solid rgba(214,170,84,.28);
  background: rgba(4,9,12,.76);
}
.ranking-category-menu summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  color: #a99b83;
  font-size: 10px;
  text-transform: uppercase;
}
.ranking-category-menu summary::-webkit-details-marker { display: none; }
.ranking-category-menu summary::after { content: '▾'; color: #d7ad57; font-size: 14px; }
.ranking-category-menu[open] summary::after { content: '▴'; }
.ranking-category-menu summary b { margin-left: auto; color: #f0cc7b; font-size: 11px; }
.ranking-category-menu .ranking-tabs {
  grid-template-columns: repeat(3, minmax(0,1fr));
  padding: 0;
  border-top: 1px solid rgba(214,170,84,.18);
}
.ranking-category-menu .ranking-tabs button {
  min-height: 38px;
  padding: 5px 7px;
  border-right: 1px solid rgba(214,170,84,.12);
  border-bottom: 1px solid rgba(214,170,84,.12);
  line-height: 1.25;
}
.rank-row span:last-child { white-space: nowrap; }

@media (max-width: 760px) {
  .ranking-category-menu { margin-inline: 8px; }
  .ranking-category-menu .ranking-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ranking-category-menu .ranking-tabs button { min-height: 42px; font-size: 9px; }
  .ranking-category-menu summary { font-size: 9px; }
  .ranking-category-menu summary b { font-size: 10px; }
  .rank-row span:last-child { white-space: normal; line-height: 1.25; }
}


/* ===== FIX 2026-08-09: Donate cho Admin trong Thông tin đại hiệp ===== */
.donate-admin-open {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(224,177,82,.42);
  background:
    radial-gradient(circle at 12% 20%, rgba(226,177,76,.14), transparent 38%),
    linear-gradient(180deg, rgba(65,51,25,.36), rgba(20,18,12,.46));
  color: #ead7ad;
  text-align: left;
  cursor: pointer;
}
.donate-admin-open:hover { border-color: rgba(242,195,94,.72); background-color: rgba(214,170,84,.1); }
.donate-admin-open-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236,177,91,.48);
  border-radius: 50%;
  background: rgba(166,74,40,.2);
  color: #f3b56b;
  font-size: 17px;
}
.donate-admin-open > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.donate-admin-open b { color: #f0cf82; font-size: 13px; }
.donate-admin-open small { color: #9f9480; font-size: 10px; line-height: 1.35; }
.donate-admin-open-arrow { color: #cda85e; font-size: 24px; line-height: 1; }

.donate-modal-card { width: min(520px, 100%); }
.donate-intro {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(214,170,84,.22);
  background: rgba(214,170,84,.055);
  color: #b8ab96;
  font-size: 11px;
  line-height: 1.55;
}
.donate-intro b { color: #e8ce93; }
.donate-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.donate-preset-button {
  min-height: 42px;
  border: 1px solid rgba(214,170,84,.3);
  background: rgba(214,170,84,.045);
  color: #dfc68d;
  font-weight: 800;
  cursor: pointer;
}
.donate-preset-button:hover,
.donate-preset-button.active {
  border-color: rgba(240,194,99,.72);
  background: linear-gradient(180deg, rgba(222,175,79,.24), rgba(113,77,21,.2));
  color: #ffe2a1;
  box-shadow: inset 0 0 0 1px rgba(255,224,155,.07);
}
.donate-custom-label { display: grid; gap: 6px; color: #d1bd91; font-size: 11px; font-weight: 800; }
.donate-amount-input-wrap {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(214,170,84,.3);
  background: #080d10;
}
.donate-amount-input-wrap:focus-within { border-color: #d7aa57; box-shadow: 0 0 0 2px rgba(215,170,87,.1); }
.donate-amount-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1e1bf;
  font: 800 15px Arial, sans-serif;
}
.donate-amount-input-wrap span { padding: 0 11px; color: #b89c64; font-size: 11px; }
#donateAmountError { display: none; color: #e99e91; font-weight: 400; }
#donateAmountError.show { display: block; }
.donate-selected-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px dashed rgba(214,170,84,.3);
  background: rgba(255,255,255,.018);
}
.donate-selected-summary span { color: #9f9481; font-size: 11px; }
.donate-selected-summary strong { color: #f2cf7b; font-size: 17px; }
.donate-bank-card {
  border: 1px solid rgba(214,170,84,.3);
  background: rgba(4,9,12,.66);
}
.donate-bank-head,
.donate-bank-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(214,170,84,.14);
}
.donate-bank-row:last-child { border-bottom: 0; }
.donate-bank-head > div { display: grid; gap: 2px; }
.donate-bank-head span,
.donate-bank-row > span { color: #988d7b; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.donate-bank-head b { color: #efd08a; font-size: 15px; }
.donate-bank-badge {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 28px;
  border: 1px solid rgba(90,183,116,.35);
  background: rgba(37,112,58,.17);
  color: #a8e1b5 !important;
  font-weight: 900;
}
.donate-bank-row > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  text-align: right;
}
.donate-bank-row b { color: #e8d6ad; overflow-wrap: anywhere; }
.donate-bank-row button {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(214,170,84,.28);
  background: rgba(214,170,84,.07);
  color: #d8b66f;
  font-size: 10px;
  cursor: pointer;
}
.donate-copy-all { margin-top: 12px; }
.donate-security-note {
  margin: 9px 0 0;
  color: #9e927f;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.donate-security-note b { color: #d7c398; }
.donate-back-button { display: block; width: 100%; margin-top: 6px; text-align: center; }

@media (max-width: 560px) {
  .donate-modal-card { width: min(100%, 430px); }
  .donate-preset-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .donate-preset-button { min-height: 44px; }
  .donate-amount-input-wrap input { font-size: 16px; }
  .donate-bank-row { grid-template-columns: 1fr; align-items: start; }
  .donate-bank-row > div { justify-content: space-between; text-align: left; }
  .donate-selected-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* ===== FIX 2026-08-09 v2: Donate nút lớn + QR VietQR tự động ===== */
.donate-admin-open.donate-admin-open-large {
  display: block;
  width: 100%;
  min-height: 47px;
  margin-top: 12px;
  padding: 11px 16px;
  border: 1px solid #e0b55e;
  border-radius: 2px;
  background: linear-gradient(180deg, #f3d28a 0%, #c88c30 100%);
  color: #2d210f;
  box-shadow: inset 0 1px rgba(255,255,255,.38), 0 8px 24px rgba(0,0,0,.25);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.donate-admin-open.donate-admin-open-large:hover {
  border-color: #edc878;
  background: linear-gradient(180deg, #f6d996 0%, #d39737 100%);
  filter: brightness(1.04);
}
.donate-admin-open-note {
  margin: 6px 0 12px;
  color: #9f9480;
  text-align: center;
  font-size: 10px;
  line-height: 1.45;
}
.donate-create-qr-button {
  margin-top: 9px;
  min-height: 44px;
}

.donate-qr-modal { z-index: 130; }
.donate-qr-card {
  width: min(500px, 100%);
  overflow: auto;
  text-align: center;
}
.donate-qr-amount {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 2px 0 12px;
}
.donate-qr-amount span {
  color: #a99b84;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.donate-qr-amount strong {
  color: #f4cf78;
  font-size: 24px;
  line-height: 1.15;
}
.donate-qr-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(360px, 100%);
  min-height: 360px;
  margin: 0 auto 13px;
  padding: 10px;
  border: 1px solid rgba(224,181,94,.42);
  background: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
}
.donate-qr-image-wrap img {
  display: none;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
}
.donate-qr-image-wrap img.ready { display: block; }
.donate-qr-loading,
.donate-qr-error {
  color: #4a4030;
  font: 700 13px Arial, sans-serif;
  line-height: 1.45;
  padding: 20px;
}
.donate-qr-loading.hidden { display: none; }
.donate-qr-error { display: none; color: #8d2e2e; }
.donate-qr-error.show { display: block; }
.donate-qr-meta {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border: 1px solid rgba(214,170,84,.3);
  background: rgba(4,9,12,.66);
  text-align: left;
}
.donate-qr-meta > div {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(214,170,84,.13);
}
.donate-qr-meta > div:last-child { border-bottom: 0; }
.donate-qr-meta span {
  color: #958a78;
  font-size: 10px;
  text-transform: uppercase;
}
.donate-qr-meta b {
  color: #ead7ab;
  text-align: right;
  overflow-wrap: anywhere;
}
.donate-qr-note {
  margin: 10px 0;
  color: #9e927f;
  font-size: 10px;
  line-height: 1.5;
}
.donate-qr-note b { color: #d7bd82; }
.donate-qr-actions { display: grid; gap: 8px; }
.donate-qr-actions .text-button { min-height: 34px; color: #d9bd7b; }

@media (max-width: 560px) {
  .donate-admin-open.donate-admin-open-large { min-height: 50px; font-size: 14px; }
  .donate-qr-card { width: min(100%, 430px); padding: 30px 18px 24px; }
  .donate-qr-image-wrap { width: min(330px, 100%); min-height: 330px; padding: 7px; }
  .donate-qr-amount strong { font-size: 22px; }
  .donate-qr-meta > div { grid-template-columns: 95px minmax(0,1fr); }
}

@media (max-width: 380px) {
  .donate-qr-image-wrap { min-height: 290px; }
  .donate-qr-meta > div { grid-template-columns: 1fr; gap: 3px; }
  .donate-qr-meta b { text-align: left; }
}

/* ===== FIX 2026-08-14: Yêu cầu điểm nạp theo gói + QR chờ admin duyệt ===== */
.vip-point-package-card { width: min(500px, 100%); }
.vip-point-package-intro,
.vip-point-package-note {
  margin: 0 0 12px;
  color: #aa9f8d;
  font-size: 11px;
  line-height: 1.55;
}
.vip-point-package-intro b,
.vip-point-package-note b { color: #e7c979; }
.vip-point-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin: 12px 0;
}
.vip-point-package-grid button {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(215,171,83,.42);
  background: linear-gradient(180deg, rgba(214,170,84,.12), rgba(7,12,15,.98));
  color: #ecd38f;
  text-align: left;
  cursor: pointer;
}
.vip-point-package-grid button:hover {
  border-color: rgba(242,195,94,.78);
  background: linear-gradient(180deg, rgba(214,170,84,.2), rgba(7,12,15,.98));
}
.vip-point-package-grid button:disabled { opacity: .55; cursor: wait; }
.vip-point-package-grid b { font-size: 14px; }
.vip-point-package-grid span { color: #a99c86; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.vip-point-order-summary { display: grid; gap: 4px; }
.vip-point-order-summary small { color: #b1a38d; font-size: 11px; }
.vip-point-qr-card .donate-qr-meta > div:last-child b { color: #f2cf7b; letter-spacing: .04em; }
@media (max-width: 560px) {
  .vip-point-package-grid { grid-template-columns: 1fr; }
  .vip-point-package-grid button { min-height: 62px; }
}

/* ===== FIX 2026-08-18: gộp Donate vào Yêu cầu điểm nạp ===== */
.vip-point-package-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(126,207,151,.28);
  background: rgba(52,122,75,.12);
  color: #a9bcae;
  font-size: 11px;
}
.vip-point-package-status strong {
  min-width: 34px;
  padding: 4px 8px;
  border: 1px solid rgba(126,207,151,.35);
  background: rgba(52,122,75,.18);
  color: #9fe4b4;
  text-align: center;
}
.vip-point-package-character {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #d1bd91;
  font-size: 11px;
  font-weight: 800;
}
.vip-point-package-character select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(214,170,84,.3);
  background: #080d10;
  color: #efe2c5;
}
.vip-point-package-grid button small {
  color: #c4b79e;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}
.vip-point-custom-card {
  display: grid;
  gap: 9px;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid rgba(215,171,83,.38);
  background: rgba(214,170,84,.055);
}
.vip-point-custom-card > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #e6ca87;
  font-size: 12px;
  font-weight: 800;
}
.vip-point-custom-card > label small {
  color: #a99c89;
  font-size: 10px;
  font-weight: 500;
}
.vip-point-custom-input {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(214,170,84,.3);
  background: #080d10;
}
.vip-point-custom-input:focus-within {
  border-color: #d7aa57;
  box-shadow: 0 0 0 2px rgba(215,170,87,.1);
}
.vip-point-custom-input input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1e1bf;
  font: 800 15px Arial, sans-serif;
}
.vip-point-custom-input span {
  padding: 0 11px;
  color: #b89c64;
  font-size: 11px;
}
.vip-point-custom-note {
  color: #a99c89;
  font-size: 10px;
  line-height: 1.5;
}
.vip-point-custom-note b { color: #e7c979; }

@media (max-width: 560px) {
  .vip-point-package-character select,
  .vip-point-custom-input input { font-size: 16px; }
  .vip-point-custom-card > label { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* Deposit history inside member payment dialog */
.vip-point-history-panel{margin:18px 0 12px;border:1px solid rgba(213,164,60,.45);background:rgba(5,11,12,.72);padding:12px}.vip-point-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.vip-point-history-heading small{display:block;color:#b99343;text-transform:uppercase;letter-spacing:.08em}.vip-point-history-heading b{display:block;color:#f0d28a;margin-top:2px}.vip-point-history-heading button{border:1px solid #6f5720;background:#15160f;color:#e7c66d;padding:7px 10px;cursor:pointer}.vip-point-history-table-wrap{overflow:auto;max-height:260px}.vip-point-history-table-wrap table{width:100%;border-collapse:collapse;min-width:660px;font-size:12px}.vip-point-history-table-wrap th,.vip-point-history-table-wrap td{padding:8px 7px;border-bottom:1px solid rgba(180,145,59,.18);text-align:left;white-space:nowrap}.vip-point-history-table-wrap th{color:#c99f41;text-transform:uppercase;font-size:10px}.vip-history-status{display:inline-flex;padding:3px 7px;border:1px solid #535d5c;color:#bdc8c6}.vip-history-status.success{border-color:#396e52;color:#8fdbaf}.vip-history-status.danger{border-color:#813d36;color:#ff9b8e}.vip-history-status.pending{border-color:#806722;color:#f1cd68}.vip-history-status.processing{border-color:#3d6381;color:#8fc6ed}

/* ===== FIX 2026-08-23: menu tải game + danh sách PB iOS ===== */
button.hero-link {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
}
.download-choice-card { width: min(560px, 100%); }
.download-choice-card h2,
.ios-pb-card h2 { margin-bottom: 18px; text-align: center; }
.download-choice-list { display: grid; gap: 11px; }
.download-choice-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid rgba(218, 171, 82, .48);
  background: linear-gradient(180deg, rgba(33,39,41,.96), rgba(9,14,17,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  color: #f1d18d;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.download-choice-button:hover { border-color: rgba(245, 198, 100, .9); filter: brightness(1.12); }
.download-choice-button b { color: #ffe2a0; font-size: 14px; line-height: 1.35; }
.download-choice-button span { color: #a99d89; font-size: 11px; line-height: 1.4; }
.ios-pb-card { width: min(760px, 100%); }
.ios-pb-list { display: grid; gap: 10px; }
.ios-pb-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid rgba(204, 154, 58, .42);
  background: rgba(12, 20, 23, .92);
  color: #fff2d4;
  text-decoration: none;
}
.ios-pb-item > span { display: grid; gap: 4px; min-width: 0; }
.ios-pb-item b { overflow-wrap: anywhere; font-size: 13px; }
.ios-pb-item small { color: #e0c894; font-size: 10px; }
.ios-pb-item em {
  min-width: 112px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f4ce7a, #cf8c22);
  box-shadow: inset 0 1px rgba(255,255,255,.42);
  color: #1a1106;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}
.ios-pb-item:hover { border-color: rgba(245, 198, 100, .92); }
.ios-pb-item:hover em { filter: brightness(1.08); }
.download-back-button { display: block; margin: 16px auto 0; }
@media (max-width: 560px) {
  .download-choice-card, .ios-pb-card { padding-inline: 14px; }
  .download-choice-button { min-height: 64px; padding: 12px; }
  .ios-pb-item { gap: 9px; padding: 10px; }
  .ios-pb-item em { min-width: 88px; padding: 11px 8px; font-size: 11px; }
  .ios-pb-item b { font-size: 11px; }
}

/* Activation CTA after registration */
.activation-cta-box{margin:14px 0;padding:14px;border:1px solid rgba(208,158,52,.55);background:rgba(208,158,52,.07)}
.activation-cta-box>b{display:block;margin-bottom:6px;color:#f2ca72}
.activation-cta-box p{margin:0 0 10px;line-height:1.55;color:#c9c1ad}

/* ===== 2026-10-08: QR thanh toán chỉ hiển thị mã QR ===== */
.donate-qr-only-wrap {
  width: min(360px, 100%);
  min-height: 0;
  margin-top: 14px;
  margin-bottom: 0;
  padding: 12px;
}
.donate-qr-only-wrap img {
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
