/* ============================================================
   NROASIKO - Shared Light Theme (Design System)
   Tông sáng + cam, đồng bộ với trang chủ index.php
   ============================================================ */

:root {
  --brand: #f97316;
  --brand-strong: #ea580c;
  --brand-deep: #c2410c;
  --accent: #fbbf24;
  --accent-deep: #f59e0b;
  --emerald: #059669;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --rose: #e11d48;

  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-warm: #fff7ed;
  --text: #334155;
  --heading: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-brand: rgba(249, 115, 22, 0.28);

  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(249, 115, 22, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.18);

  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Be Vietnam Pro', 'Plus Jakarta Sans', sans-serif;

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

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   BODY / SHELL
   ============================================================ */
body.site-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff7ed 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-container {
  max-width: var(--container);
  width: 100%;
  margin: 20px auto 40px;
  padding: 0 16px;
}
@media (max-width: 768px) {
  .site-container { margin: 12px auto 24px; padding: 0 10px; }
}

a { color: inherit; }
img { max-width: 100%; }

.font-display { font-family: var(--font-display); letter-spacing: .5px; }
.text-brand { color: var(--brand-strong) !important; }
.text-muted { color: var(--muted) !important; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-brand);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (min-width: 640px) { .site-header-inner { min-height: 72px; } }
.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 0;
}
.site-logo img {
  height: 40px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  transition: transform .2s;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.08));
}
@media (min-width: 640px) { .site-logo img { height: 48px; max-width: 230px; } }
.site-logo:hover img { transform: scale(1.05); }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-left: 12px;
  flex: 1;
  min-width: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all .18s;
}
.site-nav a:hover { color: var(--brand-strong); background: #fff7ed; }
.site-nav a.active { color: var(--brand-strong); background: #fff7ed; border-color: var(--line-brand); font-weight: 700; }
.site-nav a i { font-size: 12px; }
.site-nav a:nth-child(1) i { color: var(--brand); }
.site-nav a:nth-child(2) i { color: var(--brand); }
.site-nav a:nth-child(3) i { color: var(--violet); }
.site-nav a:nth-child(4) i { color: var(--accent-deep); }
.site-nav a:nth-child(5) i { color: var(--emerald); }
.site-nav a:nth-child(6) i { color: var(--accent); }
.site-nav a:nth-child(7) i { color: #ec4899; }

/* Nút Chơi Ngay (WebGL) — CTA nổi bật */
.site-header .site-nav a.nav-play {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .35);
  margin-left: 8px;
}
.site-header .site-nav a.nav-play:hover,
.site-header .site-nav a.nav-play.active {
  color: #fff;
  background: linear-gradient(135deg, #059669, #047857);
}
.site-header .site-nav a.nav-play i { color: #fff; }

.site-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

/* Auth buttons */
.btn-login, .btn-register {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all .18s;
}
.btn-login { color: #334155; background: #f1f5f9; border-color: #cbd5e1; }
.btn-login:hover { color: var(--brand-strong); background: #e2e8f0; }
.btn-login i { color: var(--brand); }
.btn-register { color: #fff; background: linear-gradient(90deg, #f97316, #f59e0b, #ef4444); box-shadow: 0 10px 22px -8px rgba(249, 115, 22, 0.6); }
.btn-register:hover { filter: brightness(1.06); }

/* User pill + dropdown */
.user-menu { position: relative; }
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 5px 14px 5px 11px;
  min-width: 172px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #fdba74;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color .18s;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.user-pill > span { flex: 1; min-width: 88px; }
.user-pill:hover { border-color: var(--brand); }
.user-pill img {
  width: 34px; height: 34px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--bg-soft);
  padding: 2px;
  border: 1px solid var(--brand);
}
.user-pill .u-name { font-size: 12.5px; font-weight: 800; color: var(--heading); line-height: 1.15; }
.user-pill .u-vnd { font-size: 11px; font-weight: 700; color: var(--brand-strong); }
.user-pill .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.user-pill .dot.on { background: #10b981; }
.user-pill .dot.off { background: var(--rose); }
.user-pill .chev { font-size: 10px; color: #94a3b8; margin-left: 2px; transition: transform .2s; }
.user-menu:hover .chev { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 214px;
  max-width: calc(100vw - 20px);
  padding: 8px;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  box-shadow: 0 22px 44px -14px rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 60;
}
@media (max-width: 640px) {
  .user-dropdown {
    right: 0;
    width: 200px;
    max-width: calc(100vw - 24px);
  }
}
.user-menu:hover .user-dropdown,
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown .ud-head { padding: 6px 8px; margin-bottom: 6px; border-bottom: 1px solid #f1f5f9; font-size: 11.5px; color: #475569; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.user-dropdown a:hover { background: #fff7ed; color: var(--brand-strong); }
.user-dropdown a i { width: 16px; text-align: center; }
.user-dropdown .u-danger { color: #e11d48; }
.user-dropdown .u-danger:hover { background: #fff1f2; color: #be123c; }
.user-dropdown .ud-sep { height: 1px; background: #f1f5f9; margin: 6px 4px; }

.site-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: var(--heading);
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 992px) {
  .site-nav { display: none; }
  .site-header-actions .hide-sm { display: none; }
  .site-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 640px) {
  .site-header-inner {
    padding: 0 10px;
    gap: 6px;
    min-height: 56px;
  }
  .site-logo img {
    height: 32px;
    max-width: 115px;
  }
  .site-header-actions {
    gap: 6px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 14px;
    flex-shrink: 0;
  }
  .user-pill {
    min-width: 0 !important;
    max-width: 140px;
    padding: 4px 8px 4px 6px;
    gap: 6px;
    flex-shrink: 1;
  }
  .user-pill img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .user-pill > span {
    min-width: 0;
    overflow: hidden;
  }
  .user-pill .u-name {
    font-size: 11.5px;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  .user-pill .u-vnd {
    font-size: 10px;
    white-space: nowrap;
  }
  .user-pill .chev {
    display: none;
  }
  .site-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    margin-left: 2px;
  }
}

@media (max-width: 380px) {
  .site-header-inner {
    padding: 0 8px;
    gap: 4px;
  }
  .site-logo img {
    height: 28px;
    max-width: 95px;
  }
  .site-header-actions {
    gap: 4px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .user-pill {
    max-width: 120px;
    padding: 3px 6px 3px 4px;
    gap: 4px;
  }
  .user-pill img {
    width: 24px;
    height: 24px;
  }
  .user-pill .u-name {
    max-width: 60px;
    font-size: 11px;
  }
  .user-pill .u-vnd {
    font-size: 9.5px;
  }
  .site-toggle {
    width: 34px !important;
    height: 34px !important;
    font-size: 15px !important;
  }
}

/* Mobile nav — sổ phủ xuống như dropdown tài khoản, KHÔNG đẩy layout */
.site-mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 16px 16px;
  border-bottom: 1px solid var(--line-brand);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 22px 44px -14px rgba(15, 23, 42, 0.28);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .18s, transform .18s, visibility .18s;
  pointer-events: none;
  z-index: 900;
}
.site-mobile-nav.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.site-mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
}
.site-mobile-nav a:hover, .site-mobile-nav a.active { background: #fff7ed; color: var(--brand-strong); }
.site-mobile-nav a i { width: 18px; color: var(--brand); text-align: center; }
.site-mobile-nav .m-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
}
.site-mobile-nav .m-user img { width: 32px; height: 32px; border-radius: 8px; background: #fff; padding: 2px; border: 1px solid var(--brand); }
.site-mobile-nav .m-user .m-name { font-size: 12.5px; font-weight: 800; color: var(--heading); }
.site-mobile-nav .m-user .m-vnd { font-size: 11px; font-weight: 700; color: var(--brand-strong); }
.site-mobile-nav .m-user .m-logout { font-size: 11px; font-weight: 700; color: #e11d48; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; padding: 4px 10px; text-decoration: none; }
.site-mobile-nav .m-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.site-mobile-nav .m-auth a { justify-content: center; font-weight: 700; }
.site-mobile-nav .m-auth a.m-login { background: #f1f5f9; color: #1e293b; border: 1px solid #cbd5e1; }
.site-mobile-nav .m-auth a.m-register { background: linear-gradient(90deg, #f97316, #f59e0b); color: #fff; }

/* ============================================================
   TICKER
   ============================================================ */
.site-ticker {
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.95), #fffbeb, rgba(255, 247, 237, 0.95));
  border-bottom: 1px solid rgba(253, 186, 116, 0.45);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.site-ticker-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.site-ticker .ticker-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-ticker .ticker-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.site-ticker .ticker-marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: tickerScroll 24s linear infinite;
}
.site-ticker .ticker-marquee:hover .ticker-marquee-track { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.site-ticker .badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -4px rgba(234, 88, 12, 0.7);
}
.site-ticker .badge-new i { color: #fde68a; animation: tickerBounce 1.4s infinite; }
@keyframes tickerBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.site-ticker .badge-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.site-ticker .badge-pin i { color: #fde047; }
.site-ticker a.ticker-link {
  color: var(--heading);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding-right: 64px;
}
.site-ticker a.ticker-link:hover { color: var(--brand-strong); }
.site-ticker .ticker-time { color: var(--muted); font-weight: 500; }
.site-ticker .ticker-cta {
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-ticker .ticker-cta:hover { color: #9a3412; }
@media (max-width: 640px) {
  .site-ticker .ticker-cta { display: none; }
}

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.panel-warm {
  background: linear-gradient(160deg, #fff7ed, #ffffff);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head .ph-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff7ed; color: var(--brand-strong);
  font-size: 18px;
}
.panel-head h1, .panel-head h2, .panel-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--heading);
}
.panel-head p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.section-title .st-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff7ed; color: var(--brand-strong);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: var(--radius-sm) !important;
  border-width: 1px;
  font-weight: 700;
  transition: all .18s;
}

.btn-primary,
.btn-brand {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  border-color: #ea580c !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, 0.6) !important;
  text-shadow: none !important;
}
.btn-primary:hover, .btn-brand:hover { filter: brightness(1.05); transform: translateY(-1px); }

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-color: #059669 !important;
  color: #fff !important;
  text-shadow: none !important;
}
.btn-info {
  background: linear-gradient(135deg, #22d3ee, #0891b2) !important;
  border-color: #0891b2 !important;
  color: #fff !important;
  text-shadow: none !important;
}
.btn-warning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-color: #f59e0b !important;
  color: #422006 !important;
  text-shadow: none !important;
}
.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  border-color: #e11d48 !important;
  color: #fff !important;
  text-shadow: none !important;
}
.btn-secondary {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  text-shadow: none !important;
}
.btn-dark {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #fff !important;
  text-shadow: none !important;
}
.btn-outline-primary { border-color: var(--brand) !important; color: var(--brand-strong) !important; background: transparent !important; }
.btn-outline-primary:hover { background: var(--brand) !important; color: #fff !important; }
.btn-outline-warning { border-color: var(--accent-deep) !important; color: var(--accent-deep) !important; background: transparent !important; }
.btn-outline-warning:hover { background: var(--accent) !important; color: #422006 !important; }

/* Header action buttons (used by nav/cards) */
.btn-action, .btn-download, .btn-diendan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm) !important;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-strong) !important;
  background: #fff7ed !important;
  border: 1px solid var(--line-brand) !important;
  text-decoration: none;
  white-space: nowrap;
  transition: all .18s;
}
.btn-action:hover, .btn-download:hover, .btn-diendan:hover {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, 0.6);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select, textarea.form-control {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm) !important;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  padding: 10px 13px;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  outline: none;
}
.form-label { font-weight: 700; color: var(--heading); font-size: 13px; margin-bottom: 6px; }

.input-group-text {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm) !important;
  background: var(--bg-soft);
  color: var(--muted);
}
.input-group > .form-control { border-radius: var(--radius-sm) !important; }
.input-group > .form-control:not(:first-child):not(:last-child),
.input-group > .input-group-text:first-child + .form-control { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > .btn:last-child { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > .input-group-text:first-child { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* ============================================================
   TABS / CHIPS (diễn đàn)
   ============================================================ */
.chip-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface-warm);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.chip-tabs .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  transition: all .18s;
}
.chip-tabs .chip:hover { border-color: var(--brand); color: var(--brand-strong); transform: translateY(-1px); }
.chip-tabs .chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: var(--brand-strong);
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, 0.6);
}
.chip-tabs .chip.active i { color: #fff !important; }

/* ============================================================
   FORUM: tác giả / bài viết
   ============================================================ */
.forum-author { width: 54px; flex-shrink: 0; text-align: center; }
.forum-author img { image-rendering: pixelated; }
.forum-author b { display: block; font-size: 10px; font-weight: 800; margin-top: 4px; }
.forum-thread-title { font-weight: 800; color: var(--heading); text-decoration: none; }
.forum-thread-title:hover { color: var(--brand-strong); }
.forum-thread-title.is-pinned { color: var(--rose); }

/* ============================================================
   REWARDS (Ủng hộ / Giftcode)
   ============================================================ */
.reward-card {
  background: var(--surface);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.reward-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.reward-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px dashed var(--line-brand);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.reward-title { font-size: 15px; font-weight: 800; color: var(--brand-deep); }
.reward-price {
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  font-size: 13px;
}
.reward-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.reward-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 84px;
  max-width: 130px;
  text-align: center;
}
.reward-item:hover { background: #fff; border-color: var(--brand); }
.reward-item img { width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.reward-item-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.reward-item-qty {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-deep);
  background: var(--surface-warm);
  padding: 1px 8px;
  border-radius: 999px;
  margin-top: 3px;
}
.reward-item-opts { font-size: 10px; color: var(--cyan); line-height: 1.25; margin-top: 3px; text-align: center; }
.bonus-section {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px dashed var(--accent-deep);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
}
.bonus-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.copy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--emerald), #047857);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.copy-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
}
.copy-btn:hover { background: #fff; color: #047857; transform: translateY(-2px); }

/* ============================================================
   MỐC NẠP (sự kiện tích nạp)
   ============================================================ */
.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.pill-label::before { content: ''; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }

.rail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rail-title { margin: 4px 0 0; font-size: 1.2rem; font-weight: 800; color: var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-chip { font-size: 10px; font-weight: 700; color: var(--brand-strong); background: var(--surface-warm); border: 1px solid var(--line-brand); padding: 2px 9px; border-radius: 999px; }
.total-box {
  background: var(--surface-warm);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  transition: opacity .25s ease, transform .25s ease;
}
.total-box b { color: var(--brand-strong); font-size: 1.1rem; }
.total-box.mcn-hide { opacity: 0; transform: translateY(-4px); pointer-events: none; }

.rail { height: 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.rail-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent-deep)); transition: width .6s ease; }
.rail-nodes { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; margin-top: 10px; }
.rail-node { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
.rail-node-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; background: #fff; border: 2px solid var(--line); color: var(--muted); transition: .2s; }
.rail-node.done .rail-node-dot { border-color: var(--emerald); color: var(--emerald); background: #ecfdf5; }
.rail-node.ready .rail-node-dot { width: 44px; height: 44px; margin-top: -4px; border-color: var(--brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .7); }
.rail-node.lock.mythic .rail-node-dot { border-color: var(--accent-deep); color: var(--accent-deep); }
.rail-node.ready.mythic .rail-node-dot { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: var(--accent-deep); }
.rail-node-val { margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--heading); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-node-state { margin-top: 2px; font-size: 9px; letter-spacing: .06em; font-weight: 800; text-transform: uppercase; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-node.done .rail-node-val, .rail-node.ready .rail-node-val { color: var(--brand-strong); }
.rail-node.ready .rail-node-state { color: var(--brand-strong); }
.rail-zone.dense .rail-node-dot { width: 28px; height: 28px; font-size: 11px; }
.rail-zone.dense .rail-node.ready .rail-node-dot { width: 36px; height: 36px; }
.rail-zone.dense .rail-node-val { font-size: 10px; }
.rail-zone.dense .rail-node-state { font-size: 7.5px; }

.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.milestone-card { position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.milestone-card.is-ready { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(249, 115, 22, .18); }
.milestone-card.is-mythic { border-color: var(--accent-deep); background: linear-gradient(180deg, #fffbeb, #fff); }
.milestone-card.is-claimed { opacity: .75; }
.milestone-ribbon { position: absolute; top: 12px; right: -40px; transform: rotate(45deg); font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 4px 44px; background: linear-gradient(90deg, var(--brand), var(--brand-strong)); color: #fff; z-index: 2; }
.milestone-ribbon.gold { background: linear-gradient(90deg, var(--accent), var(--accent-deep)); color: #422006; }
.milestone-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-brand); }
.milestone-req { font-weight: 800; font-size: .95rem; color: var(--heading); }
.milestone-card.is-ready .milestone-req { color: var(--brand-strong); }
.milestone-card.is-mythic .milestone-req { color: var(--accent-deep); }
.milestone-name { margin: 0; font-size: 1rem; font-weight: 800; text-align: center; color: var(--heading); }
.milestone-card.is-ready .milestone-name { color: var(--brand-strong); }
.milestone-card.is-mythic .milestone-name { color: var(--accent-deep); }
.milestone-note { margin: 0; font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.45; }
.milestone-progress { margin-top: auto; }
.ms-bar { height: 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.ms-bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent-deep)); transition: width .4s ease; }
.ms-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-bottom: 5px; }
.ms-labels b { color: var(--brand-strong); }
.ms-action { margin-top: auto; }
.ms-action .btn { width: 100%; }

/* Nhóm quà "chọn 1 trong N" của mốc nạp */
.mcn-choice { border: 1px dashed var(--line-brand); border-radius: var(--radius-sm); background: var(--surface-warm); padding: 10px; }
.mcn-choice-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--brand-strong); display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.mcn-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.mcn-choice-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 6px 7px; cursor: pointer; text-align: center; min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mcn-choice-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.mcn-choice-item input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.mcn-choice-item img { width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; }
.mcn-choice-item .reward-item-name { max-width: 100%; }
.mcn-choice-item:has(input:checked), .mcn-choice-item.checked, .mcn-choice-item.picked {
  border-color: var(--brand-strong); box-shadow: 0 0 0 2px rgba(249, 115, 22, .22); background: #fff;
}
.mcn-choice-tick {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; font-size: 10px;
  display: none; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
}
.mcn-choice-item:has(input:checked) .mcn-choice-tick,
.mcn-choice-item.checked .mcn-choice-tick,
.mcn-choice-item.picked .mcn-choice-tick { display: flex; }
.mcn-chosen-note { margin-top: 7px; font-size: .74rem; font-weight: 700; color: var(--emerald); text-align: center; }

.rar-common { background: #f1f5f9; color: var(--muted); }
.rar-rare { background: #e0f2fe; color: #0369a1; }
.rar-epic { background: #ede9fe; color: #6d28d9; }
.rar-legend { background: #dbeafe; color: #1d4ed8; }
.rar-mythic { background: linear-gradient(90deg, var(--accent), var(--accent-deep)); color: #422006; }

.ms-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.ms-rule { display: flex; gap: 10px; font-size: .82rem; color: var(--text); line-height: 1.55; }
.ms-rule b { color: var(--heading); }
.ms-rule-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-warm); color: var(--brand-strong); border: 1px solid var(--line-brand); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }

@media (max-width: 575px) {
  .rail-node-dot { width: 28px; height: 28px; font-size: 11px; }
  .rail-node.ready .rail-node-dot { width: 34px; height: 34px; }
  .rail-node-val { font-size: 9.5px; }
  .rail-node-state { font-size: 7.5px; }
  .ms-rules { grid-template-columns: 1fr; }
}

/* ============================================================
   ALERTS / BADGES
   ============================================================ */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13.5px;
}
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.badge { border-radius: 999px; font-weight: 700; padding: .38em .7em; }

/* ============================================================
   LEGACY CONTENT OVERRIDES (forum, ibox, topic, tables)
   ============================================================ */
.ibox { margin-bottom: 20px; }
.ibox-title {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 18px;
  color: var(--heading);
  font-weight: 800;
}
.ibox-content {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
  padding: 18px 20px !important;
  color: var(--text);
}
.topic_name {
  background: #fff7ed;
  border: 1.5px solid var(--line-brand);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.alert-frame {
  background: #fff7ed;
  border: 1.5px solid var(--line-brand);
  border-radius: var(--radius-md);
  padding: 12px;
}
.forum-post-container .media { border-bottom: 1px solid var(--line); }
.forum-post-info { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.forum-item { border-bottom: 1px solid var(--line); }

/* Tables */
.table { color: var(--text); }
.table > :not(caption) > * > * { border-color: var(--line); padding: .7rem .75rem; }
.table thead th {
  background: #fff7ed;
  color: var(--heading);
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--line-brand) !important;
}
.table tbody tr:hover { background: #fff7ed; }

/* ============================================================
   USER PROFILE CARD (shown onshell)
   ============================================================ */
.user-profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.user-profile-card .upc-line { font-size: 14px; color: var(--text); }
.user-profile-card .upc-line b { color: var(--brand-strong); }

/* ============================================================
   AUTH PAGES HELPERS
   ============================================================ */
.auth-card {
  max-width: 440px;
  margin: 18px auto;
  background: var(--surface);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 30px 28px;
}
.auth-icon {
  width: 60px; height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff; font-size: 24px;
  box-shadow: 0 8px 20px -8px rgba(249, 115, 22, 0.7);
}

/* Info list (dạng bảng nhãn/giá trị) */
.info-list {
  background: var(--surface-warm);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-md);
  padding: 4px 16px;
  margin-bottom: 16px;
}
.info-list .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-brand);
  font-size: 13.5px;
}
.info-list .info-row:last-child { border-bottom: none; }
.info-list .info-label { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.info-list .info-label i { color: var(--brand); width: 16px; text-align: center; }
.info-list .info-value { color: var(--heading); font-weight: 700; text-align: right; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.badge-pill--safe { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-pill--warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* Editor (khung soạn thảo có thanh công cụ) */
.editor-box {
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.editor-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-warm);
  border-bottom: 1px solid var(--line-brand);
}
.editor-toolbar .tool-btn {
  background: #fff;
  border: 1px solid var(--line-brand);
  border-radius: 6px;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  cursor: pointer;
  line-height: 1.3;
  transition: all .15s;
}
.editor-toolbar .tool-btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.editor-toolbar .tool-sep { width: 1px; height: 16px; background: var(--line-brand); margin: 0 2px; }
.editor-box textarea {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 180px;
  resize: vertical;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 30px;
  background: #0b1020;
  color: #94a3b8;
  font-size: 13px;
  border-top: 1px solid #1e293b;
}
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 34px 16px 22px;
}
.site-footer .sf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e293b;
}
@media (min-width: 768px) {
  .site-footer .sf-grid { grid-template-columns: 2fr 1fr 1fr; gap: 34px; }
}
.site-footer .sf-brand { display: inline-flex; align-items: center; }
.site-footer .sf-brand img { height: 48px; width: auto; max-width: 230px; object-fit: contain; }
.site-footer .sf-desc { margin: 12px 0 0; max-width: 440px; line-height: 1.7; color: #94a3b8; }
.site-footer .sf-warn { margin: 12px 0 0; color: #fbbf24; font-size: 12px; font-weight: 500; }
.site-footer .sf-col h4 {
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 0 0 14px;
}
.site-footer .sf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer .sf-links li { display: flex; align-items: center; gap: 8px; }
.site-footer .sf-links a { color: #94a3b8; text-decoration: none; transition: color .15s; }
.site-footer .sf-links a:hover { color: var(--accent); }
.site-footer .sf-links i { width: 16px; text-align: center; }
.site-footer .sf-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 18px;
  color: #64748b;
  font-size: 11.5px;
  text-align: center;
}
.site-footer .sf-copy p { margin: 0; }
.site-footer .sf-copy b { color: #e2e8f0; }

/* ============================================================
   MISC LEGACY (pagination, cards)
   ============================================================ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.card-header {
  background: #fff7ed;
  border-bottom: 1px solid var(--line-brand);
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--heading);
}
.card-body { padding: 18px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; }
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: all .18s;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand-strong); background: #fff7ed; }
.pagination a.active, .pagination a[class="active"] {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #ea580c;
  color: #fff;
}

/* Status text colors used inline in legacy tables */
font[color="orange"] { color: #d97706 !important; }
font[color="green"] { color: #059669 !important; }
font[color="red"] { color: #dc2626 !important; }

/* ============================================================
   LEGAL / CONTENT PAGES (Điều khoản, Chính sách)
   ============================================================ */
.legal { color: var(--text); line-height: 1.78; font-size: 14px; }
.legal h2 {
  font-size: 1.02rem;
  color: var(--heading);
  font-weight: 800;
  margin: 24px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--brand); }
.legal .legal-updated { font-size: 12.5px; color: var(--muted); margin: 0; }
.legal a { color: var(--brand-strong); font-weight: 600; text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal .legal-note {
  background: var(--surface-warm);
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--brand-deep);
}
