/* ============================================================
   SA-MP.VN — Design System
   Phong cách: dark brutalist (góc vuông, viền mảnh, mono labels)
   Palette: gold #FFB400 + cam đất #FF5E1A trên nền #0A0908
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:            #0A0908;
  --bg-alt:        #141210;
  --bg-panel:      #100E0C;
  --bg-elevated:   #1A1714;

  --accent:        #FFB400;
  --accent-hover:  #FFC72E;
  --accent-dim:    rgba(255, 180, 0, .12);
  --accent-2:      #FF5E1A;
  --accent-2-dim:  rgba(255, 94, 26, .12);

  --text:          #FFFFFF;
  --muted:         #A1A1AA;
  --muted-2:       #71717A;

  --border:        rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);

  --danger:        #FF4545;
  --success:       #35D07F;

  --font-sans:    'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;

  --header-h: 80px;
  --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #000; }

body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb { background: #2b2722; border: 2px solid var(--bg); }
body::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.mono { font-family: var(--font-mono); }

/* Nhãn nhỏ kiểu mono — dùng khắp nơi */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .05);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d4d4d8;
}
.tag i { color: var(--accent); }
.tag--accent { border-color: rgba(255, 180, 0, .4); background: var(--accent-dim); color: var(--accent); }
.tag--accent i { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all .22s cubic-bezier(.22, 1, .36, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Nút chính: vàng đằm + BÓNG CỨNG lệch phải-dưới (neo-brutalist).
   Hover: nhấc chéo lên-trái, bóng kéo dài ra — thấy rõ mảng bóng bên phải. */
.btn--primary {
  background: linear-gradient(180deg, #FFC64A 0%, #F0A000 100%);
  color: #201200;
  box-shadow: none;
}
.btn--primary:hover {
  background: linear-gradient(180deg, #FFD05E 0%, #FFAD0F 100%);
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 rgba(255, 205, 95, .55);
}
.btn--primary:active {
  transform: translate(-1px, -1px);
  box-shadow: 1px 1px 0 rgba(255, 205, 95, .45);
}
/* Nút viền: cùng ngôn ngữ bóng cứng nhưng bóng vàng mờ */
.btn--ghost {
  border-color: var(--border-strong);
  color: #fff;
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 180, 0, .07);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 rgba(255, 205, 95, .3);
}
.btn--ghost:active {
  transform: translate(-1px, -1px);
  box-shadow: 1px 1px 0 rgba(255, 205, 95, .25);
}
.btn--dark {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn--dark:hover { background: #1a1a1a; }
.btn--sm { padding: 9px 16px; font-size: 12px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- Section header ---------- */
.section-head { margin-bottom: 22px; }
.section-title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.section-title em { font-style: normal; color: var(--accent); }
.section-sub { margin-top: 10px; max-width: 560px; color: var(--muted); font-size: 15px; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 60;
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 34px;
  padding: 5px 16px;
  flex-wrap: wrap;
}
.topbar__ip { opacity: .75; }
.topbar__ip b { opacity: 1; }
.topbar--maintenance { background: var(--accent); }

/* ============================================================
   HEADER (thanh nổi, blur, thu nhỏ khi cuộn)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__box {
  pointer-events: none;
  position: absolute;
  inset: 8px 12px;
  border: 1px solid var(--border);
  background: rgba(10, 9, 8, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  transition: all .3s ease;
}
.site-header__in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  transition: transform .3s ease;
}
.site-header.is-scrolled .site-header__in { transform: scale(.94); }

/* Logo chữ — đổi giữa bản đầy đủ và bản rút gọn khi cuộn */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand__img { width: 40px; height: 40px; object-fit: contain; }
.brand__text {
  display: grid;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.brand__full, .brand__short {
  grid-area: 1 / 1;
  transition: all .3s ease;
}
.brand__short { opacity: 0; transform: scale(.9); pointer-events: none; }
.site-header.is-scrolled .brand__full { opacity: 0; transform: scale(.9); pointer-events: none; }
.site-header.is-scrolled .brand__short { opacity: 1; transform: scale(1); pointer-events: auto; }
.brand b { color: #fff; }
.brand span { color: var(--accent); }

/* Nav chính */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}
.main-nav__link {
  position: relative;
  padding: 8px 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.main-nav__link:hover, .main-nav__link.is-active { color: #fff; }
.main-nav__link::after {
  content: '';
  position: absolute;
  left: 11px; right: 11px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav__link:hover::after, .main-nav__link.is-active::after { transform: scaleX(1); }

/* Khu bên phải */
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-actions .btn--ghost { border-color: transparent; }
.header-actions .btn--ghost:hover { border-color: var(--border-strong); background: rgba(255,255,255,.05); color: #fff; }

/* User menu khi đã đăng nhập */
.user-menu { position: relative; }
.user-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: all .2s ease;
}
.user-menu__btn:hover { border-color: var(--accent); color: var(--accent); }
.user-menu__avatar {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .18s ease;
  z-index: 70;
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  transition: all .15s ease;
  text-align: left;
}
.dropdown__item i { width: 16px; text-align: center; color: var(--muted-2); transition: color .15s ease; }
.dropdown__item:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.dropdown__item:hover i { color: var(--accent); }
.dropdown__sep { height: 1px; background: var(--border); margin: 4px 0; }

/* Nút mobile */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  font-size: 16px;
}

/* Mobile menu */
/* ============================================================
   MENU MOBILE — ngăn kéo trượt từ phải, có nền mờ, mượt
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.is-open { visibility: visible; pointer-events: auto; }

/* Lớp nền mờ — bấm ra ngoài để đóng */
.mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .32s ease;
}
.mobile-menu.is-open::before { opacity: 1; }

/* Bảng menu trượt vào từ mép phải */
.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(330px, 86vw);
  background: linear-gradient(180deg, #14110d 0%, var(--bg, #0A0908) 100%);
  border-left: 1px solid rgba(255, 180, 0, .22);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .34s cubic-bezier(.22, .9, .3, 1);
  overscroll-behavior: contain;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }

/* Đầu bảng: thương hiệu + nút đóng */
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.mobile-menu__brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #fff;
}
.mobile-menu__brand span { color: var(--accent); }
.mobile-menu__close {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s;
}
.mobile-menu__close:hover,
.mobile-menu__close:active { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }

/* Thẻ tài khoản trong menu */
.mobile-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 180, 0, .05);
  flex: 0 0 auto;
}
.mobile-menu__user img { width: 40px; height: 40px; object-fit: cover; flex: 0 0 auto; }
.mobile-menu__user b { display: block; font-size: 14px; color: #fff; }
.mobile-menu__user small { font-size: 11.5px; color: var(--accent); }

/* Danh sách link — trượt vào lần lượt */
.mobile-menu__nav { flex: 1; overflow-y: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255, 255, 255, .82);
  border-left: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  opacity: 0;
  transform: translateX(14px);
}
.mobile-menu.is-open .mobile-menu__link {
  animation: mmIn .34s cubic-bezier(.22, .9, .3, 1) forwards;
}
@keyframes mmIn { to { opacity: 1; transform: translateX(0); } }
.mobile-menu.is-open .mobile-menu__link:nth-child(1) { animation-delay: .07s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { animation-delay: .10s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { animation-delay: .13s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { animation-delay: .16s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(5) { animation-delay: .19s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(6) { animation-delay: .22s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(7) { animation-delay: .25s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(8) { animation-delay: .28s; }
.mobile-menu__link:hover,
.mobile-menu__link.is-active {
  background: rgba(255, 180, 0, .08);
  color: #fff;
  border-left-color: var(--accent);
}
.mobile-menu__link i:first-child { width: 18px; color: var(--accent); font-size: 14px; text-align: center; }
.mobile-menu__link .mm-badge {
  margin-left: auto;
  font-size: 10.5px;
  padding: 2px 7px;
  background: var(--accent);
  color: #141210;
  font-weight: 800;
}

/* Chân bảng: nút đăng nhập / đăng xuất */
.mobile-menu__foot {
  flex: 0 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}
.mobile-menu__foot .btn { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu__panel { transition: none; }
  .mobile-menu.is-open .mobile-menu__link { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(calc(100vh - 34px), 860px);
  display: flex;
  flex-direction: column;
  margin-top: calc(-1 * var(--header-h) - 16px);
  padding-top: calc(var(--header-h) + 16px);
}
.hero__media, .hero__media video, .hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}
.hero__media { opacity: .88; }
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(to bottom, rgba(10,9,8,.28) 0%, rgba(10,9,8,.34) 45%, var(--bg) 100%);
}
/* Lưới mờ + quầng sáng gold */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 4rem 4rem;
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  top: -140px; right: -60px;
  width: 640px; height: 640px;
  z-index: -1;
  background: radial-gradient(circle at 70% 30%, rgba(255, 180, 0, .14) 0%, rgba(10, 9, 8, 0) 65%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 90px;
}
.hero__grid-cols {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero__badge { margin-bottom: 24px; }
.hero__title {
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.hero__title .line { display: block; }
.hero__title .line--accent { color: var(--accent); }
.hero__desc {
  margin-top: 22px;
  max-width: 520px;
  color: #d4d4d8;
  font-size: 15px;
}
.hero__cta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__feats {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.hero__feats span { display: inline-flex; align-items: center; gap: 8px; }
.hero__feats i { color: var(--accent); font-size: 11px; }

/* Nút bật âm thanh video */
.hero__sound {
  position: absolute;
  top: 24px; right: 24px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(0, 0, 0, .4);
  color: rgba(255, 255, 255, .7);
  backdrop-filter: blur(4px);
  transition: all .2s ease;
  z-index: 5;
}
.hero__sound:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* Thẻ trạng thái server */

/* ---------- Thẻ TẢI GAME ở hero (thay cho thẻ trạng thái server) ---------- */
.dl-card {
  border: 1px solid var(--border-strong);
  background: rgba(10, 9, 8, .82);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.dl-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dl-card__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dl-card__title::before {
  content: '';
  width: 10px; height: 10px;
  background: var(--accent);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.dl-card__verified {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.dl-card__verified i { margin-right: 5px; }
.dl-card__body { padding: 16px 18px; display: grid; gap: 10px; }

.dl-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dl-btn:hover { border-color: var(--accent); background: rgba(255, 180, 0, .09); transform: translateY(-2px); }
.dl-btn__os { font-size: 24px; width: 26px; text-align: center; flex-shrink: 0; color: var(--accent); }
.dl-btn__txt { display: grid; gap: 1px; min-width: 0; line-height: 1.25; }
.dl-btn__txt small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dl-btn__txt b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.dl-btn__go { margin-left: auto; font-size: 12px; color: var(--muted-2); flex-shrink: 0; }
.dl-btn:hover .dl-btn__go { color: var(--accent); }

.dl-btn--main {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 130%);
  color: #141210;
}
.dl-btn--main .dl-btn__os,
.dl-btn--main .dl-btn__go { color: #141210; }
.dl-btn--main .dl-btn__txt small { color: rgba(20, 18, 16, .72); }
.dl-btn--main:hover { background: linear-gradient(135deg, var(--accent-hover, #ffc733) 0%, var(--accent-2) 130%); }

.dl-btn--soon { opacity: .5; cursor: default; }
.dl-btn--soon:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .03); transform: none; }

.dl-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
.dl-card__foot a { color: var(--accent); font-weight: 700; }
.dl-card__foot a:hover { text-decoration: underline; }
.ip-row {
  display: flex;
  border: 1px solid var(--border-strong);
}
.ip-row__val {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ip-row__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .2s ease;
}
.ip-row__copy:hover { background: var(--accent); color: #000; }

/* Cuộn xuống */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero__scroll i { animation: bounce-y 1.6s ease-in-out infinite; color: var(--accent); }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  padding: 12px 0;
  user-select: none;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #d4d4d8;
}
.marquee__item .star { color: var(--accent); }
.marquee__item .dot { color: var(--muted-2); }

/* ============================================================
   STATS STRIP
   ============================================================ */
.stats {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 34px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.stat {
  text-align: center;
  padding: 12px 8px;
  border-left: 1px solid var(--border);
}
.stat:first-child { border-left: 0; }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--accent);
}
.stat__label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ============================================================
   FEATURES (kiểu roleplay.vn: icon box + số + gạch vàng,
   thanh dọc chạy theo mục active, tự xoay vòng)
   ============================================================ */
.features { padding: 48px 0; }
.features__grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 48px;
  align-items: center;
}
.features__counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.features__counter b { color: var(--accent); }
/* Mô tả mục đang active hiện bên cột trái (desktop) */
.features__desc {
  margin-top: 22px;
  max-width: 460px;
  min-height: 66px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  transition: opacity .3s ease;
}
.features__desc.is-fading { opacity: 0; }

.feat-list { position: relative; padding-left: 22px; user-select: none; }
.feat-list__track {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, .07);
}
.feat-list__progress {
  position: absolute;
  left: 0; top: 0;
  width: 1px;
  height: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 180, 0, .6);
  transition: height .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1);
}
.feat-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 17px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-align: left;
  cursor: pointer;
}
.feat-row__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--muted-2);
  transition: color .3s ease;
}
.feat-row__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 180, 0, .25);
  background: #050505;
  color: var(--accent);
  font-size: 14px;
  opacity: .55;
  transition: opacity .3s ease, box-shadow .3s ease;
}
.feat-row__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.9vw, 22px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--muted);
  transition: color .3s ease;
}
.feat-row__dash {
  flex-shrink: 0;
  width: 48px; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}
.feat-row:hover .feat-row__title { color: #d4d4d8; }
.feat-row.is-active .feat-row__num { color: var(--accent); }
.feat-row.is-active .feat-row__title { color: #fff; }
.feat-row.is-active .feat-row__icon { opacity: 1; box-shadow: 0 0 18px rgba(255, 180, 0, .25); }
.feat-row.is-active .feat-row__dash { transform: scaleX(1); }
/* Mô tả inline chỉ hiện trên mobile */
.feat-row__mdesc { display: none; }

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  background-size: cover;
  background-position: right center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Tỉ lệ đúng bằng ảnh gốc (2172x724) → luôn hiển thị đủ chiều cao artwork */
  aspect-ratio: 2172 / 724;
  min-height: 300px;
  max-height: 640px;
  display: flex;
  align-items: center;
}
/* Phủ tối CHỈ bên trái cho chữ dễ đọc — tắt hẳn trước vùng nhân vật */
.manifesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(10, 9, 8, .92) 0%,
    rgba(10, 9, 8, .62) 30%,
    rgba(10, 9, 8, .22) 46%,
    transparent 58%);
  pointer-events: none;
}
.manifesto .container { position: relative; }
.manifesto__box {
  max-width: 600px;
  padding: 26px 0;
}
.manifesto__title {
  margin-top: 16px;
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.12;
}
.manifesto__title em { font-style: normal; color: var(--accent); }
.manifesto__desc {
  margin-top: 16px;
  max-width: 500px;
  color: #d4d4d8;
  font-size: 14.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.manifesto__cta {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   PANELS + BẢNG XẾP HẠNG
   ============================================================ */
.live { padding: 48px 0; }
.live__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
}
.panel {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.panel__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.panel__title i { color: var(--accent); }
.panel__more {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
.panel__more:hover { color: var(--accent); }

.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: rgba(255, 255, 255, .025); }
.rank-row__num {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.rank-row:first-of-type .rank-row__num,
.rank-row__num.is-top { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.rank-row__main { flex: 1; min-width: 0; }
.rank-row__name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-row__name a:hover { color: var(--accent); }
.rank-row__meta { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.rank-row__val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.rank-row__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  flex-shrink: 0;
}
.rank-row__badge--closed { background: rgba(255, 69, 69, .12); color: #ff8080; }
.rank-row__badge--open { background: rgba(53, 208, 127, .12); color: #6fe3a5; }

/* ============================================================
   NEWS
   ============================================================ */
.news {
  padding: 48px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.news__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.news__list { margin-top: 20px; }
.news-row {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--border);
  transition: all .2s ease;
}
.news-row:hover { background: rgba(255, 255, 255, .02); padding-left: 18px; }
.news-row__num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted-2);
  flex-shrink: 0;
}
.news-row:hover .news-row__num { color: var(--accent); }
.news-row__main { flex: 1; min-width: 0; }
.news-row__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.news-row__date { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); }
.news-row__title {
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.news-row:hover .news-row__title { color: var(--accent); }
.news-row__arrow { color: var(--muted-2); flex-shrink: 0; transition: all .2s ease; }
.news-row:hover .news-row__arrow { color: var(--accent); transform: translateX(4px); }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 54px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
/* Vạch sáng gradient trên đầu section (kiểu roleplay) */
.cta::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 180, 0, .45), transparent);
}
/* Chữ watermark viền khổng lồ phía sau */
.watermark {
  pointer-events: none;
  user-select: none;
  position: absolute;
  left: 50%;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  color: transparent;
  z-index: -1;
}
.cta .watermark--1 {
  top: 8%;
  transform: translateX(-46%);
  font-size: clamp(6rem, 19vw, 18rem);
  -webkit-text-stroke: 1px rgba(255, 255, 255, .05);
}
.cta .watermark--2 {
  top: 3%;
  transform: translateX(-54%);
  font-size: clamp(6rem, 19vw, 18rem);
  -webkit-text-stroke: 1px rgba(255, 180, 0, .08);
  opacity: .7;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(255, 180, 0, .12) 0%, transparent 55%);
  pointer-events: none;
}
.cta__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.cta__title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cta__desc {
  margin: 16px auto 0;
  max-width: 600px;
  color: var(--muted);
}
.cta__buttons {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
/* Hàng liên kết kiểu "đối tác" roleplay: chữ outline rỗng, hover đổ đầy */
.link-rows {
  margin-top: 32px;
  text-align: left;
  border-top: 1px solid var(--border);
}
.link-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
}
.link-row__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: rgba(255, 255, 255, .25);
  transition: color .3s ease;
}
.link-row__name {
  position: relative;
  min-width: 0;
  flex: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1;
  font-size: clamp(20px, 2.8vw, 30px);
}
.link-row__name .ghost {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .3);
}
.link-row__name .fill {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  opacity: 0;
  transition: opacity .3s ease;
}
.link-row__icon {
  flex-shrink: 0;
  font-size: 19px;
  color: rgba(255, 255, 255, .2);
  transition: all .3s ease;
}
.link-row:hover .link-row__num { color: var(--accent); }
.link-row:hover .link-row__name .fill { opacity: 1; }
.link-row:hover .link-row__icon { color: var(--accent); transform: translate(3px, -3px); }

/* ============================================================
   NETWORK — section vàng "Mạng lưới" (kiểu roleplay)
   ============================================================ */
.network {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: #000;
  padding: 42px 0 36px;
}
.network__watermark {
  pointer-events: none;
  user-select: none;
  position: absolute;
  left: -10px;
  bottom: -.12em;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  font-size: clamp(6rem, 20vw, 16rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, .3);
  opacity: .3;
}
.network__rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.network__rule--top { border-bottom: 1px solid rgba(0, 0, 0, .2); padding-bottom: 16px; }
.network__rule--bot { border-top: 1px solid rgba(0, 0, 0, .2); padding-top: 16px; }
.network__mid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 26px;
  align-items: end;
  padding: 28px 0;
}
.network__title {
  font-family: var(--font-mono);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.05em;
  line-height: .92;
  font-size: clamp(24px, 4vw, 50px);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .network__title { white-space: normal; }
}
.network__desc {
  max-width: 340px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.65;
  color: rgba(0, 0, 0, .7);
}
.network__rule--bot { display: grid; grid-template-columns: 1fr 1fr 1fr; letter-spacing: .25em; font-size: 10px; }
.network__rule--bot span:last-child { text-align: right; }
.network__rule--bot span:nth-child(2) { text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 40px 0 0;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 26px;
}
.site-footer__brand .brand__text { font-size: 21px; }
.site-footer__desc {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-2);
  max-width: 320px;
}
.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer__col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--muted);
  transition: all .15s ease;
}
.site-footer__col a:hover { color: var(--accent); padding-left: 6px; }
.site-footer__legal {
  border-top: 1px solid var(--border);
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
  line-height: 1.8;
}
.site-footer__legal .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================================
   PAGE HEAD (breadcrumb + tiêu đề trang con)
   ============================================================ */
.page-head {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 15% -40%, rgba(255, 180, 0, .09) 0%, transparent 55%),
    var(--bg-alt);
  padding: 46px 0 42px;
  margin-top: calc(-1 * var(--header-h) - 16px);
  padding-top: calc(var(--header-h) + 60px);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted-2); transition: color .15s ease; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--muted-2); opacity: .5; }
.breadcrumb .cur { color: var(--accent); }
.page-head__title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.page-main { padding: 28px 0 44px; }

/* ============================================================
   FORUM
   ============================================================ */
.forum-group { margin-bottom: 26px; }
.forum-group__title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 11px;
}
.forum-group__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.forum-cats {
  display: grid;
  gap: 8px;
}
.forum-cat {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 13px 18px;
  transition: all .2s ease;
}
.forum-cat:hover { border-color: rgba(255, 180, 0, .45); background: var(--bg-elevated); }
.forum-cat__icon {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 17px;
  flex-shrink: 0;
  transition: all .2s ease;
}
.forum-cat:hover .forum-cat__icon { background: var(--accent); color: #000; }
.forum-cat__main { flex: 1; min-width: 0; }
.forum-cat__name {
  font-size: 14.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.forum-cat__name .fa-lock { font-size: 11px; color: var(--muted-2); }
.forum-cat:hover .forum-cat__name { color: var(--accent); }
.forum-cat__desc { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.forum-cat__stats {
  display: flex;
  gap: 22px;
  flex-shrink: 0;
  text-align: center;
}
.forum-cat__stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.forum-cat__stat span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Hàng chủ đề */
.thread-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.thread-toolbar__info { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); }
.thread-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-top: 0;
  background: var(--bg-panel);
  padding: 10px 16px;
  transition: background .15s ease;
}
.thread-row:first-of-type { border-top: 1px solid var(--border); }
.thread-row:hover { background: var(--bg-elevated); }
.thread-row__avatar {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
}
.thread-row__main { flex: 1; min-width: 0; }
.thread-row__title {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.thread-row__title a:hover { color: var(--accent); }
.thread-pin, .thread-lock {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
}
.thread-pin { background: var(--accent-dim); color: var(--accent); }
.thread-lock { background: rgba(255, 255, 255, .07); color: var(--muted); }
.thread-row__meta { margin-top: 4px; font-size: 12px; color: var(--muted-2); }
.thread-row__meta b { color: var(--muted); font-weight: 600; }
.thread-row__nums {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
  text-align: center;
}
.thread-row__nums div b {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
}
.thread-row__nums div span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.thread-row__last {
  width: 190px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted-2);
  text-align: right;
  line-height: 1.5;
}
.thread-row__last b { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* Bài viết trong chủ đề */
.post {
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1px solid var(--border);
  border-top: 0;
  background: var(--bg-panel);
}
.post:first-of-type { border-top: 1px solid var(--border); }
.post__side {
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  text-align: center;
  background: rgba(255, 255, 255, .012);
}
.post__avatar {
  width: 72px; height: 72px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
}
.post__author { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.post__author a:hover { color: var(--accent); }
.post__role {
  margin-top: 6px;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
}
.post__role--admin { background: var(--accent); color: #000; }
.post__stats {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted-2);
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
}
.post__stats b { color: var(--muted); }
.post__main { padding: 24px 28px; display: flex; flex-direction: column; }
.post__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
}
.post__body { flex: 1; font-size: 14.5px; color: #e4e4e7; white-space: pre-line; }
.post__foot {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.post__act {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted-2);
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post__act:hover { color: var(--accent); border-color: var(--border-strong); }

/* Ô trả lời */
.reply-box {
  margin-top: 28px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.reply-box__head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.reply-box__head i { color: var(--accent); margin-right: 8px; }
.reply-box textarea {
  width: 100%;
  min-height: 140px;
  padding: 18px 20px;
  background: transparent;
  border: 0;
  resize: vertical;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.reply-box textarea::placeholder { color: var(--muted-2); }
.reply-box__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.reply-box__note { font-size: 12px; color: var(--muted-2); }

/* ============================================================
   UCP
   ============================================================ */
.ucp-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
  align-items: start;
}
.ucp-nav {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  position: sticky;
  top: calc(var(--header-h) + 30px);
}
.ucp-nav__user {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
}
.ucp-nav__avatar {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
}
.ucp-nav__name { font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; }
.ucp-nav__vip { font-size: 11px; color: var(--accent); font-family: var(--font-mono); margin-top: 2px; }
.ucp-nav__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: all .15s ease;
}
.ucp-nav__link i { width: 18px; text-align: center; color: var(--muted-2); transition: color .15s ease; }
.ucp-nav__link:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.ucp-nav__link:hover i { color: var(--accent); }
.ucp-nav__link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}
.ucp-nav__link.is-active i { color: var(--accent); }
.ucp-nav__sep { height: 1px; background: var(--border); }

/* ---------- Footer gọn cho khu vực tài khoản (/ucp) ---------- */
.site-footer--slim { padding: 0; border-top: 1px solid var(--border); }
.site-footer--slim .container {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-block: 14px;
}
.site-footer--slim .brand__img { width: 26px; height: 26px; }
.site-footer--slim .brand__text { font-size: 15px; }
.site-footer--slim__nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-footer--slim__nav a {
  font-size: 12.5px;
  color: var(--muted);
  transition: color .15s ease;
}
.site-footer--slim__nav a:hover { color: var(--accent); }
.site-footer--slim__copy {
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--muted-2);
}
@media (max-width: 760px) {
  .site-footer--slim__nav { margin-left: 0; gap: 12px; }
  .site-footer--slim__nav a { font-size: 12px; }
}

/* ---------- Dải hồ sơ đầu bảng điều khiển ---------- */
.ucp-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.ucp-profile__avatar {
  width: 46px; height: 56px;
  flex-shrink: 0;
  overflow: hidden;              /* .avatar-skin bên trong là width/height 100% */
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04);
}
.ucp-profile__main { flex: 1; min-width: 0; }
.ucp-profile__name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.ucp-profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.ucp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  white-space: nowrap;
}
.ucp-tag i { color: var(--accent); font-size: 10px; }
.ucp-tag--ok  { border-color: rgba(53, 208, 127, .35); color: #6fe3a5; }
.ucp-tag--ok i  { color: #6fe3a5; }
.ucp-tag--bad { border-color: rgba(255, 94, 26, .45); color: var(--accent-2); }
.ucp-tag--bad i { color: var(--accent-2); }
.ucp-profile__side {
  flex-shrink: 0;
  display: grid;
  gap: 3px;
  text-align: right;
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--muted-2);
}
.ucp-profile__side b { color: var(--muted); font-weight: 600; }

/* ---------- Lối tắt (2 cột trong panel bên phải) ---------- */
.ucp-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}
.ucp-quick__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: var(--bg-panel);
  transition: background .15s ease;
}
.ucp-quick__item:hover { background: var(--accent-dim); }
.ucp-quick__item > i {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  color: var(--accent);
  font-size: 12px;
}
.ucp-quick__item:hover > i { background: var(--accent); color: #141210; }
.ucp-quick__item span { display: grid; gap: 1px; min-width: 0; }
.ucp-quick__item b {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}
.ucp-quick__item small {
  font-size: 10.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Báo mất kết nối DB — nằm trong .ucp-layout nên phải chiếm trọn hàng đầu */
.ucp-db-down {
  grid-column: 1 / -1;
  order: -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 94, 26, .45);
  background: rgba(255, 94, 26, .08);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.ucp-db-down i { color: var(--accent-2); margin-top: 3px; flex-shrink: 0; }
.ucp-db-down b { display: block; color: #fff; margin-bottom: 2px; }

/* Cột đơn minmax(0,1fr): không có nó thì cột ngầm là `auto` = max-content,
   bảng bên trong (th nowrap) sẽ thổi rộng cả khối và làm tràn ngang trang. */
.ucp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* Bảng rộng hơn khung thì cuộn ngang TRONG panel. Trước đây chỉ đặt trong
   @media 760px nên ở desktop bảng đội cả trang ra (tràn ngang 63px). */
.lb-table-wrap { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ucp-grid--stats {
  grid-template-columns: repeat(4, 1fr);
}
.ucp-stat {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 14px 16px;
  transition: border-color .2s ease;
}
.ucp-stat:hover { border-color: rgba(255, 180, 0, .35); }
.ucp-stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ucp-stat__label i { color: var(--accent); }
.ucp-stat__value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.ucp-stat__sub { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); }

.ucp-two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
/* 2 cột bằng nhau — dùng khi hai bên chứa lượng panel tương đương */
.ucp-two--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Form bên trái rộng hơn. minmax(0,..) bắt buộc: bảng bên phải có th nowrap,
   nếu để 1.25fr/0.75fr trần thì min-content của bảng đẩy ngược cột phải to ra. */
.ucp-two--form { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: left;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(255, 255, 255, .02); }
.data-table .mono { font-family: var(--font-mono); font-weight: 600; }
/* Hàng "chưa có dữ liệu" — thay cho việc để bảng trống trơn */
.data-table .tbl-empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}
.data-table .tbl-empty i { color: var(--accent); opacity: .55; margin-right: 8px; }

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-row:last-child { border-bottom: 0; }
.activity-row i {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}
.activity-row__time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* Form */
.form-grid { display: grid; gap: 12px; padding: 14px 16px; }

/* ---------- BQT đang online: tên + chức vụ ---------- */
.xf-staff {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.xf-staff:last-child { border-bottom: 0; }
.xf-staff img {
  width: 26px; height: 26px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.xf-staff__txt { display: grid; gap: 1px; min-width: 0; line-height: 1.3; }
.xf-staff__txt b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xf-staff__txt small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xf-staff:hover b { text-decoration: underline; }

/* ---------- Huy hiệu vai trò (app/roles.php) ---------- */
.role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 5px;
}
.role-badge {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--role) 45%, transparent);
  background: color-mix(in srgb, var(--role) 13%, transparent);
  color: var(--role);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}
/* Thủ lĩnh tổ chức: nổi hơn thành viên thường */
.role-badge--leader { font-weight: 800; }
.role-badge--admin  { font-weight: 800; }

/* ---------- Form mẫu đơn diễn đàn ---------- */
.form-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 180, 0, .38);
  background: rgba(255, 180, 0, .07);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.form-note i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.form-section {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.form-section:first-child { border-top: 0; }
.form-field .req { color: var(--accent-2); margin-left: 4px; }
/* Mục hệ thống tự điền: hiện sẵn, không cho sửa */
.form-field.is-locked .input {
  background: rgba(255, 255, 255, .015);
  border-style: dashed;
  color: var(--muted);
  cursor: default;
}
.lock-tag {
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: lowercase;
  color: var(--muted-2);
}
.lock-tag i { font-size: 8px; margin-right: 3px; }
.form-field.is-bad .input { border-color: var(--danger, #e5484d); background: rgba(229, 72, 77, .06); }
.hint--bad { color: #ff8f6b !important; }
.hint--bad i { margin-right: 4px; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  font-weight: 400;
  margin: 0;
}
.form-check input[type="checkbox"] {
  width: 17px; height: 17px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-field .hint { margin-top: 6px; font-size: 12px; color: var(--muted-2); }
.input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 14px;
  transition: all .2s ease;
  outline: none;
}
.input:focus { border-color: var(--accent); background: rgba(255, 180, 0, .04); }
.input::placeholder { color: var(--muted-2); }
/* Select tối theo design system (fix nền trắng chữ trắng của select mặc định) */
select.input,
.input--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-color: #17140f;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FFB400' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
select.input option,
.input--select option { background: #17140f; color: #fff; }
.input-icon { position: relative; }
.input-icon > i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 13px;
  pointer-events: none;
}
.input-icon .input { padding-left: 42px; }

/* Gói nạp */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pack {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
}
.pack:hover { border-color: rgba(255, 180, 0, .5); transform: translateY(-3px); }
.pack.is-selected { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 24px rgba(255, 180, 0, .15); }
.pack__bonus {
  position: absolute;
  top: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-2);
  color: #fff;
  padding: 2px 8px;
}
.pack__coin {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.pack__coin small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pack__price { margin-top: 8px; font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 4, 3, .78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }
.auth-modal {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-elevated) url('../img/bg-modal.jpg') center / cover no-repeat;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 60px rgba(255, 180, 0, .1);
  transform: translateY(16px) scale(.97);
  transition: transform .25s ease;
}
.modal-backdrop.is-open .auth-modal { transform: translateY(0) scale(1); }
.auth-modal__head {
  position: relative;
  padding: 26px 26px 0;
  text-align: center;
}
.auth-modal__logo { width: 76px; margin: 0 auto 4px; }
.auth-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
  transition: all .15s ease;
}
.auth-modal__close:hover { color: #fff; border-color: var(--border-strong); background: rgba(255, 255, 255, .05); }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 26px 0;
  border: 1px solid var(--border-strong);
}
.auth-tab {
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: all .2s ease;
}
.auth-tab.is-active { background: var(--accent); color: #000; }
.auth-modal__body { padding: 24px 26px 30px; }
.auth-form { display: none; }
.auth-form.is-active { display: grid; gap: 16px; }
.auth-alert {
  display: none;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.auth-alert.is-error {
  display: block;
  background: rgba(255, 69, 69, .1);
  border-color: rgba(255, 69, 69, .35);
  color: #ff9d9d;
}
.auth-alert.is-success {
  display: block;
  background: rgba(53, 208, 127, .1);
  border-color: rgba(53, 208, 127, .35);
  color: #7fe8b0;
}
.auth-modal .form-field label { color: var(--muted); }
.auth-modal__hint { font-size: 12px; color: var(--muted-2); }
.auth-modal__hint b { color: var(--muted); }
.auth-switch {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}
.auth-switch button {
  color: var(--accent);
  font-weight: 700;
  transition: color .15s ease;
}
.auth-switch button:hover { color: var(--accent-hover); }

/* OTP boxes */
.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.otp-digit {
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  outline: none;
  transition: all .15s ease;
}
.otp-digit:focus { border-color: var(--accent); background: var(--accent-dim); }
.auth-modal .shake { animation: shake .6s cubic-bezier(.36, .07, .19, .97) both; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: grid;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
  font-size: 13.5px;
  animation: toast-in .3s ease;
}
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast i { color: var(--accent); }
.toast--success i { color: var(--success); }
.toast--error i { color: var(--danger); }

/* ============================================================
   404
   ============================================================ */
.error-hero {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}
.error-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 180, 0, .07) 0%, transparent 55%);
  pointer-events: none;
}
.error-hero__code {
  font-family: var(--font-mono);
  font-size: clamp(90px, 16vw, 160px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(to bottom, #fff 30%, rgba(255, 255, 255, .15));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-hero .tag { margin: 22px 0 18px; }
.error-hero__title {
  font-size: clamp(22px, 3.6vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.error-hero__desc { margin-top: 14px; max-width: 480px; color: var(--muted); font-size: 14.5px; }
.error-hero__buttons { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 180, 0, .5); }
  50%      { opacity: .6; box-shadow: 0 0 0 6px rgba(255, 180, 0, 0); }
}
@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes count-flash {
  from { color: var(--accent-hover); }
  to   { color: var(--accent); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stats__grid { grid-template-columns: repeat(3, 1fr); gap: 32px 16px; }
  .stat { border-left: 0; }
  .features__grid { grid-template-columns: 1fr; gap: 40px; }
  .live__grid { grid-template-columns: 1fr; }
  .ucp-grid--stats { grid-template-columns: repeat(2, 1fr); }
  .ucp-two { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .thread-row__last { display: none; }
}
/* Nav ngang cần ~1200px mới đủ chỗ cạnh logo + khu tài khoản. Dưới 1100px thì
   chuyển sang nút hamburger, từ 1100-1279px thì bóp lại — trước đây chỉ đổi ở
   900px nên laptop 1024/1152 bị đẩy tràn ngang cả trang. */
@media (max-width: 1099px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn--ghost.hide-m { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .main-nav { gap: 0; margin-left: 2px; }
  .main-nav__link { padding: 8px 7px; font-size: 11.5px; letter-spacing: .02em; }
  .main-nav__link::after { left: 7px; right: 7px; }
  .header-actions { gap: 8px; }
}

@media (max-width: 900px) {
  .hero__grid-cols { grid-template-columns: 1fr; gap: 40px; }
  .cta__cards-unused { grid-template-columns: 1fr; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .ucp-layout { grid-template-columns: 1fr; }
  .ucp-nav { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .ucp-nav__user { grid-column: 1 / -1; }
  .ucp-nav__sep { display: none; }
  .post { grid-template-columns: 1fr; }
  .post__side {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px 20px;
  }
  .post__avatar { width: 44px; height: 44px; margin: 0; font-size: 17px; }
  .post__stats { display: none; }
  .forum-cat__stats { display: none; }
  .thread-row__nums { display: none; }
}
@media (max-width: 600px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .ucp-grid--stats { grid-template-columns: 1fr 1fr; }
  .pack-grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__cta .btn { flex: 1; }
  .site-header__in { padding: 0 18px; }
}

/* ============================================================
   TỐI ƯU MOBILE — chặn tràn ngang, thu gọn header/bảng
   ============================================================ */
@media (max-width: 760px) {
  /* Không bao giờ để trang trôi ngang */
  html, body { max-width: 100%; overflow-x: hidden; }

  /* Nút tài khoản: ẩn tên (text node trực tiếp) — chỉ còn avatar + mũi tên */
  .user-menu__btn { padding: 6px 8px; gap: 6px; max-width: 100%; font-size: 0; }
  .user-menu__btn > i { font-size: 10px !important; }
  .user-menu__avatar { font-size: 12px; }
  .header-actions { gap: 6px; min-width: 0; flex-shrink: 1; }
  .site-header__in { gap: 8px; }

  /* Lưới phải co được (grid item mặc định min-width:auto gây tràn) */
  .ucp-layout { grid-template-columns: minmax(0, 1fr); }
  /* Dải hồ sơ: cột ngày tháng xuống dòng thay vì ép ngang */
  .ucp-profile { flex-wrap: wrap; row-gap: 10px; }
  .ucp-profile__side {
    width: 100%;
    text-align: left;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .ucp-profile__name { font-size: 15.5px; }
  /* Menu UCP: thanh tab trượt ngang thay vì danh sách dọc ngốn gần nửa màn hình.
     Thẻ người dùng bỏ đi vì menu hamburger đã có sẵn. */
  .ucp-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ucp-nav::-webkit-scrollbar { display: none; }
  .ucp-nav__user { display: none; }
  .ucp-nav__sep  { display: none; }
  .ucp-nav__link {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    padding: 10px 13px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .ucp-nav__link.is-active { border-bottom-color: var(--accent); }
  .container { min-width: 0; }
  /* .ucp-grid dùng cột auto → co theo nội dung dài nhất và làm tràn trang */
  .ucp-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .ucp-grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ucp-two { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .panel, .panel__head { min-width: 0; }
  .panel__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* Dropdown neo theo mép phải màn hình, không tràn */
  .dropdown {
    right: 0;
    left: auto;
    min-width: 0;
    width: min(260px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
  .dropdown__item { white-space: normal; }

  /* Bảng dữ liệu: cuộn ngang trong khung riêng thay vì đẩy cả trang */
  .lb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lb-table-wrap .data-table { min-width: 560px; }

  /* Lưới sự kiện/hộp quà về 2 cột cho dễ bấm */
  /* auto-fill tự chọn số cột theo bề ngang, chỉ siết lại khoảng cách */
  .gb-grid, .cf-grid, .lx-grid { gap: 8px; padding: 12px; }
  .garage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .hc-comb { grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 16px 14px; }
  .hc-cell { font-size: 12px; }

  /* Hàng nút/nhãn dài tự xuống dòng */
  .panel__head { flex-wrap: wrap; gap: 8px; row-gap: 6px; }
  .thread-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nap-tabs { width: 100%; }
  .nap-tab { flex: 1; justify-content: center; padding: 11px 12px; font-size: 12.5px; }

  /* Hoá đơn VietQR xếp dọc */
  .nap-invoice { flex-direction: column; padding: 14px; }
  .nap-invoice__qr img { width: 200px; height: 200px; }

  /* Hộp thoại modal của event vừa màn hình */
  .gb-modal__box, .lx-modal__box, .hc-modal__box, .cf-modal__box { padding: 18px; }
}

@media (max-width: 420px) {
  .garage-grid { grid-template-columns: minmax(0, 1fr); }
  .hc-comb { grid-template-columns: repeat(4, 1fr); }
}


/* ============================================================
   V2 — HIỆU ỨNG BỔ SUNG (theo roleplay.vn)
   ============================================================ */

/* Thanh tiến trình cuộn trang */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px rgba(255, 180, 0, .6);
  z-index: 300;
  pointer-events: none;
}

/* Hero: hiệu ứng vào trang so le */
@keyframes hero-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.hero .anim { opacity: 0; animation: hero-in .8s cubic-bezier(.22, 1, .36, 1) forwards; }
.hero .anim-1 { animation-delay: .05s; }
.hero .anim-2 { animation-delay: .15s; }
.hero .anim-3 { animation-delay: .25s; }
.hero .anim-4 { animation-delay: .4s; }
.hero .anim-5 { animation-delay: .55s; }
.hero .anim-6 { animation-delay: .7s; }
@media (prefers-reduced-motion: reduce) {
  .hero .anim { animation: none; opacity: 1; }
}

/* Chấm ping (đang trực tuyến) */
.ping {
  position: relative;
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping-out 1.5s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping-out {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* Icon coin gif */
.coin-ico { width: 18px; height: 18px; vertical-align: -4px; }

/* ---------- NAV DROPDOWN (hover, mục con) ---------- */
.main-nav__item { position: relative; }
.main-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .18s ease;
  z-index: 80;
  padding: 6px 0;
}
/* Cầu nối hover để không bị hụt chuột giữa link và menu */
.main-nav__item::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 10px;
}
.main-nav__item:hover .main-nav__menu,
.main-nav__item:focus-within .main-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.main-nav__item:hover > .main-nav__link { color: #fff; }
.main-nav__item:hover > .main-nav__link::after { transform: scaleX(1); }
.main-nav__item > .main-nav__link .fa-chevron-down {
  font-size: 9px;
  transition: transform .2s ease;
}
.main-nav__item:hover > .main-nav__link .fa-chevron-down { transform: rotate(180deg); }
.main-nav__menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .15s ease;
}
.main-nav__menu a i {
  width: 15px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  transition: color .15s ease;
}
.main-nav__menu a:hover { background: rgba(255, 180, 0, .07); color: #fff; padding-left: 20px; }
.main-nav__menu a:hover i { color: var(--accent); }
.main-nav__menu .menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---------- NEWS SLIDER (kéo được + autoplay) ---------- */
.news-slider { position: relative; overflow: hidden; cursor: grab; }
.news-slider.is-dragging { cursor: grabbing; }
.news-slider__track {
  display: flex;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.news-slider.is-dragging .news-slider__track { transition: none; }
.news-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 4px 2px 0;
}
.news-slide .news-row { border-top: 1px solid var(--border); }
.news-slider__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.news-slider__counter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: .15em;
}
.news-slider__counter b { color: var(--accent); }
.news-slider__bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.news-slider__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .3s linear;
}
.news-slider__btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 12px;
  transition: all .2s ease;
}
.news-slider__btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- AVATAR SKIN (ảnh nhân vật GTA) ---------- */
.avatar-skin {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.thread-row__avatar, .post__avatar, .ucp-nav__avatar, .user-menu__avatar { overflow: hidden; }
.podium-card__skin {
  position: absolute;
  right: 8px;
  bottom: 52px;
  height: 62%;
  max-width: 40%;
  object-fit: contain;
  object-position: bottom right;
  opacity: .92;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  pointer-events: none;
}
.rank-row__skin {
  width: 30px;
  height: 38px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04);
  flex-shrink: 0;
}

/* ---------- FOOTER HERO (tiêu đề lớn + social, nền tối) ---------- */
.footer-hero {
  border-top: 1px solid var(--border);
  padding: 38px 0 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer-hero__title {
  font-family: var(--font-mono);
  font-size: clamp(20px, 3.2vw, 38px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.03em;
  line-height: 1.05;
}
.footer-hero__title em { font-style: normal; color: var(--accent); }
.footer-hero__socials {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-hero__social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .2s ease;
}
.footer-hero__social:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ---------- UCP: SỰ KIỆN ---------- */
.event-grid {
  display: grid;
  /* auto-fill: màn rộng xếp được 4 cột thay vì cố định 3 -> bớt 1 hàng */
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 12px;
}
.event-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  overflow: hidden;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
}
.event-card:hover { border-color: rgba(255, 180, 0, .45); transform: translateY(-4px); }
.event-card__media {
  position: relative;
  height: 108px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 180, 0, .18) 0%, transparent 60%),
    var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.event-card__media img {
  max-height: 108px;
  max-width: 78%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
  transition: transform .3s ease;
}
.event-card:hover .event-card__media img { transform: scale(1.07) rotate(-2deg); }
.event-card__status {
  position: absolute;
  top: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
}
.event-card__status--live { background: var(--accent); color: #000; }
.event-card__status--soon { background: rgba(255, 255, 255, .1); color: var(--muted); }
.event-card__status--end  { background: rgba(255, 69, 69, .15); color: #ff8f8f; }
.event-card__body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.event-card__name { font-size: 14px; font-weight: 800; text-transform: uppercase; line-height: 1.25; }
/* Mô tả kẹp 2 dòng cho các thẻ cao bằng nhau */
.event-card__desc {
  margin-top: 5px; font-size: 12px; color: var(--muted); flex: 1;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.event-card__foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------- TRANG PHÁP LÝ (điều khoản / quyền riêng tư) ---------- */
.legal-doc {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.legal-doc__head {
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 180, 0, .06) 0%, transparent 100%);
}
.legal-doc__title {
  margin-top: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.legal-doc__meta {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
.legal-doc__body { padding: 26px 30px 30px; }
.legal-doc__lead {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.legal-doc__body h2 {
  margin: 26px 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.legal-doc__body h3 {
  margin: 18px 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.legal-doc__body p { font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.legal-doc__body p + p { margin-top: 10px; }
.legal-doc__body ul { margin: 8px 0 0; padding: 0; list-style: none; }
.legal-doc__body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}
.legal-doc__body li::before {
  content: '';
  position: absolute;
  left: 4px; top: 10px;
  width: 5px; height: 5px;
  background: var(--accent);
}
.legal-doc__body b { color: #fff; font-weight: 700; }
.legal-doc__body a { color: var(--accent); font-weight: 600; }
.legal-doc__body a:hover { text-decoration: underline; }
.legal-doc__foot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
@media (max-width: 760px) {
  .legal-doc__head { padding: 20px 18px 18px; }
  .legal-doc__body { padding: 20px 18px 24px; }
}

/* Vòng quay dùng ảnh thật từ DB, toàn bộ style nằm trong views/ucp/wheel.php.
   Khối CSS vẽ vòng quay bằng conic-gradient trước đây đã bỏ — riêng .wheel-pointer
   (tam giác cam bằng border) còn sót lại đã đè lên nút quay thật nên phải xoá. */

/* ---------- UCP: NHIỆM VỤ ---------- */
.quest-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.quest-row:last-child { border-bottom: 0; }
.quest-row__icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .3);
  color: var(--accent);
  font-size: 14px;
}
.quest-row__main { flex: 1; min-width: 0; }
.quest-row__name { font-size: 13.5px; font-weight: 700; }
.quest-row__bar {
  margin-top: 5px;
  height: 4px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.quest-row__bar span { display: block; height: 100%; background: linear-gradient(to right, var(--accent-2), var(--accent)); }
.quest-row__meta { margin-top: 3px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.quest-row__reward {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.quest-row--done .quest-row__icon { background: rgba(53, 208, 127, .12); border-color: rgba(53, 208, 127, .4); color: var(--success); }

/* Responsive v2 */
@media (max-width: 1100px) {
  .event-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .features__grid { align-items: start; }
  .features__desc { display: none; }
  .feat-row__mdesc {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted-2);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.6;
  }
  .network__mid { grid-template-columns: 1fr; gap: 18px; }
  .network__rule--bot { grid-template-columns: 1fr; gap: 6px; }
  .network__rule--bot span { text-align: left !important; }
}
@media (max-width: 600px) {
  .event-grid { grid-template-columns: 1fr; }
  .link-row__name { font-size: 22px; }
}


/* ============================================================
   V3 — FEATURES ĐƠN GIẢN + VIDEO, ẢNH ASSETS THẬT
   ============================================================ */

/* Features: danh sách trái đơn giản */
.feat-simple { display: grid; }
.feat-simple__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .2s ease;
}
.feat-simple__row:last-child { border-bottom: 0; }
.feat-simple__row:hover { padding-left: 8px; }
.feat-simple__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 180, 0, .3);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 15px;
  transition: all .2s ease;
}
.feat-simple__row:hover .feat-simple__icon { background: var(--accent); color: #000; }
.feat-simple__title {
  font-size: 15.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.feat-simple__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .15em;
}
.feat-simple__desc { margin-top: 4px; font-size: 12.5px; color: var(--muted-2); line-height: 1.6; }

/* Features: khung video bên phải */
.feat-video { position: relative; }
.feat-video__frame {
  position: relative;
  border: 1px solid var(--border-strong);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 40px rgba(255, 180, 0, .07);
  overflow: hidden;
}
.feat-video__frame video {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  display: block;
}
.feat-video__tag {
  position: absolute;
  top: 14px; left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(10, 9, 8, .85);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}
.feat-video__corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--accent);
  pointer-events: none;
}
.feat-video__corner--tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.feat-video__corner--br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.feat-video__caption {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Logo faction trong hàng xếp hạng */
.rank-row__logo {
  width: 38px; height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5));
}

/* Podium: huy hiệu GIF thay icon */
.podium-card__medal--img {
  background: transparent !important;
  border: 0 !important;
  width: 56px; height: 56px;
}
.podium-card__medal--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}

/* Shop: ảnh vật phẩm thật */
.shop-item__icon--img {
  border: 0;
  background: transparent;
  width: 72px; height: 72px;
}
.shop-item__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  transition: transform .25s ease;
}
.shop-item:hover .shop-item__icon--img img { transform: scale(1.1) rotate(-3deg); }

/* Forum: chuyên mục dùng ảnh role */
.forum-cat__icon--img {
  background: transparent;
  border-color: var(--border);
  padding: 5px;
}
.forum-cat__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.forum-cat:hover .forum-cat__icon--img { background: rgba(255, 255, 255, .04); }

@media (max-width: 900px) {
  .feat-video__frame video { min-height: 240px; }
}


/* ============================================================
   V4 — FEAT ACCORDION, BXH CHI TIẾT, BADGE FORUM
   ============================================================ */

/* Features: accordion click mượt */
.feat-simple__row { display: block; padding: 0; }
.feat-simple__row:hover { padding-left: 0; }
.feat-simple__head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 0;
  text-align: left;
  cursor: pointer;
}
.feat-simple__head:hover .feat-simple__icon { background: var(--accent); color: #000; }
.feat-simple__toggle {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted-2);
  transition: transform .3s ease, color .3s ease;
}
.feat-simple__row.is-open .feat-simple__toggle { transform: rotate(45deg); color: var(--accent); }
.feat-simple__row.is-open .feat-simple__icon { background: var(--accent); color: #000; }
.feat-simple__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
  opacity: 0;
}
.feat-simple__row.is-open .feat-simple__body { opacity: 1; }
.feat-simple__body .feat-simple__desc {
  margin: 0;
  padding: 0 30px 14px 54px;
  font-size: 13px;
  color: var(--muted);
}

/* BXH: chips tổng quan */
.lb-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.lb-chip i { color: var(--accent); }
.lb-chip b { color: var(--accent); font-weight: 800; }

/* BXH: badge level + donate trong bảng */
.lb-level {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.lb-level img {
  width: 27px; height: 27px;
  object-fit: contain;
  border: 1px solid var(--border);
}
.lb-donate {
  height: 27px;
  width: auto;
  image-rendering: pixelated;
}

/* Podium: hàng huy hiệu + logo faction */
.podium-card__badges {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.podium-card__badges img {
  height: 27px;
  width: auto;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
}
.podium-card__faction {
  position: absolute;
  right: 14px;
  bottom: 60px;
  width: 86px;
  height: 86px;
  object-fit: contain;
  opacity: .95;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .55));
  pointer-events: none;
}

/* Forum: huy hiệu trong post */
.post__badges {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.post__badges img {
  height: 26px;
  width: auto;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
}
@media (max-width: 900px) {
  .post__badges { justify-content: flex-start; }
}


/* ============================================================
   V5 — HERO ROTATOR, NÚT KIỂU CŨ, BRAND MP GRADIENT,
        COOKIE BAR, TRANG TẢI XUỐNG MỚI
   ============================================================ */

/* Brand: chữ MP tô gradient xéo (30% vàng / 70% trắng theo chiều cao) */
.brand__mp {
  font-style: normal;
  background: linear-gradient(155deg, var(--accent) 0%, var(--accent) 30%, #ffffff 44%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Hero: câu slogan xoay vòng */
.hero-rotator {
  position: relative;
  display: block;
}
/* Slide active nằm TRONG flow → luôn chiếm chỗ thật, không bao giờ đè lên nút */
.hero-rotator__slide {
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  pointer-events: none;
}
.hero-rotator__slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* Nút "Tham gia ngay" kiểu site cũ: icon xe lồi ra khỏi nút vàng */
/* Nút hero: vàng đằm + bóng cứng lệch phải-dưới, hover nhấc chéo lên */
.head-but {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px 15px 96px;
  background: linear-gradient(180deg, #FFC64A 0%, #F0A000 100%);
  color: #201200;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all .23s ease-in-out;
  white-space: nowrap;
  box-shadow: none;
}
.head-but:hover {
  background: linear-gradient(180deg, #FFD05E 0%, #FFAD0F 100%);
  transform: translate(-5px, -5px);
  box-shadow: 5px 5px 0 rgba(255, 205, 95, .55);
}
.head-but:active {
  transform: translate(-1px, -1px);
  box-shadow: 1px 1px 0 rgba(255, 205, 95, .45);
}
.head-but__icon {
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 104px;
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55));
  transition: transform .3s ease, opacity .25s ease;
  pointer-events: none;
}
.head-but:hover .head-but__icon { transform: translateY(-50%) translateX(4px); }
.head-but__icon.is-swapping { opacity: 0; transform: translateY(-50%) translateX(-10px); }

/* Cookie bar cố định đáy màn hình */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 250;
  background: rgba(16, 14, 12, .97);
  border-top: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  animation: cookie-in .45s cubic-bezier(.22, 1, .36, 1);
}
@keyframes cookie-in {
  from { transform: translateY(100%); }
  to   { transform: none; }
}
.cookie-bar__in {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-bar__icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .35);
  color: var(--accent);
  font-size: 16px;
}
.cookie-bar__text {
  flex: 1;
  min-width: 260px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.cookie-bar__text b { color: #fff; }
.cookie-bar__text a { color: var(--accent); font-weight: 700; }
.cookie-bar__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ===== Trang tải xuống mới ===== */
.dl-stores {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 18px;
}
.dl-store {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s ease, transform .25s ease;
}
.dl-store:hover { border-color: rgba(255, 180, 0, .45); transform: translateY(-3px); }
.dl-store--main {
  border-color: rgba(255, 180, 0, .5);
  background: linear-gradient(180deg, rgba(255, 180, 0, .07) 0%, var(--bg-panel) 55%);
}
.dl-store--soon { opacity: .82; }
.dl-store__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dl-store__os {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 22px;
}
.dl-store--main .dl-store__os { background: var(--accent); color: #000; border-color: var(--accent); }
.dl-store__name { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.dl-store__sub { margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.dl-store__specs {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dl-store__specs i { color: var(--accent); margin-right: 5px; }
.dl-store__note { font-size: 11.5px; color: var(--muted-2); margin-top: auto; }

/* Nút kiểu badge store (Google Play / App Store) */
.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 11px 18px;
  background: #000;
  border: 1px solid var(--border-strong);
  transition: all .2s ease;
}
.store-badge i { font-size: 24px; color: #fff; }
.store-badge span { display: grid; line-height: 1.25; text-align: left; }
.store-badge small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-badge b { font-size: 15.5px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.store-badge:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(255, 180, 0, .2); }
.store-badge:hover i { color: var(--accent); }
.store-badge--disabled { opacity: .55; cursor: not-allowed; }
.store-badge--disabled:hover { border-color: var(--border-strong); box-shadow: none; }
.store-badge--disabled:hover i { color: #fff; }

/* 3 bước gọn trong panel kết nối */
.dl-steps {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dl-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  margin-right: 7px;
  font-size: 11px;
}
.dl-steps i { color: var(--muted-2); font-size: 12px; }

@media (max-width: 1100px) {
  .dl-stores { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .head-but { padding-left: 82px; }
  .head-but__icon { width: 88px; left: -14px; }
  .cookie-bar__actions { width: 100%; }
  .cookie-bar__actions .btn { flex: 1; }
  .dl-steps i.fa-arrow-right-long { display: none; }
}

/* ============================================================
   V7 — HERO ROTATOR: GLITCH OUT + SCRAMBLE DECODE
   ============================================================ */
.hero-rotator__slide.is-glitching .line {
  animation: hero-glitch-out .3s steps(2, end) both;
}
.hero-rotator__slide.is-glitching .line--accent {
  animation-delay: .05s;
}
@keyframes hero-glitch-out {
  0% {
    opacity: 1;
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
    text-shadow: none;
  }
  20% {
    transform: translate(-7px, 2px);
    clip-path: inset(12% 0 38% 0);
    text-shadow: 3px 0 rgba(255, 94, 26, .85), -3px 0 rgba(255, 255, 255, .5);
  }
  40% {
    transform: translate(6px, -3px);
    clip-path: inset(55% 0 8% 0);
    text-shadow: -4px 0 rgba(255, 180, 0, .9), 3px 0 rgba(255, 94, 26, .6);
  }
  60% {
    transform: translate(-4px, 1px);
    clip-path: inset(8% 0 62% 0);
    text-shadow: 4px 0 rgba(255, 255, 255, .55), -2px 0 rgba(255, 180, 0, .8);
  }
  80% {
    transform: translate(3px, -2px);
    clip-path: inset(40% 0 22% 0);
    text-shadow: -3px 0 rgba(255, 94, 26, .8);
  }
  100% {
    opacity: 0;
    transform: translate(0, -8px);
    clip-path: inset(0 0 0 0);
    text-shadow: none;
  }
}
/* Slide vào: không dùng slide-up cũ nữa khi scramble đảm nhiệm */
.hero-rotator__slide.is-active.is-decoding {
  transition: none;
}
/* Ký tự đang nhiễu trong lúc giải mã */
.hero-rotator .line .scr {
  color: var(--accent);
  opacity: .75;
}
.hero-rotator .line--accent .scr {
  color: #fff;
  opacity: .6;
}
/* Con trỏ khối nhấp nháy ở cuối dòng đang giải mã */
.hero-rotator .line.is-typing::after {
  content: '';
  display: inline-block;
  width: .5em;
  height: .95em;
  margin-left: 6px;
  vertical-align: -.08em;
  background: var(--accent);
  animation: caret-blink .5s steps(1) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rotator__slide.is-glitching .line { animation: none; }
}

/* ============================================================
   V8 — SOCIAL HERO + KẾT NỐI SAMP://
   ============================================================ */
.hero-socials {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-socials__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-right: 6px;
  position: relative;
  padding-right: 14px;
}
.hero-socials__label::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.hero-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 9, 8, .55);
  backdrop-filter: blur(4px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .22s ease;
}
.hero-social i { font-size: 14px; transition: transform .22s ease; }
.hero-social b {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--accent);
  color: #000;
  letter-spacing: .04em;
}
.hero-social:hover { transform: translateY(-2px); color: #fff; }
.hero-social:hover i { transform: scale(1.2); }
.hero-social--discord:hover  { border-color: #5865F2; box-shadow: 0 6px 20px rgba(88, 101, 242, .35); }
.hero-social--discord:hover i { color: #7a8bff; }
.hero-social--tiktok:hover   { border-color: #fff;    box-shadow: 0 6px 20px rgba(255, 255, 255, .2); }
.hero-social--youtube:hover  { border-color: #ff0000; box-shadow: 0 6px 20px rgba(255, 0, 0, .3); }
.hero-social--youtube:hover i { color: #ff4d4d; }
.hero-social--facebook:hover { border-color: #1877F2; box-shadow: 0 6px 20px rgba(24, 119, 242, .35); }
.hero-social--facebook:hover i { color: #5a9cff; }

/* Bấm địa chỉ server → mở SA-MP (samp://) */
.ip-row__val--link {
  cursor: pointer;
  text-align: left;
  transition: all .2s ease;
}
.ip-row__val--link:hover {
  background: var(--accent-dim);
  text-shadow: 0 0 14px rgba(255, 180, 0, .5);
}

/* ============================================================
   V9 — HERO: CHỮ BỊ BẮN NỔ VĂNG TỪNG KÝ TỰ
   ============================================================ */
.hero-rotator .ch {
  display: inline-block;
  will-change: transform, opacity;
}
/* Bắn ra: lóe sáng rồi văng theo hướng ngẫu nhiên + xoay */
.hero-rotator .ch.is-blast {
  animation: ch-blast .55s cubic-bezier(.3, .05, .7, .4) forwards;
}
@keyframes ch-blast {
  0% {
    transform: none;
    opacity: 1;
  }
  14% {
    transform: translate(2px, -3px) scale(1.12);
    text-shadow: 0 0 16px rgba(255, 180, 0, .95), 0 0 5px rgba(255, 255, 255, .8);
  }
  100% {
    transform: translate(var(--tx, 60px), var(--ty, -80px)) rotate(var(--rot, 20deg)) scale(.6);
    opacity: 0;
    text-shadow: none;
  }
}
/* Chuẩn bị vào: ẩn sẵn */
.hero-rotator .ch.is-pre { opacity: 0; }
/* Đập vào vị trí: rơi từ trên + phóng to rồi ghim xuống, lóe vàng lúc chạm */
.hero-rotator .ch.is-in {
  animation: ch-in .42s cubic-bezier(.18, 1.35, .35, 1) both;
}
@keyframes ch-in {
  0% {
    opacity: 0;
    transform: translateY(-42px) scale(1.9);
    filter: blur(3px);
  }
  55% {
    opacity: 1;
    transform: translateY(3px) scale(.94);
    filter: none;
    text-shadow: 0 0 18px rgba(255, 180, 0, .9), 0 2px 0 rgba(255, 94, 26, .5);
  }
  100% {
    transform: none;
    text-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rotator .ch.is-blast, .hero-rotator .ch.is-in { animation: none; }
  .hero-rotator .ch.is-pre { opacity: 1; }
}

/* ============================================================
   V10 — TOPBAR KHUYẾN MÃI, FIX WRAP TỪ, MANIFESTO MOBILE
   ============================================================ */

/* Từ nguyên vẹn — không bẻ dòng giữa từ trong hero rotator */
.hero-rotator .wd {
  display: inline-block;
  white-space: nowrap;
}

/* Topbar khuyến mãi */
.topbar--red {
  background: linear-gradient(90deg, #C21807 0%, #E02D1B 50%, #C21807 100%);
  color: #fff;
}
.topbar--red .topbar__msg i { color: #FFD65A; }
.topbar__msg {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}
.topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 11px;
  transition: all .2s ease;
}
.topbar__cta:hover { background: #fff; color: #C21807; border-color: #fff; }
.topbar--gold .topbar__cta:hover { color: #000; }
.topbar__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: .7;
  transition: opacity .2s ease;
}
.topbar__close:hover { opacity: 1; }
.topbar { position: relative; }
.topbar .topbar__in { padding-right: 44px; }

/* Manifesto mobile: bỏ khóa tỉ lệ, crop tập trung vào nhân vật bên phải */
@media (max-width: 900px) {
  .manifesto {
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    background-size: cover;
    background-position: 78% center; /* khoe nhân vật bên phải ảnh */
  }
  .manifesto::before {
    background: linear-gradient(to right,
      rgba(10, 9, 8, .93) 0%,
      rgba(10, 9, 8, .78) 48%,
      rgba(10, 9, 8, .42) 78%,
      rgba(10, 9, 8, .25) 100%);
  }
  .manifesto__box { padding: 42px 0; max-width: 100%; }
}

/* ============================================================
   V11 — SOCIAL: SÓNG HOVER TỰ CHẠY + MOBILE GỌN
   ============================================================ */
/* Màu thương hiệu qua biến — dùng chung cho hover thật và preview tự chạy */
.hero-social--discord  { --sc: #5865F2; --sg: rgba(88, 101, 242, .35); --si: #7a8bff; }
.hero-social--tiktok   { --sc: #ffffff; --sg: rgba(255, 255, 255, .22); --si: #ffffff; }
.hero-social--youtube  { --sc: #ff0000; --sg: rgba(255, 0, 0, .32);    --si: #ff4d4d; }
.hero-social--facebook { --sc: #1877F2; --sg: rgba(24, 119, 242, .35); --si: #5a9cff; }
.hero-social.is-preview {
  border-color: var(--sc);
  box-shadow: 0 6px 20px var(--sg);
  transform: translateY(-2px);
  color: #fff;
}
.hero-social.is-preview i {
  color: var(--si);
  transform: scale(1.2);
}

/* Mobile: social gọn thành hàng icon vuông đều nhau */
@media (max-width: 600px) {
  .hero-socials {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 24px;
  }
  .hero-socials__label {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    padding-right: 0;
  }
  .hero-socials__label::after { display: none; }
  .hero-social {
    justify-content: center;
    padding: 12px 4px;
    gap: 0;
    font-size: 0;      /* ẩn chữ, chỉ giữ icon */
    letter-spacing: 0;
  }
  .hero-social i { font-size: 19px; }
  .hero-social b { display: none; }
}

/* ============================================================
   V12 — TIÊU ĐỀ VIDEO NGOÀI KHUNG, TRẠNG THÁI LIVE
   ============================================================ */
.feat-video__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}

/* ============================================================
   V13 — SỐ NGƯỜI CHƠI XOAY KIỂU ĐỒNG HỒ SỐ (ODOMETER)
   ============================================================ */
.odo {
  display: inline-flex;
  align-items: baseline;
  height: 1em;
  overflow: hidden;
  vertical-align: -0.12em;
}
.odo-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}
.odo-strip {
  display: block;
  transition: transform 1.1s cubic-bezier(.25, 1, .35, 1);
  will-change: transform;
}
.odo-strip span {
  display: block;
  height: 1em;
  line-height: 1;
}
.odo-sep { display: inline-block; }

/* ============================================================
   V14 — "CẬP NHẬT MỚI NHẤT" KIỂU MAGAZINE
   ============================================================ */
.news-hub {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 22px;
  align-items: stretch;
}

/* Bài nổi bật: ảnh nền + phủ tối + ngoặc góc vàng */
.news-feat {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
}
.news-feat__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), filter .4s ease;
  filter: saturate(.85);
}
.news-feat__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top,
    rgba(10, 9, 8, .96) 0%,
    rgba(10, 9, 8, .72) 42%,
    rgba(10, 9, 8, .18) 80%,
    rgba(10, 9, 8, .3) 100%);
  transition: opacity .3s ease;
}
.news-feat:hover .news-feat__bg { transform: scale(1.06); filter: saturate(1.05); }
.news-feat:hover { border-color: rgba(255, 180, 0, .55); }
.news-feat__label {
  position: absolute;
  top: 16px; left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(10, 9, 8, .82);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.news-feat__body {
  display: grid;
  gap: 12px;
  padding: 26px;
  width: 100%;
}
.news-feat__title {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.25;
  transition: color .2s ease;
}
.news-feat:hover .news-feat__title { color: var(--accent); }
.news-feat__excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 480px;
}
.news-feat__more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.news-feat__more i { transition: transform .25s ease; }
.news-feat:hover .news-feat__more i { transform: translateX(6px); }

/* Danh sách tin phụ */
.news-side {
  display: grid;
  align-content: stretch;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.news-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  transition: background .2s ease, padding-left .25s ease;
  overflow: hidden;
}
.news-item:last-child { border-bottom: 0; }
/* Vạch vàng trượt vào từ trái khi hover */
.news-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transition: transform .25s ease;
}
.news-item:hover { background: rgba(255, 180, 0, .05); padding-left: 30px; }
.news-item:hover::before { transform: scaleY(1); }
.news-item__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .28);
  transition: all .25s ease;
  line-height: 1;
}
.news-item:hover .news-item__num {
  color: var(--accent);
  -webkit-text-stroke: 1px var(--accent);
}
.news-item__main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.news-item__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.news-item__meta b { color: var(--accent); font-weight: 700; }
.news-item__title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}
.news-item:hover .news-item__title { color: #fff; }
.news-item__arrow {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted-2);
  transition: all .25s ease;
}
.news-item:hover .news-item__arrow { color: var(--accent); transform: translateX(4px); }

@media (max-width: 900px) {
  .news-hub { grid-template-columns: 1fr; }
  .news-feat { min-height: 300px; }
}

/* ============================================================
   V15 — FEATURES: VIDEO TRÁI / TEXT PHẢI (chỉ desktop,
   mobile giữ nguyên text trên - video dưới)
   ============================================================ */
@media (min-width: 1101px) {
  .features__grid { grid-template-columns: 1.05fr .95fr; }
  .features__grid > div:first-child { order: 2; } /* cột text sang phải */
  .features__grid > .feat-video    { order: 1; }  /* video sang trái */
}

/* Modal ở flow ĐĂNG KÝ (register / xác thực / OTP) dùng nền riêng */
.auth-modal--register {
  background-image: url('../img/bg-modal-register.jpg');
}

/* ============================================================
   V16 — MODAL LAYOUT THEO PROJECT CŨ
   (logo trái + X phải, tab gạch chân, input trơn)
   ============================================================ */
.auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  text-align: left;
}
.auth-modal__logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}
.auth-modal__close {
  position: static;
  width: 34px;
  height: 34px;
  border: 0;
  color: var(--muted-2);
  font-size: 14px;
}
.auth-modal__close:hover { background: transparent; border: 0; color: #fff; }

/* Tab gạch chân kiểu cũ: chữ active vàng + vạch dưới, có đường kẻ ngang full */
.auth-tabs {
  position: relative;
  display: flex;
  margin: 12px 0 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
}
.auth-tabs__line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--border-strong);
}
.auth-tab {
  flex: 1;
  position: relative;
  padding: 13px 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12.5px;
  letter-spacing: .1em;
  transition: color .2s ease;
  z-index: 1;
}
.auth-tab:hover { color: var(--muted); }
.auth-tab.is-active {
  background: transparent;
  color: var(--accent);
}
.auth-tab.is-active::after {
  content: '';
  position: absolute;
  left: 14%; right: 14%;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 180, 0, .5);
}

/* Input trong modal: trơn, không icon, cao thoáng hơn */
.auth-modal .input-icon > i { display: none; }
.auth-modal .input-icon .input { padding-left: 16px; }
.auth-modal .input {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .14);
}
.auth-modal .input:focus {
  background: rgba(255, 180, 0, .05);
  border-color: var(--accent);
}
.auth-modal__body { padding: 22px 18px 26px; }

/* Hint trong modal dồn về bên phải */
.hint.auth-modal__hint { text-align: right; }

/* Ảnh xe trong bảng UCP */
.veh-thumb {
  width: 84px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}

/* Lỗi theo từng ô trong modal: chỉ hiện khi sai */
.auth-modal .input.is-invalid {
  border-color: var(--danger);
  background: rgba(255, 69, 69, .06);
}
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: #ff8080;
  text-align: right;
}
.field-error.is-show { display: block; }

/* ============================================================
   V17 — SHOP CARD MỚI + PILL VI PHẠM + LIGHTBOX
   ============================================================ */
/* Card: thông tin trái, ảnh to bên phải KHÔNG nền/viền */
.shop-item__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.shop-item__info { min-width: 0; display: grid; gap: 4px; }
.shop-item__media {
  flex-shrink: 0;
  width: 104px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: zoom-in;
  padding: 0;
}
.shop-item__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
  transition: transform .25s ease;
}
.shop-item:hover .shop-item__media img { transform: scale(1.08); }
.shop-item__media--icon {
  cursor: default;
  color: var(--rarity, var(--muted));
  font-size: 30px;
}
.shop-item__foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shop-item__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: color .2s ease;
}
.shop-item__toggle i { transition: transform .3s ease; }
.shop-item__toggle:hover { color: var(--accent); }
.shop-item.is-open .shop-item__toggle { color: var(--accent); }
.shop-item.is-open .shop-item__toggle i { transform: rotate(180deg); }
/* Chi tiết: đóng mặc định, bấm mũi tên mới xổ */
.shop-item__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
}
.shop-item__details .shop-item__desc {
  margin: 0;
  padding: 12px 2px 2px;
  flex: none;
}

/* Pill mức vi phạm */
.vipham-pill {
  display: inline-block;
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.vipham-pill--warn { background: var(--accent-dim); color: var(--accent); }
.vipham-pill--jail { background: rgba(255, 138, 61, .14); color: #FF8A3D; }
.vipham-pill--ban  { background: rgba(255, 69, 69, .16);  color: #ff8080; }

/* Lightbox preview ảnh */
.img-preview {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(5, 4, 3, .88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
  animation: toast-in .2s ease;
}
.img-preview img {
  max-width: min(90vw, 860px);
  max-height: 84vh;
  object-fit: contain;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, .7));
}
.img-preview__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 17px;
  background: rgba(10, 9, 8, .6);
}

/* Video hero sáng hơn → thêm bóng chữ để tiêu đề vẫn nổi */
.hero__title .line {
  text-shadow: 0 2px 22px rgba(0, 0, 0, .65), 0 1px 3px rgba(0, 0, 0, .5);
}
.hero-socials__label { text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

/* ============================================================
   V18 — FORUM KIỂU XENFORO (như forum.sa-mp.net)
   ============================================================ */
.xf-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.xf-side { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 26px); }
.xf-side__pad { padding: 11px 16px; }
.xf-side__names { font-size: 12.5px; color: var(--accent); line-height: 1.8; }
.xf-side__total { margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.xf-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  margin: 3px 4px 3px 0;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.xf-member img { width: 22px; height: 22px; object-fit: cover; object-position: top; }
.xf-member--staff { border-color: rgba(255, 180, 0, .45); color: var(--accent); }
.xf-stat {
  display: flex;
  justify-content: space-between;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.xf-stat:last-child { border-bottom: 0; }
.xf-stat b { font-family: var(--font-mono); color: #fff; }

/* Khối "Bài viết mới" */
.xf-new {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.xf-new:last-child { border-bottom: 0; }
.xf-new:hover { background: rgba(255, 180, 0, .04); }
.xf-new__avatar {
  width: 34px; height: 34px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.xf-new__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.xf-new__main > * { min-width: 0; }
.xf-new__title {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xf-new:hover .xf-new__title { color: var(--accent); }
.xf-new__meta { font-size: 11px; color: var(--muted-2); }
.xf-new__meta b { color: var(--muted); }
.xf-new__time {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* Prefix pill (Chờ xử lý / Đã xử lý / Locked) */
.xf-prefix {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.xf-prefix--pending { background: var(--accent-dim); color: var(--accent); }
.xf-prefix--done    { background: rgba(53, 208, 127, .14); color: #6fe3a5; }
.xf-prefix--locked  { background: rgba(255, 255, 255, .08); color: var(--muted); }

/* Node chuyên mục kiểu XF: icon | tên+mô tả | stats | bài mới nhất */
.xf-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.xf-node:last-child { border-bottom: 0; }
.xf-node:hover { background: rgba(255, 180, 0, .04); }
.xf-node__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 16px;
  transition: all .2s ease;
}
.xf-node:hover .xf-node__icon { background: var(--accent); color: #000; }
.xf-node__main { flex: 1; min-width: 0; }
.xf-node__name {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.xf-node:hover .xf-node__name { color: var(--accent); }
.xf-node__desc {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xf-node__stats {
  flex-shrink: 0;
  display: grid;
  gap: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: right;
  min-width: 74px;
}
.xf-node__stats b { color: var(--muted); }
.xf-node__last {
  flex-shrink: 0;
  width: 220px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}
.xf-node__last-avatar {
  width: 30px; height: 30px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.xf-node__last-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.xf-node__last-title {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xf-node:hover .xf-node__last-title { color: #fff; }
.xf-node__last-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Nút thích */
.post__like.is-liked { color: var(--accent-2); }
.post__like.is-liked i { color: var(--accent-2); }
.post__like-count { margin-left: 2px; }

@media (max-width: 1100px) {
  .xf-layout { grid-template-columns: 1fr; }
  .xf-side { position: static; }
  .xf-node__last { display: none; }
}
@media (max-width: 700px) {
  .xf-node__stats { display: none; }
}

/* ============================================================
   V19 — BQT ONLINE TRƠN + "BÀI VIẾT MỚI" GỌN KÈM PHÂN MỤC
   ============================================================ */
/* BQT: bỏ nền/viền chip — chỉ avatar + tên vàng */
.xf-member--staff {
  border: 0;
  background: none;
  padding: 4px 10px 4px 0;
  margin: 0 6px 0 0;
}

/* Bài viết mới: hàng gọn hơn */
.xf-new { padding: 8px 16px; gap: 11px; }
.xf-new__avatar { width: 28px; height: 28px; }
.xf-new__title { font-size: 12.5px; }
.xf-new__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
  font-size: 10.5px;
}
/* Phân mục thành pill riêng */
.xf-new__cat {
  display: inline-block;
  padding: 1px 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .25);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xf-new__replies {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* Nút dạng liên kết trong dòng gợi ý (ví dụ "Quên mã PIN?") */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: #fff; }
.link-btn:disabled { opacity: .55; cursor: wait; }

/* .form-grid dùng display:grid nên phải cho [hidden] thắng, không thì form
   "đặt lại PIN" vẫn hiện dù đang bị ẩn. */
.form-grid[hidden] { display: none !important; }

/* Khối "đổi tên trả phí" trong panel đổi tên */
.rn-paid {
  margin-top: 4px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 180, 0, .04);
}
.rn-paid__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.rn-paid__head b { color: #fff; }
.rn-paid__head > span {
  flex: 1 1 100%;
  min-width: 0;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}
.rn-paid__head > span b { color: var(--accent); }

/* ============================================================
   PHÂN TRANG + BẢNG QUY TẮC DIỄN ĐÀN
   ============================================================ */
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 4px;
}
.pager__info { font-size: 11px; color: var(--muted-2); }
.pager__nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.pager__btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all .15s ease;
}
.pager__btn:hover { color: #fff; border-color: var(--accent); }
.pager__btn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #141210;
  font-weight: 800;
}
.pager__gap { color: var(--muted-2); padding: 0 2px; }
@media (max-width: 560px) {
  .pager__nums { margin-left: 0; }
  .pager__info { flex: 1 1 100%; }
}

.forum-rules {
  margin: 16px 0 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}
.forum-rules > summary {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.forum-rules > summary::-webkit-details-marker { display: none; }
.forum-rules > summary i { color: var(--accent); margin-right: 6px; }
.forum-rules > summary:hover { color: #fff; }
.forum-rules ul {
  margin: 0;
  padding: 0 14px 12px 32px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.7;
}

/* ============================================================
   THANH CÔNG CỤ DIỄN ĐÀN (tìm kiếm + lối tắt BQT) + HỘP BÁO CÁO
   ============================================================ */
.xf-toolbar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.xf-search {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.xf-search > i { color: var(--muted-2); font-size: 12px; flex-shrink: 0; }
.xf-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 10px 0;
  color: #fff;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.xf-search input::placeholder { color: var(--muted-2); }
.xf-search button {
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.xf-modlink {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.xf-modlink i { color: #ff6b5e; }
.xf-modlink b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: #ff6b5e;
  color: #141210;
  padding: 0 5px;
}
.xf-modlink:hover { border-color: var(--accent); color: #fff; }

.rp-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.rp-modal__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(3px); }
.rp-modal__box {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.rp-modal__title { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.rp-modal__hint { margin: 0; font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.rp-modal__foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* Thuộc tính `hidden` PHẢI luôn thắng mọi luật display của class — nếu không,
   khối nào đặt display:flex/grid (vd hộp báo cáo .rp-modal) sẽ hiện mãi và
   nút đóng (el.hidden = true) không có tác dụng. Để cuối file cho chắc thắng. */
[hidden] { display: none !important; }

/* Nhãn "Riêng tư" cạnh tên chuyên mục đơn kiện */
.xf-private {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #ff9f6b;
  background: rgba(255, 94, 26, .1);
  border: 1px solid rgba(255, 94, 26, .3);
}
.xf-private i { font-size: 9px; }

/* Huy hiệu Top Donate (Top 1–6 theo Coin) dưới tên người viết */
.post__toprole {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
}
.post__toprole img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}
.post__toprole--1 img { width: 72px; height: 72px; }
.post__toprole span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.post__toprole--1 span { color: #ffe629; }

/* Mẫu đơn: nhóm lựa chọn (chọn một / chọn nhiều / Có-Không) */
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-width: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: rgba(255, 180, 0, .45); }
.choice input { accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.choice span { min-width: 0; }
.choice:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 180, 0, .08);
  color: #fff;
}
.choice-row--multi .choice { flex: 1 1 220px; }

/* ---------- Nội dung bài viết: link, video, ảnh (app/forum-render.php) ---------- */
.post__body--rt { white-space: normal; overflow-wrap: anywhere; line-height: 1.7; }
.post__body--rt strong { color: #fff; }
.rt-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255, 180, 0, .4);
  text-underline-offset: 3px;
  word-break: break-all;
}
.rt-link:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.rt-link .fa-youtube { color: #ff4e45; }
.rt-embed {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 10px 0;
  border: 1px solid var(--border);
  background: #000;
}
.rt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rt-img { display: inline-block; max-width: 100%; margin: 8px 0; }
.rt-img img { display: block; max-width: min(100%, 640px); max-height: 420px; border: 1px solid var(--border); }

/* ---------- Tờ đơn gửi qua mẫu ---------- */
.app-doc {
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 180, 0, .05), transparent 140px), var(--bg-alt);
}
.app-doc__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-strong);
}
.app-doc__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .3);
  color: var(--accent);
  font-size: 18px;
}
.app-doc__title { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 180px; }
.app-doc__title small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.app-doc__title b { font-family: var(--font-display); font-size: 17px; line-height: 1.3; color: #fff; }
.app-doc__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.app-doc__no {
  padding: 4px 9px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.app-doc__status {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.app-doc__status--wait { background: var(--accent-dim); color: var(--accent); }
.app-doc__status--ok   { background: rgba(53, 208, 127, .14); color: #6fe3a5; }
.app-doc__status--deny { background: rgba(255, 69, 69, .14); color: #ff7b7b; }
.app-doc__sec + .app-doc__sec { border-top: 1px solid var(--border-strong); }
.app-doc__sec-title {
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .025);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}
.app-doc__rows { margin: 0; }
.app-doc__row {
  display: grid;
  grid-template-columns: minmax(170px, 34%) 1fr;
  border-bottom: 1px dashed rgba(255, 255, 255, .08);
}
.app-doc__row:last-child { border-bottom: 0; }
.app-doc__row dt {
  padding: 11px 16px 11px 20px;
  border-right: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--muted);
}
.app-doc__row dd { min-width: 0; margin: 0; padding: 11px 20px 11px 16px; font-size: 14px; line-height: 1.65; color: #f4f4f5; }
.app-doc__row--key dd { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.app-doc__row--free { grid-template-columns: 1fr; }
.app-doc__row--free dd { padding-left: 20px; }
.app-doc__empty { color: var(--muted-2); }
.app-doc__foot {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
}
.xf-prefix--deny { background: rgba(255, 69, 69, .14); color: #ff7b7b; }
@media (max-width: 720px) {
  .app-doc__head { padding: 14px 16px; }
  .app-doc__row { grid-template-columns: 1fr; }
  .app-doc__row dt { padding: 10px 16px 2px; border-right: 0; font-size: 12px; }
  .app-doc__row dd { padding: 2px 16px 10px; }
  .app-doc__sec-title { padding: 10px 16px; }
}

/* ---------- Mẫu đơn kiểu XenForo Advanced Forms (views/forum/new.php) ---------- */
.xff { border: 1px solid var(--border); background: var(--bg-panel); }
.xff__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-strong);
  background: linear-gradient(90deg, rgba(255, 180, 0, .07), transparent 60%);
}
.xff__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 180, 0, .3);
  color: var(--accent);
  font-size: 19px;
}
.xff__title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.xff__title b { font-family: var(--font-display); font-size: 18px; color: #fff; }
.xff__title small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.xff__title small em { font-style: normal; }
.xff__title small i { font-size: 10px; color: var(--accent); }
.xff__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 22px 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 180, 0, .35);
  background: rgba(255, 180, 0, .05);
  font-size: 13px;
  line-height: 1.6;
  color: #e4e4e7;
}
.xff__note i { margin-top: 3px; color: var(--accent); }
.xff__alert {
  margin: 14px 22px 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 69, 69, .45);
  background: rgba(255, 69, 69, .08);
  font-size: 13px;
  color: #ff9b9b;
}
.xff__group {
  margin-top: 14px;
  padding: 11px 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .025);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}
.xff-row { display: grid; grid-template-columns: minmax(200px, 34%) 1fr; }
.xff-row + .xff-row { border-top: 1px solid rgba(255, 255, 255, .05); }
.xff-row__label {
  padding: 16px 18px 14px;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, .18);
  text-align: right;
}
.xff-row__label label,
.xff-row__lbl { display: block; font-size: 14px; font-weight: 700; line-height: 1.45; color: #fff; }
.xff-row__req { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted-2); }
.xff-row__req i { margin-right: 3px; font-size: 9.5px; }
.xff-row.is-locked .xff-row__req { color: var(--accent); }
.xff-row__input { min-width: 0; padding: 12px 18px 14px; }
.xff-row__hint { margin-top: 7px; font-size: 12.5px; line-height: 1.55; color: var(--muted-2); }
.xff-row__err { margin-top: 7px; font-size: 12.5px; color: #ff8f6b; }
.xff-row__err i { margin-right: 4px; }
.xff-row.is-bad .input,
.xff-row.is-bad .xff-editor { border-color: var(--danger); background: rgba(255, 69, 69, .05); }
.xff-row.is-bad .xff-row__label label { color: #ff9b9b; }
.xff-row.is-locked .input {
  border-style: dashed;
  background: rgba(255, 255, 255, .015);
  color: var(--muted);
  cursor: default;
}
.xff-date { max-width: 220px; color-scheme: dark; }
.xff-checks { display: flex; flex-direction: column; gap: 7px; padding-top: 4px; }
.xff-checks--inline { flex-direction: row; flex-wrap: wrap; gap: 22px; }
.xff-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #e4e4e7;
  cursor: pointer;
}
.xff-check input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.xff-check:hover span { color: #fff; }
.xff-check input:checked + span { color: var(--accent); }
.xff-check--confirm { font-weight: 500; color: var(--muted); }
.xff-editor { border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03); }
.xff-editor:focus-within { border-color: var(--accent); }
.xff-editor__bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}
.xff-editor__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.xff-editor__btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.xff-editor__sep { width: 1px; height: 18px; margin: 0 6px; background: var(--border-strong); }
.xff-editor__area.input { min-height: 130px; border: 0; background: transparent; line-height: 1.6; resize: vertical; }
.xff-editor__area.input:focus { background: transparent; }
.xff__submit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .02);
}
.xff__submit-note { margin-right: auto; font-size: 12px; color: var(--muted-2); }
.xff__submit-note i { margin-right: 4px; color: var(--accent); }
@media (max-width: 720px) {
  .xff__head, .xff__submit { padding: 14px 16px; }
  .xff__note, .xff__alert { margin: 12px 16px 0; }
  .xff__group { padding: 10px 16px; }
  .xff-row { grid-template-columns: 1fr; }
  .xff-row__label { padding: 14px 16px 4px; border-right: 0; background: transparent; text-align: left; }
  .xff-row__label label, .xff-row__lbl { display: inline; }
  .xff-row__req { display: inline; margin-left: 6px; }
  .xff-row__input { padding: 4px 16px 14px; }
}

/* ---------- Bảng chọn mẫu đơn — "Kiện cáo tại đây" (views/forum/_hub.php) ---------- */
.form-hub {
  max-width: 620px;
  margin: 0 auto 26px;
  border: 1px solid var(--border-strong);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 180, 0, .10), transparent 60%), var(--bg-panel);
}
.form-hub__head { padding: 26px 24px 6px; text-align: center; }
.form-hub__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.form-hub__desc { margin-top: 8px; font-size: 13px; color: var(--muted); }
.form-hub__list { display: flex; flex-direction: column; gap: 12px; padding: 18px 24px 24px; }
.form-hub__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
a.form-hub__item:hover,
button.form-hub__item:hover { border-color: var(--accent); background: rgba(255, 180, 0, .07); transform: translateY(-1px); }
.form-hub__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 18px;
}
.form-hub__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.form-hub__text b { font-size: 15.5px; }
.form-hub__text small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.form-hub__why { font-size: 12px; font-style: normal; color: #ff9b7b; }
.form-hub__why i { margin-right: 3px; }
.form-hub__go { color: var(--muted-2); }
a.form-hub__item:hover .form-hub__go,
button.form-hub__item:hover .form-hub__go { color: var(--accent); }
.form-hub__item.is-off { opacity: .55; cursor: default; }
.form-hub__foot { padding: 0 24px 20px; font-size: 12.5px; text-align: center; color: var(--muted-2); }
.form-hub__foot i { margin-right: 4px; }

/* ---------- Logo tổ chức trên diễn đàn (forum_cat_logo) ---------- */
.xf-node__icon--logo { width: 44px; height: 44px; padding: 0; border-color: transparent; background: transparent; }
.xf-node__icon--logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.xf-node:hover .xf-node__icon--logo { background: transparent; }
.cat-head { display: flex; align-items: center; gap: 16px; }
.cat-head__logo { flex-shrink: 0; width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.xff__icon--logo,
.app-doc__icon--logo { border-color: transparent; background: transparent; }
.xff__icon--logo { width: 58px; height: 58px; }
.app-doc__icon--logo { width: 52px; height: 52px; }
.xff__icon--logo img,
.app-doc__icon--logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.xff__submit .btn[disabled] { opacity: .45; cursor: not-allowed; }
.rt-video { max-width: 640px; margin: 10px 0; }
.rt-video .rt-embed { margin: 0; }
.rt-video__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.rt-video__link:hover { color: var(--accent); }
.rt-video__link i { color: #ff4e45; }

/* ---------- Nhánh con của tổ chức dưới chuyên mục cha (trang diễn đàn) ---------- */
.xf-subnodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 16px 12px 74px;
  border-bottom: 1px solid var(--border);
}
/* Chuyên mục có nhánh con: bỏ vạch kẻ giữa dòng chính và hàng nhánh con */
.xf-node:has(+ .xf-subnodes) { border-bottom-color: transparent; }
.xf-subnode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  font-size: 12.5px;
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}
.xf-subnode:hover { border-color: rgba(255, 180, 0, .5); color: #fff; }
.xf-subnode > i:first-child { font-size: 11px; color: var(--accent); }
.xf-subnode__n { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.xf-subnode__lock { font-size: 10px; color: var(--muted-2); }
@media (max-width: 720px) { .xf-subnodes { padding-left: 16px; } }

/* ---------- Trang chuyên mục tổ chức: đường dẫn, nút, ghi chú quyền, nhánh con ---------- */
.cat-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted-2); }
.cat-crumb a { color: var(--muted); }
.cat-crumb a:hover { color: var(--accent); }
.cat-crumb i { font-size: 9px; opacity: .6; }
.cat-crumb span { color: #fff; }
.cat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.cat-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 180, 0, .3);
  background: rgba(255, 180, 0, .05);
  font-size: 13px;
  line-height: 1.6;
  color: #e4e4e7;
}
.cat-note > i { margin-top: 3px; color: var(--accent); }
.cat-note b { color: #fff; }
.cat-subs { display: grid; gap: 10px; margin-bottom: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cat-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  transition: border-color .2s ease, background .2s ease;
}
.cat-sub:hover { border-color: var(--accent); background: rgba(255, 180, 0, .05); }
.cat-sub__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 16px;
}
.cat-sub__main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cat-sub__main b { font-size: 14.5px; color: #fff; }
.cat-sub__main small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.cat-sub__n { flex-shrink: 0; font-size: 11px; color: var(--muted-2); }
.cat-sub__n b { color: #fff; }

/* ---------- "Bài viết liên quan của bạn" (sidebar diễn đàn) ---------- */
.rel-empty { font-size: 12.5px; line-height: 1.6; color: var(--muted-2); }
.rel-list { display: flex; flex-direction: column; }
.rel-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  transition: background .2s ease;
}
.rel-item:first-child { border-top: 0; }
.rel-item:hover { background: rgba(255, 255, 255, .03); }
.rel-item__why {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.rel-item--mention .rel-item__why { color: var(--accent); }
.rel-item--mine .rel-item__why { color: #6fe3a5; }
.rel-item__title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rel-item__meta { font-size: 11.5px; color: var(--muted-2); }
.rel-item__meta b { color: var(--muted); font-weight: 600; }

/* ---------- @nhắc tên ---------- */
.rt-mention {
  padding: 0 3px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.rt-mention:hover { background: var(--accent); color: #000; }
.mention-pop {
  position: absolute;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.mention-pop__item {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #e4e4e7;
  font: 600 13px var(--font-mono);
  text-align: left;
  cursor: pointer;
}
.mention-pop__item:hover,
.mention-pop__item.is-active { background: var(--accent-dim); color: var(--accent); }

/* ---------- Nút "Quay lại" ngay sau tiêu đề ---------- */
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.title-row .section-title { margin: 0; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.back-btn:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.back-btn i { font-size: 11px; }
.cat-subs__title {
  margin: 4px 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Menu chọn luật vi phạm (đơn kiện) ---------- */
.vpick__field { position: relative; }
.vpick__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.vpick.is-open .vpick__toggle,
.vpick__toggle:focus-visible { border-color: var(--accent); outline: none; }
.vpick__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.vpick__chip {
  padding: 3px 9px;
  border: 1px solid rgba(255, 180, 0, .45);
  background: var(--accent-dim);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.vpick__ph { font-size: 13.5px; color: var(--muted-2); }
.vpick__caret { color: var(--muted); transition: transform .2s ease; }
.vpick.is-open .vpick__caret { transform: rotate(180deg); }
.vpick__menu { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid var(--border-strong); background: var(--bg-elevated); }
.vpick.is-ready .vpick__menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.vpick__opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  cursor: pointer;
}
.vpick__opt:last-child { border-bottom: 0; }
.vpick__opt:hover { background: rgba(255, 255, 255, .04); }
.vpick__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.vpick__box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .03);
  font-size: 10px;
  color: transparent;
}
.vpick__opt input:checked + .vpick__box { border-color: var(--accent); background: var(--accent); color: #000; }
.vpick__opt input:focus-visible + .vpick__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.vpick__opt-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.vpick__opt-main b { font-size: 13.5px; color: #fff; }
.vpick__opt-main small { font-size: 11.5px; line-height: 1.45; color: var(--muted-2); }
.vpick__code {
  flex-shrink: 0;
  padding: 2px 7px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.vpick__cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.vpick__card { padding: 12px 14px; border: 1px solid rgba(255, 180, 0, .3); border-left: 3px solid var(--accent); background: rgba(255, 180, 0, .04); }
.vpick__card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.vpick__card-head b { font-size: 14px; color: #fff; }
.vpick__card-head .vpick__code { border-color: rgba(255, 180, 0, .4); color: var(--accent); }
.vpick__desc { font-size: 13px; line-height: 1.6; color: #d4d4d8; }
.vpick__pen { margin-top: 7px; font-size: 13px; line-height: 1.6; color: #ffcf6b; }
.vpick__pen i { margin-right: 3px; }
.vpick__note { margin-top: 6px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.vpick__note i { margin-right: 3px; color: var(--accent); }
.vpick__more { align-self: flex-start; font-size: 12.5px; color: var(--accent); }
.vpick__more:hover { text-decoration: underline; }

/* ---------- Khối BBCode trong bài: tiêu đề mục, danh sách, bảng, trích dẫn ---------- */
.rt-h { margin: 22px 0 10px; font-family: var(--font-display); line-height: 1.3; color: #fff; }
.rt-h:first-child { margin-top: 0; }
.rt-h1 { font-size: 22px; }
.rt-h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 18px; color: var(--accent); }
.rt-h3 { font-size: 15.5px; }
.rt-hr { height: 1px; margin: 18px 0; border: 0; background: var(--border-strong); }
.rt-list { margin: 8px 0 12px; padding-left: 22px; }
.rt-list li { margin: 5px 0; line-height: 1.65; }
.rt-list li::marker { color: var(--accent); }
.rt-table-wrap { max-width: 100%; margin: 10px 0 14px; overflow-x: auto; }
.rt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rt-table th {
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 180, 0, .08);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
}
.rt-table td { padding: 8px 12px; border: 1px solid var(--border); line-height: 1.5; vertical-align: top; }
.rt-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }
.rt-table td:first-child { font-weight: 700; color: #fff; white-space: nowrap; }
.rt-quote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .03); color: #d4d4d8; }
/* Cột nội dung bài (grid/flex) không được giãn theo bảng rộng — bảng tự cuộn ngang trong .rt-table-wrap */
.post__main,
.post__body { min-width: 0; }

/* ---------- Bài được @nhắc mà chưa xem: viền đỏ, nằm đầu "Bài viết mới" ---------- */
.xf-new.is-mention {
  border: 1px solid rgba(255, 69, 69, .75);
  background: rgba(255, 69, 69, .07);
  box-shadow: inset 3px 0 0 #ff4545;
}
.xf-new.is-mention:hover { background: rgba(255, 69, 69, .12); }
.xf-new__mention {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  background: rgba(255, 69, 69, .18);
  font-weight: 700;
  color: #ff8a8a;
}
.xf-new__count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 1px 7px;
  background: #ff4545;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
}
.rel-item.is-unseen { box-shadow: inset 3px 0 0 #ff4545; background: rgba(255, 69, 69, .06); }

/* Tổ chức chưa có logo riêng trên bảng xếp hạng */
.podium-card__faction--icon,
.rank-row__logo--icon {
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  color: var(--accent);
}
.rank-row__logo--icon { width: 32px; height: 32px; font-size: 14px; }
.podium-card__faction--icon { font-size: 34px; }

/* ---------- Tổ chức / Family trên trang hồ sơ (như UCP cũ) ---------- */
.org-tag { gap: 7px; }
.org-tag b { color: #fff; }
.org-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.org-tag__rank { color: var(--muted); }
.org-tag__stars { color: #ffcc33; letter-spacing: 1px; }

/* ---------- Tên miền chỉ có bản iOS (samobile.org): 1 thẻ App Store ở giữa ---------- */
.dl-stores--single { grid-template-columns: minmax(0, 480px); justify-content: center; }
.dl-card__soon-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
