/* =====================================================================
   DBWULIN HOME PORTAL  v3  ·  "Crimson Arena Pro"
   ---------------------------------------------------------------------
   Viet lai hoan toan cho index.html (khong nap styles.css / theme-*.css).
   Token tu /dbw-ui/dbw-ui.css. Nen trang · vien do · phong cach game.
   Bao gom ca style cho widget do JS tao: .hero-play, .yjj-music-*, .video-modal,
   .banner-dot, .qr-popover, .yjj-lang-switcher.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.pv3 {
  margin: 0; font-family: var(--dbw-font); font-size: 14.5px; line-height: 1.55; color: var(--dbw-ink);
  background: var(--dbw-bg); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

:root { --pv-dark: #120709; --pv-dark-2: #1d0b10; --pv-topbar-h: 70px; --pv-strip-h: 34px; }

/* tieu de khoi */
.pv-title {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--dbw-display); font-size: 20px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; color: var(--dbw-ink);
}
.pv-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--dbw-red); flex: 0 0 auto; }
.pv-title--sm { font-size: 16px; }
.pv-title--sm::before { height: 16px; }
.pv-title-sub { font-size: 13px; color: var(--dbw-ink-3); }

/* ============ 1. HEADER ============ */
.topbar { position: sticky; top: calc(-1 * var(--pv-strip-h)); z-index: 100; background: #fff; box-shadow: 0 2px 0 var(--dbw-red), 0 8px 24px rgba(21,24,29,.08); }
.topbar-strip { height: var(--pv-strip-h); background: var(--pv-dark); color: rgba(255,255,255,.78); font-size: 12.5px; }
.topbar-strip-inner { height: 100%; display: flex; align-items: center; gap: 14px; }
.strip-status { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px; font-family: var(--dbw-display); }
.strip-status i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.strip-sep { width: 1px; height: 14px; background: rgba(255,255,255,.18); }
.strip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-links { margin-left: auto; display: flex; gap: 18px; }
.strip-links a { color: rgba(255,255,255,.78); font-weight: 600; white-space: nowrap; transition: color .2s; }
.strip-links a:hover { color: #fff; }

.topbar-inner { height: var(--pv-topbar-h); display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.topnav { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: 1 1 auto; min-width: 0; }
.topnav a {
  position: relative; padding: 10px 12px; border-radius: 6px; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--dbw-ink-2); transition: color .2s, background .2s;
}
.topnav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--dbw-red); transform: scaleX(0); transform-origin: left; transition: transform .22s var(--dbw-ease); }
.topnav a:hover { color: var(--dbw-red); }
.topnav a:hover::after { transform: scaleX(1); }
.auth-links { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.auth-links span { display: none; }
.auth-links a {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 6px;
  font-size: 13.5px; font-weight: 700; white-space: nowrap; transition: all .2s;
}
.auth-links a:first-of-type { color: var(--dbw-ink); border: 1px solid var(--dbw-line-2); background: #fff; }
.auth-links a:first-of-type:hover { border-color: var(--dbw-red); color: var(--dbw-red); background: var(--dbw-red-50); }
.auth-links a:last-of-type { color: #fff; background: var(--dbw-grad-red); border: 1px solid var(--dbw-red-600); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), var(--dbw-shadow-red); }
.auth-links a:last-of-type:hover { filter: brightness(1.08); }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--dbw-line-2); background: #fff; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; color: var(--dbw-ink); }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.topbar.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 2. HERO ============ */
.hero {
  position: relative; height: clamp(360px, 42vw, 620px); overflow: hidden; background-color: var(--pv-dark);
  background-image: url("./images/wuxia-hero.png?v=20261102"); background-position: center 30%; background-size: cover; background-repeat: no-repeat;
}
.hero-bg-video, .hero-bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; z-index: 0; pointer-events: none; }
.hero-bg-video[hidden], .hero-bg-image[hidden], .hero-logo[hidden] { display: none !important; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(18,7,9,.82) 100%);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--dbw-grad-red-h); z-index: 2; }
.hero-logo { position: absolute; left: clamp(24px, 4vw, 80px); top: 50%; transform: translateY(-50%); width: clamp(220px, 28vw, 460px); height: auto; max-height: 78%; object-fit: contain; filter: drop-shadow(0 14px 28px rgba(8,12,22,.45)); z-index: 3; pointer-events: none; user-select: none; }

.hero-caption {
  position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); margin: 0; z-index: 3;
  color: #ffd57a; font-family: "ZCOOL XiaoWei", "Cinzel", "Noto Serif SC", var(--dbw-font), serif;
  font-size: clamp(20px, 2vw, 32px); font-weight: 800; letter-spacing: .08em; white-space: nowrap; text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 0 18px rgba(255,196,64,.55), 0 0 36px rgba(255,196,64,.35);
}
/* admin-runtime dat inline bottom:36px cho vi tri bottom-*; day caption len tren khoang action band de len hero (64px) */
.hero-caption[style*="bottom: 36px"] { translate: 0 -62px; }
@keyframes yjj-hero-caption-pulse { 0%,100% { filter: drop-shadow(0 0 6px rgba(255,196,64,.35)); } 50% { filter: drop-shadow(0 0 18px rgba(255,196,64,.85)); } }
.hero-caption.hero-caption-pulse { animation: yjj-hero-caption-pulse 2.6s ease-in-out infinite; }

/* nut play do admin-runtime.js tao */
.hero-play {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 4;
  width: 74px; height: 74px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); cursor: pointer;
  background: rgba(200,16,46,.9); color: #fff; font-size: 0;
  box-shadow: 0 0 0 10px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.45);
  transition: transform .2s var(--dbw-ease), box-shadow .2s, background .2s;
}
.hero-play::before { content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.hero-play:hover, .hero-play:focus-visible { transform: translate(-50%, -50%) scale(1.06); background: var(--dbw-red); box-shadow: 0 0 0 14px rgba(255,255,255,.18), 0 22px 46px rgba(0,0,0,.5); outline: none; }
.hero-play[hidden], .hero-play.is-hidden, .hero-play.yjj-hero-play--off, .hero-play[aria-hidden="true"], .hero-play[disabled] {
  display: none !important; visibility: hidden !important; pointer-events: none !important; opacity: 0 !important;
}

/* ============ 3. ACTION BAND ============ */
.action-band { position: relative; z-index: 5; margin-top: -64px; }
.action-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 96px; gap: 12px;
  padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--dbw-line); box-shadow: var(--dbw-shadow-lg);
}
.action-grid > a {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; border-radius: 10px;
  background-color: var(--pv-dark-2); background-size: cover; background-position: center; color: #fff;
  font-family: var(--dbw-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.15;
  padding: 14px 16px; border: 1px solid rgba(0,0,0,.2);
  transition: transform .2s var(--dbw-ease), box-shadow .2s;
}
.action-grid > a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,4,6,.1) 0%, rgba(10,4,6,.45) 55%, rgba(10,4,6,.86) 100%); transition: background .25s; }
.action-grid > a::after {
  content: "→"; position: absolute; right: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--dbw-font); font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; transition: background .2s, transform .2s;
}
.action-grid > a:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(21,24,29,.22); }
.action-grid > a:hover::before { background: linear-gradient(180deg, rgba(200,16,46,.15) 0%, rgba(120,8,26,.55) 55%, rgba(74,4,16,.9) 100%); }
.action-grid > a:hover::after { background: var(--dbw-red); border-color: var(--dbw-red-400); transform: translateX(2px); }

.download-card { grid-column: 1 / span 2; grid-row: 1 / span 2; font-size: 26px; padding: 20px 22px !important; }
.download-card .quick-link-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; background-image: url("./images/wuxia-btn-download.png?v=20261102"); transition: transform .6s var(--dbw-ease); }
.download-card:hover .quick-link-bg { transform: scale(1.05); }
.download-card::before { background: linear-gradient(180deg, rgba(10,4,6,.05) 0%, rgba(10,4,6,.35) 45%, rgba(10,4,6,.9) 100%) !important; }
.download-card .act-ico {
  position: absolute; left: 20px; top: 20px; width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--dbw-grad-red); border: 1px solid var(--dbw-red-400); box-shadow: 0 10px 24px rgba(200,16,46,.45);
}
.download-card .act-ico svg { width: 24px; height: 24px; }
.download-card span { display: block; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.download-card::after { background: var(--dbw-red); border-color: var(--dbw-red-400); width: 30px; height: 30px; }
.mini-link { font-size: 16px; }
.image-button { font-size: 14px; letter-spacing: .06em; }
.action-grid > a:nth-child(2) { grid-column: 3 / span 2; }
.action-grid > a:nth-child(3) { grid-column: 5 / span 2; }

/* ============ 4. MAIN LAYOUT ============ */
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 28px; margin-bottom: 56px; }
.center-column, .right-rail { min-width: 0; }

/* card chung */
.pv-card, .news-tabs, .news-card, .banner-block, .feature-story, .info-box, .ally-box, .showcase-card {
  background: #fff; border: 1px solid var(--dbw-line); border-radius: 12px; box-shadow: var(--dbw-shadow-sm);
}

/* --- 4a. news panel (banner trai + tin phai) --- */
.news-tabs-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px;
  grid-template-areas:
    "banner tabs"
    "banner news"
    "story  story"
    "mhead  mhead"
    "guide  guide"
    "updates updates";
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
}
.news-tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 5px; }
.news-tab {
  height: 36px; padding: 0 8px; border: 0; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: transparent; color: var(--dbw-ink-2); font-weight: 700; font-size: 13px; transition: all .2s;
}
.news-tab:hover { color: var(--dbw-red); background: var(--dbw-red-50); }
.news-tab.is-active { color: #fff; background: var(--dbw-grad-red); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 16px rgba(200,16,46,.3); }

.news-card { grid-area: news; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.news-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--dbw-line); }
.news-head-tag { flex: 0 0 auto; margin-top: 3px; height: 20px; padding: 0 8px; border-radius: 4px; display: inline-flex; align-items: center; background: var(--dbw-red); color: #fff; font-family: var(--dbw-display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.news-head-trigger { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; font-size: 16px; font-weight: 800; line-height: 1.4; color: var(--dbw-ink); transition: color .2s; }
.news-head-trigger:hover { color: var(--dbw-red); }
.news-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 8px 18px 12px; flex: 1; }
.news-items, .news-dates { display: flex; flex-direction: column; }
.news-items a, .news-dates span { height: 40px; display: flex; align-items: center; border-bottom: 1px dashed var(--dbw-line); font-size: 14px; }
.news-items a:last-child, .news-dates span:last-child { border-bottom: 0; }
.news-items a { position: relative; padding-left: 14px; padding-right: 10px; color: var(--dbw-ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 40px; transition: color .2s; }
.news-items a::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--dbw-red); opacity: .7; }
.news-items a:hover { color: var(--dbw-red); }
.news-dates span { justify-content: flex-end; color: var(--dbw-ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.banner-block { grid-area: banner; position: relative; overflow: hidden; min-height: 320px; background: var(--pv-dark-2); border-color: transparent; }
.banner-link { position: absolute; inset: 0; display: block; }
.banner-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--dbw-ease); }
.banner-block:hover .banner-link img { transform: scale(1.04); }
.banner-block::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(10,4,6,.7)); pointer-events: none; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.banner-dot { width: 24px; height: 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,.45); cursor: pointer; transition: background .2s, width .2s; }
.banner-dot:hover, .banner-dot:focus-visible { background: rgba(255,255,255,.85); }
.banner-dot.is-active { background: var(--dbw-red); width: 36px; }

/* --- 4b. feature story --- */
.feature-story { grid-area: story; padding: 16px 18px 18px; }
.feature-story-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.story-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.story-filter { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--dbw-line-2); background: #fff; color: var(--dbw-ink-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.story-filter:hover { border-color: var(--dbw-red); color: var(--dbw-red); }
.story-filter.is-active { background: var(--dbw-red); border-color: var(--dbw-red); color: #fff; }
.feature-story-visual { position: relative; aspect-ratio: 21 / 8; border-radius: 10px; overflow: hidden; background: var(--pv-dark-2); }
.feature-story-visual img { width: 100%; height: 100%; object-fit: cover; }
.feature-story-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,4,6,.1), rgba(10,4,6,0) 50%, rgba(10,4,6,.5)); pointer-events: none; }
.feature-story-view {
  position: absolute; right: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 6px; background: var(--dbw-grad-red); color: #fff; border: 1px solid var(--dbw-red-600);
  font-family: var(--dbw-display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), var(--dbw-shadow-red); transition: filter .2s, transform .15s;
}
.feature-story-view::after { content: "→"; font-family: var(--dbw-font); }
.feature-story-view:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* --- 4c. modes --- */
.modes-head { grid-area: mhead; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 6px; }
.guide-grid { grid-area: guide; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.updates-grid { grid-area: updates; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guide-card, .update-card {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--pv-dark-2);
  border: 1px solid var(--dbw-line); transition: transform .2s var(--dbw-ease), box-shadow .2s, border-color .2s;
}
.update-card { aspect-ratio: 21 / 9; }
.guide-card img, .update-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--dbw-ease); }
.guide-card::after, .update-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,4,6,0) 35%, rgba(10,4,6,.85) 100%); pointer-events: none; }
.guide-label, .update-label {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; color: #fff;
  font-family: var(--dbw-display); font-size: 17px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); padding-left: 12px;
}
.guide-label::before, .update-label::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--dbw-red); }
.guide-card:hover, .update-card:hover { transform: translateY(-3px); box-shadow: var(--dbw-shadow-lg); border-color: var(--dbw-red-line); }
.guide-card:hover img, .update-card:hover img { transform: scale(1.06); }

/* ============ 5. RIGHT RAIL ============ */
.right-rail { display: flex; flex-direction: column; gap: 18px; }
.icon-box { padding: 10px; }
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.icon-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 8px; color: var(--dbw-ink-2); transition: background .2s, color .2s; }
.icon-cell:hover, .icon-cell:focus-visible { background: var(--dbw-red-50); color: var(--dbw-red); }
.icon-glyph { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; line-height: 1; font-weight: 800; background: var(--dbw-bg-2); color: var(--dbw-ink); border: 1px solid var(--dbw-line); transition: all .2s; }
.icon-cell:hover .icon-glyph { background: var(--dbw-red); color: #fff; border-color: var(--dbw-red); }
.icon-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.icon-facebook { font-family: Georgia, serif; }
.icon-wechat { color: #09b83e; } .icon-bilibili { color: #00a1d6; } .icon-qq { color: #12b7f5; }
.qr-popover { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 60; display: none; width: 168px; padding: 10px; background: #fff; border: 1px solid var(--dbw-line); border-radius: 12px; box-shadow: var(--dbw-shadow-lg); }
.qr-popover img { display: block; width: 146px; height: 146px; margin: 0 auto; object-fit: contain; }
.qr-popover .qr-caption { display: block; margin-top: 6px; font-size: 12px; color: var(--dbw-ink-2); text-align: center; }
.icon-cell.has-qr:hover .qr-popover, .icon-cell.has-qr:focus-within .qr-popover { display: block; }

.showcase-card { position: relative; aspect-ratio: 3 / 2; overflow: hidden; cursor: pointer; background-color: var(--pv-dark-2); background-size: cover; background-position: center; border-color: transparent; transition: transform .2s var(--dbw-ease), box-shadow .2s; }
.showcase-card:hover { transform: translateY(-2px); box-shadow: var(--dbw-shadow-lg); }
.showcase-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,4,6,.2), rgba(10,4,6,0) 35%, rgba(10,4,6,.75) 100%); pointer-events: none; }
.showcase-cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #fff; font-family: var(--dbw-display); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding-left: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.showcase-cap::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--dbw-red); }
.showcase-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(10,4,6,.5); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background .2s; }
.showcase-arrow:hover { background: var(--dbw-red); border-color: var(--dbw-red); }
.showcase-arrow-left { left: 10px; } .showcase-arrow-right { right: 10px; }

.info-box { padding: 14px 16px 10px; }
.info-box > h3 { margin: 0 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--dbw-line); font-family: var(--dbw-display); font-size: 16px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.info-box > h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--dbw-red); flex: 0 0 auto; }
.info-box > h3 a { color: var(--dbw-ink); transition: color .2s; }
.info-box > h3 a:hover { color: var(--dbw-red); }
.info-box ul { list-style: none; margin: 0; padding: 0; }
.info-box li a { position: relative; display: block; padding: 8px 0 8px 16px; font-size: 13.5px; color: var(--dbw-ink-2); font-weight: 500; border-bottom: 1px dashed var(--dbw-line); transition: color .2s, padding-left .2s; }
.info-box li:last-child a { border-bottom: 0; }
.info-box li a::before { content: ""; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--dbw-red); opacity: .6; transition: opacity .2s; }
.info-box li a:hover { color: var(--dbw-red); padding-left: 20px; }
.info-box li a:hover::before { opacity: 1; }

.ally-box { padding: 14px 16px 14px; }
.ally-head { margin-bottom: 12px; }
.ally-rule { display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 6px; background: var(--dbw-grad-red); color: #fff; font-family: var(--dbw-display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.28); margin-bottom: 8px; }
.ally-rule-middle { margin-top: 12px; background: var(--dbw-ink); }
.ally-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ally-icon { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 6px; border: 1px solid var(--dbw-line-2); background: #fff; color: var(--dbw-ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: all .2s; }
.ally-icon:hover { border-color: var(--dbw-red); color: var(--dbw-red); background: var(--dbw-red-50); }
.ally-desc { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--dbw-ink-3); }

/* ============ 6. FOOTER ============ */
.site-footer { position: relative; color: #fff; background: linear-gradient(180deg, #2a0a10 0%, var(--pv-dark) 100%); border-top: 3px solid var(--dbw-red); }
.footer-overlay { display: none; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 10px 36px; align-items: center; padding: 30px 0 26px; }
.footer-top { display: flex; align-items: center; gap: 12px; }
.footer-logo { height: 38px; width: auto; }
.footer-brand { margin: 0; font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.footer-links { margin: 0; justify-self: end; font-size: 13px; color: rgba(255,255,255,.7); }
.footer-copy { grid-column: 1 / -1; margin: 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ============ 7. VIDEO MODAL ============ */
.video-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.video-modal.is-open { display: block; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(8,10,16,.78); backdrop-filter: blur(6px); }
.video-modal-dialog { position: relative; width: min(960px, calc(100vw - 32px)); margin: 6vh auto 0; padding: 14px; background: #101217; border: 1px solid rgba(255,255,255,.08); border-top: 3px solid var(--dbw-red); border-radius: 12px; box-shadow: 0 28px 60px rgba(0,0,0,.5); }
.video-modal-close { position: absolute; top: 6px; right: 10px; border: 0; background: transparent; color: #d8dce7; font-size: 28px; cursor: pointer; line-height: 1; }
.video-modal-close:hover { color: var(--dbw-red-400); }
.video-modal-title { margin: 0 0 10px; color: #fff; font-family: var(--dbw-display); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.video-frame { position: relative; background: #000; border-radius: 6px; overflow: hidden; }
.hero-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* ============ 8. MUSIC FAB (yjj-music.js) ============ */
.yjj-music-fab { position: fixed; z-index: 90; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.yjj-music-fab[data-position="top-right"]    { top: calc(var(--pv-strip-h) + var(--pv-topbar-h) + 14px); right: 18px; }
.yjj-music-fab[data-position="top-left"]     { top: calc(var(--pv-strip-h) + var(--pv-topbar-h) + 14px); left: 18px; align-items: flex-start; }
.yjj-music-fab[data-position="bottom-right"] { bottom: 18px; right: 18px; flex-direction: column-reverse; }
.yjj-music-fab[data-position="bottom-left"]  { bottom: 18px; left: 18px; align-items: flex-start; flex-direction: column-reverse; }
.yjj-music-fab > * { pointer-events: auto; }
.yjj-music-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--dbw-red-line); background: #fff; color: var(--dbw-red);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--dbw-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.yjj-music-btn:hover, .yjj-music-btn:focus-visible { transform: scale(1.08); box-shadow: var(--dbw-shadow-red); border-color: var(--dbw-red); outline: none; }
.yjj-music-btn .yjj-music-icon { display: inline-flex; }
.yjj-music-btn .yjj-music-icon-mute { display: none; }
.yjj-music-fab.is-muted .yjj-music-btn .yjj-music-icon { display: none; }
.yjj-music-fab.is-muted .yjj-music-btn .yjj-music-icon-mute { display: inline-flex; }
@keyframes yjj-music-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(200,16,46,.45); } 50% { box-shadow: 0 0 0 10px rgba(200,16,46,0); } }
.yjj-music-fab.yjj-music-fab--pulse .yjj-music-btn { animation: yjj-music-pulse 1.6s ease-out infinite; }
@keyframes yjj-music-spin { to { transform: rotate(360deg); } }
.yjj-music-fab.is-playing .yjj-music-icon svg { animation: yjj-music-spin 4.5s linear infinite; transform-origin: center; }
.yjj-music-panel {
  width: 260px; max-width: calc(100vw - 36px); padding: 12px 14px 10px; border-radius: 12px; border: 1px solid var(--dbw-line);
  background: #fff; color: var(--dbw-ink); font-size: 12.5px; box-shadow: var(--dbw-shadow-lg);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.yjj-music-fab:hover .yjj-music-panel, .yjj-music-fab:focus-within .yjj-music-panel, .yjj-music-fab.yjj-music-panel-open .yjj-music-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.yjj-music-controls button:disabled { opacity: .45; cursor: not-allowed; }
.yjj-music-empty-hint { list-style: none; padding: 8px; margin: 0; border-radius: 8px; background: var(--dbw-red-50); color: var(--dbw-ink-2); font-size: 12px; line-height: 1.45; }
.yjj-music-panel-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--dbw-line); margin-bottom: 8px; }
.yjj-music-now { font-family: var(--dbw-display); font-size: 14px; color: var(--dbw-red); letter-spacing: .05em; font-weight: 600; }
.yjj-music-state { font-size: 11px; color: var(--dbw-ink-3); }
.yjj-music-controls { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.yjj-music-controls button { flex: 1; height: 32px; border-radius: 6px; border: 1px solid var(--dbw-line-2); background: #fff; color: var(--dbw-ink); cursor: pointer; font-size: 14px; transition: all .18s ease; }
.yjj-music-controls button:hover { border-color: var(--dbw-red); color: var(--dbw-red); background: var(--dbw-red-50); }
.yjj-music-list { list-style: none; margin: 0; padding: 0; max-height: 160px; overflow-y: auto; }
.yjj-music-item { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--dbw-ink-2); line-height: 1.35; }
.yjj-music-item:hover { background: var(--dbw-bg); }
.yjj-music-item.is-active { background: var(--dbw-red-50); color: var(--dbw-red); font-weight: 600; }
.yjj-music-num { color: var(--dbw-ink-4); }

/* ============ 9. LANG SWITCHER (yjj-i18n inject) ============ */
body .yjj-lang-switcher { top: auto !important; bottom: 20px !important; right: 20px !important; font-family: var(--dbw-font) !important; z-index: 95 !important; }
body .yjj-lang-button { background: #fff !important; color: var(--dbw-ink) !important; border: 1px solid var(--dbw-red-line) !important; box-shadow: 0 10px 28px rgba(21,24,29,.18) !important; padding: 9px 14px !important; font-weight: 600; }
body .yjj-lang-button strong { color: var(--dbw-red) !important; opacity: 1 !important; font-family: var(--dbw-display); }
body .yjj-lang-menu { top: auto !important; bottom: calc(100% + 10px) !important; background: #fff !important; border: 1px solid var(--dbw-line) !important; border-radius: 12px !important; box-shadow: var(--dbw-shadow-lg) !important; }
body .yjj-lang-option { color: var(--dbw-ink) !important; border-radius: 8px !important; font-weight: 600; }
body .yjj-lang-option small { color: var(--dbw-ink-3); }
body .yjj-lang-option:hover, body .yjj-lang-option.is-active { background: var(--dbw-red-50) !important; color: var(--dbw-red) !important; }

/* ============ 10. RESPONSIVE ============ */
@media (max-width: 1180px) {
  .topnav a { padding: 10px 9px; font-size: 13.5px; }
  .portal-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
}
@media (max-width: 1024px) {
  .topbar-strip { display: none; }
  .topbar { top: 0; }
  :root { --pv-strip-h: 0px; }
  .nav-toggle { display: inline-flex; order: 3; }
  .auth-links { order: 2; margin-left: auto; }
  .auth-links a:first-of-type { display: none; }
  .topnav {
    position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 8px 16px 14px; display: none; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 3px solid var(--dbw-red); box-shadow: 0 20px 40px rgba(21,24,29,.15);
  }
  .topbar.is-open .topnav { display: flex; }
  .topnav a { padding: 12px 10px; font-size: 15px; }
  .topnav a::after { display: none; }
  .topnav a:hover { background: var(--dbw-red-50); }

  .portal-layout { grid-template-columns: 1fr; }
  .right-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .right-rail .icon-box { grid-column: 1 / -1; }
  .action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 88px; }
  .download-card { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .action-grid > a:nth-child(2) { grid-column: 3 / span 2; }
  .action-grid > a:nth-child(3) { grid-column: 3 / span 2; }
  .yjj-music-fab[data-position="top-right"], .yjj-music-fab[data-position="top-left"] { top: auto; bottom: 18px; left: 18px; right: auto; align-items: flex-start; flex-direction: column-reverse; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); }
  .hero { height: clamp(260px, 60vw, 420px); }
  /* admin co the dat font-size inline rat lon cho desktop -> ep lai tren mobile de khong tran */
  .hero-caption { font-size: clamp(16px, 6vw, 26px) !important; letter-spacing: .06em !important; white-space: normal; max-width: 92%; }
  .hero-caption[style*="bottom: 36px"] { translate: 0 -48px; }
  .action-band { margin-top: -44px; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 84px; padding: 10px; gap: 10px; }
  .download-card { grid-column: 1 / -1; grid-row: auto; font-size: 20px; padding: 14px 16px !important; }
  .download-card .act-ico { position: static; width: 40px; height: 40px; margin-right: 12px; align-self: center; flex: 0 0 auto; }
  .download-card { align-items: center; }
  .download-card span { flex: 1; font-size: 18px; }
  .action-grid > a:nth-child(2), .action-grid > a:nth-child(3) { grid-column: auto; }
  .news-tabs-panel { grid-template-columns: 1fr; grid-template-areas: "banner" "tabs" "news" "story" "mhead" "guide" "updates"; grid-template-rows: auto; }
  .banner-block { aspect-ratio: 16 / 9; min-height: 0; }
  .feature-story-visual { aspect-ratio: 16 / 9; }
  .modes-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .modes-head .pv-title { white-space: nowrap; }
  .modes-head .pv-title-sub { padding-left: 14px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updates-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .update-card { aspect-ratio: 1 / 1; }
  .guide-label, .update-label { font-size: 14px; left: 10px; right: 10px; bottom: 9px; }
  .right-rail { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding-bottom: 84px; }
  .footer-links { justify-self: start; }
  body .yjj-lang-switcher { bottom: 14px !important; right: 14px !important; }
}
