/* ==========================================================
   HÀ PHONG VISUALS — Theme 2026 (Sáng / Tối)
   Dùng cho index.php + project.php. Admin vẫn dùng style.css.
   ========================================================== */

:root,
[data-theme="dark"] {
    --bg: #0a0a0c;
    --bg-soft: #111114;
    --surface: #15151a;
    --surface-2: #1c1c22;
    --surface-3: #24242c;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #f5f5f6;
    --text-2: #c9c9cf;
    --muted: #8d8d96;
    --accent: #e30613;
    --accent-2: #ff3b47;
    --accent-soft: rgba(227, 6, 19, .12);
    --gold: #fbbf24;
    --ok: #22c55e;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
    --shadow-sm: 0 6px 20px -8px rgba(0, 0, 0, .6);
    --header-bg: rgba(10, 10, 12, .72);
    --chip-bg: rgba(255, 255, 255, .06);
    --img-bg: #1a1a1f;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f6f5f2;
    --bg-soft: #efede8;
    --surface: #ffffff;
    --surface-2: #f4f3ef;
    --surface-3: #eae8e2;
    --border: rgba(20, 20, 20, .08);
    --border-strong: rgba(20, 20, 20, .16);
    --text: #131315;
    --text-2: #3c3c42;
    --muted: #74747c;
    --accent: #d90512;
    --accent-2: #f0303c;
    --accent-soft: rgba(217, 5, 18, .08);
    --gold: #d97706;
    --ok: #16a34a;
    --shadow: 0 24px 50px -24px rgba(30, 25, 15, .25);
    --shadow-sm: 0 6px 18px -10px rgba(30, 25, 15, .3);
    --header-bg: rgba(246, 245, 242, .8);
    --chip-bg: rgba(20, 20, 20, .05);
    --img-bg: #e8e6e0;
    color-scheme: light;
}

:root {
    --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --container: 1240px;
    --header-h: 68px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
kbd {
    font-family: var(--font);
    font-size: .82em;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--chip-bg);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    white-space: nowrap;
}
::selection { background: var(--accent); color: #fff; }

.hx-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .hx-container { padding: 0 16px; } }

/* ── Buttons ── */
.hx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; padding: 0 24px;
    border-radius: 999px; border: 1px solid transparent;
    font-size: .98rem; font-weight: 600; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.hx-btn:active { transform: scale(.97); }
.hx-btn svg { flex-shrink: 0; }
.hx-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 10px 30px -8px rgba(227, 6, 19, .55);
}
.hx-btn-primary:hover { box-shadow: 0 14px 36px -8px rgba(227, 6, 19, .7); transform: translateY(-1px); }
.hx-btn-ghost { background: var(--chip-bg); color: var(--text); border-color: var(--border-strong); }
.hx-btn-ghost:hover { border-color: var(--text); }
.hx-btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hx-btn-glass:hover { background: rgba(255, 255, 255, .24); }
.hx-btn.is-done { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; box-shadow: none; }
.hx-btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.05rem; }
.hx-btn-sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }

/* ── Header ── */
.hx-header {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    height: var(--header-h);
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
.hx-header.scrolled,
.hx-header.is-solid {
    background: var(--header-bg);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom-color: var(--border);
}
.hx-header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hx-logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.hx-logo img { width: 40px; height: 40px; border-radius: 50%; }
.hx-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.hx-logo-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.hx-logo-sub { font-size: .62rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--accent-2); }
.hx-nav { display: flex; align-items: center; gap: 6px; }
.hx-nav-link { padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; color: var(--text-2); transition: color .2s, background .2s; }
.hx-nav-link:hover { color: var(--text); background: var(--chip-bg); }
.hx-nav-cta { background: var(--accent); color: #fff !important; font-weight: 600; }
.hx-nav-cta:hover { background: var(--accent-2); }
.hx-tools { display: flex; align-items: center; gap: 8px; }
.hx-lang { display: flex; padding: 3px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border); }
.hx-lang a { padding: 5px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); transition: color .2s, background .2s; }
.hx-lang a:hover { color: var(--text); }
.hx-lang a.active { background: var(--text); color: var(--bg); }
.hx-icon-btn {
    width: 40px; height: 40px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border); background: var(--chip-bg);
    color: var(--text); cursor: pointer; transition: border-color .2s, transform .3s var(--ease);
}
.hx-icon-btn:hover { border-color: var(--border-strong); }
.hx-theme-btn .i-sun { display: none; }
[data-theme="light"] .hx-theme-btn .i-sun { display: block; }
[data-theme="light"] .hx-theme-btn .i-moon { display: none; }
.hx-theme-btn:active { transform: rotate(30deg); }

/* Header trên ảnh bìa (trang dự án): chữ trắng khi chưa cuộn */
.on-cover .hx-header:not(.scrolled) { color: #fff; }
.on-cover .hx-header:not(.scrolled) .hx-nav-link { color: rgba(255, 255, 255, .85); }
.on-cover .hx-header:not(.scrolled) .hx-nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.on-cover .hx-header:not(.scrolled) .hx-lang { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .18); }
.on-cover .hx-header:not(.scrolled) .hx-lang a { color: rgba(255, 255, 255, .75); }
.on-cover .hx-header:not(.scrolled) .hx-lang a.active { background: #fff; color: #111; }
.on-cover .hx-header:not(.scrolled) .hx-icon-btn { color: #fff; background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .18); }

.hx-menu-btn { display: none; }
/* Khi mở menu di động: header theo màu nền menu */
.hx-header:has(.hx-menu-btn.active) { color: var(--text) !important; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hx-header:has(.hx-menu-btn.active) .hx-icon-btn { color: var(--text) !important; background: var(--chip-bg) !important; border-color: var(--border) !important; }
.hx-menu-btn span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .3s; }
.hx-menu-btn span + span { margin-top: 4px; }
.hx-menu-btn { flex-direction: column; }
.hx-menu-btn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hx-menu-btn.active span:nth-child(2) { opacity: 0; }
.hx-menu-btn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.hx-mobile-menu {
    position: fixed; inset: 0; z-index: 999;
    background: var(--bg);
    padding: calc(var(--header-h) + 24px) 24px 32px;
    display: flex; flex-direction: column; gap: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.hx-mobile-menu.active { opacity: 1; visibility: visible; transform: none; }
.hx-mobile-menu a.hx-m-link { font-size: 1.5rem; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.hx-mobile-menu .hx-lang { align-self: flex-start; margin-top: 20px; }
.hx-mobile-menu .hx-lang a { font-size: .9rem; padding: 8px 16px; }
.hx-mobile-menu.active ~ .hx-header .hx-menu-btn,
body .hx-header .hx-menu-btn.active { color: var(--text); }

@media (max-width: 900px) {
    .hx-nav { display: none; }
    .hx-menu-btn { display: inline-flex; }
    .hx-tools .hx-lang { display: none; }
}

/* ── Section headings ── */
.hx-section { padding: 96px 0; }
.hx-section-sm { padding: 64px 0; }
.hx-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent-2);
}
[data-theme="light"] .hx-eyebrow { color: var(--accent); }
.hx-eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.hx-h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; margin: 12px 0 14px; }
.hx-lead { font-size: 1.06rem; color: var(--muted); max-width: 620px; margin: 0; }
.hx-head-center { text-align: center; margin: 0 auto 48px; }
.hx-head-center .hx-lead { margin: 0 auto; }
@media (max-width: 640px) {
    .hx-section { padding: 64px 0; }
    .hx-section-sm { padding: 44px 0; }
}

/* ── Cards ── */
.hx-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: border-color .25s, transform .25s var(--ease), box-shadow .25s, background .3s;
}
.hx-card-hover:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.hx-ico {
    width: 52px; height: 52px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-2);
}
[data-theme="light"] .hx-ico { color: var(--accent); }
.hx-card h3 { font-size: 1.12rem; font-weight: 700; margin: 18px 0 8px; letter-spacing: -.01em; }
.hx-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.hx-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .hx-grid-3 { grid-template-columns: 1fr; } }

/* Reveal khi cuộn */
.js .hx-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .hx-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .hx-reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ── Footer ── */
.hx-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--bg-soft); }
.hx-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
.hx-footer h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; font-weight: 700; }
.hx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hx-footer a:hover { color: var(--accent-2); }
.hx-footer-desc { color: var(--muted); font-size: .92rem; margin: 16px 0 0; max-width: 360px; }
.hx-contact { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; margin-bottom: 10px; color: var(--text-2); }
.hx-contact svg { flex-shrink: 0; margin-top: 4px; color: var(--accent-2); }
.hx-footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hx-footer-simple { padding: 32px 0; }
.hx-footer-simple .hx-footer-bottom { margin: 0; padding: 0; border: 0; justify-content: center; text-align: center; }
@media (max-width: 900px) { .hx-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hx-footer-grid { grid-template-columns: 1fr; gap: 28px; } }

.hx-to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .3s, transform .3s, visibility .3s;
}
.hx-to-top.visible { opacity: 1; visibility: visible; transform: none; }

/* ==========================================================
   TRANG CHỦ
   ========================================================== */
.hx-hero {
    position: relative; overflow: hidden;
    padding: calc(var(--header-h) + 80px) 0 96px;
}
.hx-hero::before {
    content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
    background: radial-gradient(circle, rgba(227, 6, 19, .22), transparent 62%);
    pointer-events: none; z-index: 0;
}
[data-theme="light"] .hx-hero::before { background: radial-gradient(circle, rgba(227, 6, 19, .1), transparent 62%); }
.hx-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.hx-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-2);
    border: 1px solid rgba(227, 6, 19, .25);
    font-size: .8rem; font-weight: 600;
}
[data-theme="light"] .hx-chip { color: var(--accent); }
.hx-hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.7rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800;
    margin: 22px 0 20px; text-wrap: balance;
}
.hx-hero h1 .accent { display: block; background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, #ff7a59); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-hero-sub { font-size: 1.1rem; font-weight: 600; color: var(--text-2); margin: 0 0 18px; }
.hx-hero-desc { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 0 32px; }
.hx-hero-desc strong { color: var(--text-2); font-weight: 600; }
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hx-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hx-bento-main { grid-column: 1 / -1; padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hx-bento-main::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 6, 19, .25), transparent 70%); }
.hx-bento-row { display: flex; align-items: center; gap: 14px; }
.hx-bento-main h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.hx-bento-main p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.hx-formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hx-formats span { padding: 6px 12px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.hx-stat { padding: 22px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.hx-stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; color: var(--accent-2); line-height: 1.1; }
[data-theme="light"] .hx-stat b { color: var(--accent); }
.hx-stat span { display: block; margin-top: 6px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 960px) {
    .hx-hero { padding: calc(var(--header-h) + 48px) 0 64px; }
    .hx-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) {
    .hx-actions .hx-btn { flex: 1 1 100%; }
    .hx-stat { padding: 18px 8px; }
}

/* Dự án đã thực hiện */
.hx-projects { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hx-projects-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.hx-filter { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.hx-filter-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: .88rem; font-weight: 600; color: var(--text-2);
    transition: border-color .2s, background .2s, color .2s;
}
.hx-pill:hover { border-color: var(--border-strong); color: var(--text); }
.hx-pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.hx-pill small { font-weight: 500; opacity: .7; }
.hx-year { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.hx-year a { display: inline-flex; align-items: center; justify-content: center; }
.hx-year .arr { width: 34px; height: 34px; border-radius: 50%; color: var(--muted); }
.hx-year .arr:hover { background: var(--chip-bg); color: var(--text); }
.hx-year .yr { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; gap: 8px; }
.hx-year .yr small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.hx-year .yr.on { background: var(--text); color: var(--bg); }
.hx-year .yr.on small { color: inherit; opacity: .7; }
.hx-months { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.hx-months::-webkit-scrollbar { display: none; }
.hx-month {
    flex: 0 0 auto; min-width: 58px; padding: 8px 10px; border-radius: 12px; text-align: center;
    border: 1px solid var(--border); background: transparent; font-size: .85rem; font-weight: 600; color: var(--muted);
}
.hx-month small { display: block; font-size: .7rem; font-weight: 500; opacity: .8; }
a.hx-month { color: var(--text-2); background: var(--surface); }
a.hx-month:hover { border-color: var(--border-strong); color: var(--text); }
a.hx-month.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hx-month.empty { opacity: .45; }

.hx-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hx-proj {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--border);
    transition: border-color .2s, transform .2s var(--ease);
}
.hx-proj:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hx-proj-ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); }
[data-theme="light"] .hx-proj-ico { color: var(--accent); }
.hx-proj-name { font-size: .95rem; font-weight: 600; line-height: 1.35; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hx-proj-date { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.hx-empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }

.hx-pager { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.hx-pager a { min-width: 42px; height: 42px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--text-2); }
.hx-pager a:hover { border-color: var(--border-strong); color: var(--text); }
.hx-pager a.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Dịch vụ */
.hx-services-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hx-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 32px; }
.hx-tag { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; font-weight: 500; color: var(--text-2); transition: border-color .2s, color .2s; }
.hx-tag svg { color: var(--accent-2); }
.hx-tag:hover { border-color: var(--accent); color: var(--text); }
.hx-feature-list { display: grid; gap: 14px; }
.hx-feature { display: flex; gap: 18px; align-items: flex-start; padding: 22px; }
.hx-feature h3 { margin: 0 0 4px; }
@media (max-width: 960px) { .hx-services-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ==========================================================
   TRANG DỰ ÁN (khách tải ảnh)
   ========================================================== */
.hx-cover {
    position: relative; min-height: min(78vh, 820px); min-height: min(78svh, 820px);
    display: flex; align-items: flex-end;
    color: #fff; overflow: hidden; isolation: isolate;
    background: #0d0d10;
}
.hx-cover-bg {
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(227, 6, 19, .35), transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(255, 122, 89, .18), transparent 50%),
        #0d0d10;
}
.hx-cover-img {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .45s var(--ease);
}
.hx-cover-img.ready { opacity: 1; }
.hx-cover-img img, .hx-cover-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.05);
    transition: opacity .95s var(--ease), transform 5.5s ease-out;
}
.hx-cover-img img:only-child, .hx-cover-slide.active { opacity: 1; transform: scale(1); }
.hx-cover::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .85) 100%);
}
.hx-cover-inner { width: 100%; padding-top: calc(var(--header-h) + 40px); padding-bottom: 56px; }
.hx-crumbs { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: rgba(255, 255, 255, .7); margin-bottom: 16px; flex-wrap: wrap; }
.hx-crumbs a:hover { color: #fff; }
.hx-ready {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-size: .82rem; font-weight: 600;
}
.hx-ready i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(34, 197, 94, .25); animation: hxPulse 2s infinite; }
@keyframes hxPulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.hx-cover h1 {
    font-size: clamp(2rem, 5.4vw, 4.2rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800;
    margin: 16px 0 12px; max-width: 960px; text-wrap: balance;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hx-cover-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .95rem; color: rgba(255, 255, 255, .82); margin-bottom: 28px; }
.hx-cover-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hx-cover-meta svg { opacity: .8; }
.hx-cover .hx-actions .hx-btn-primary { min-width: 240px; }
.hx-cover-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hx-cover-dots {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 999px;
    background: rgba(12, 12, 16, .52); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.hx-cover-Dots[hidden], .hx-cover-dots[hidden] { display: none; }
.hx-cover-arr {
    width: 28px; height: 28px; border-radius: 50%; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
    transition: background .2s, transform .2s;
}
.hx-cover-arr:hover { background: var(--accent); transform: scale(1.08); }
.hx-cover-pills { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; }
.hx-cover-dot {
    width: 10px; height: 8px; padding: 0; border-radius: 999px; border: 0;
    background: rgba(255, 255, 255, .32); cursor: pointer; overflow: hidden; position: relative;
    transition: width .35s var(--ease), background .25s;
}
.hx-cover-dot:hover { background: rgba(255, 255, 255, .6); }
.hx-cover-dot.active { width: 32px; background: rgba(255, 255, 255, .28); }
.hx-cover-dot i { display: block; height: 100%; width: 0; background: #fff; border-radius: 999px; }
.hx-cover-dot.active i { width: 100%; transition: width 4.5s linear; }
.hx-cover-cnt { font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .85); padding: 0 4px; font-variant-numeric: tabular-nums; }
.hx-scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: rgba(255, 255, 255, .6); animation: hxBob 2s infinite; }
@keyframes hxBob { 50% { transform: translate(-50%, 6px); } }
@media (max-width: 640px) {
    .hx-cover { min-height: min(72vh, 640px); min-height: min(72svh, 640px); }
    .hx-cover-inner { padding-bottom: 40px; }
    .hx-cover .hx-actions { width: 100%; }
    .hx-cover .hx-actions .hx-btn { flex: 1 1 100%; }
    .hx-cover-foot { flex-direction: column; align-items: stretch; gap: 14px; }
    .hx-cover-dots { align-self: center; }
    .hx-scroll-hint { display: none; }
}

/* Thanh chọn định dạng */
.hx-formats-bar { position: relative; z-index: 2; margin-top: -1px; padding: 36px 0 8px; }
.hx-step-label { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hx-step-label b { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--text); color: var(--bg); font-size: .75rem; letter-spacing: 0; }
.hx-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.hx-tab.folder-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--r); min-width: 0;
    background: var(--surface); border: 1.5px solid var(--border);
    cursor: pointer; user-select: none; text-align: left;
    transition: border-color .2s, background .2s, transform .2s var(--ease), box-shadow .2s;
}
.hx-tab.folder-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hx-tab.folder-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(227, 6, 19, .08); }
.hx-tab-ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--chip-bg); color: var(--text-2); transition: background .2s, color .2s; }
.hx-tab-ico svg { width: 20px; height: 20px; }
.folder-card.active .hx-tab-ico { background: var(--accent); color: #fff; }
.hx-tab-txt { min-width: 0; }
.hx-tab .folder-name { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-tab-use { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tab-check { margin-left: auto; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .2s; }
.folder-card.active .hx-tab-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.hx-format-desc {
    display: flex; gap: 12px; align-items: flex-start;
    margin-top: 14px; padding: 14px 16px; border-radius: var(--r);
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: .92rem; color: var(--text-2);
}
.hx-format-desc svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-2); }
.hx-format-desc p { margin: 0; transition: opacity .2s; }
@media (max-width: 640px) {
    .hx-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .hx-tab.folder-card { padding: 12px; gap: 10px; }
    .hx-tab-ico { width: 34px; height: 34px; border-radius: 10px; }
    .hx-tab-check { display: none; }
}

/* Hướng dẫn 3 bước gọn */
.hx-how { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: stretch; margin-top: 14px; }
.hx-how-step { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); border: 1px dashed var(--border-strong); font-size: .9rem; color: var(--text-2); }
.hx-how-step b { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--chip-bg); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--text); }
.hx-how-more { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r); background: transparent; border: 1px solid var(--border); color: var(--text-2); font-size: .88rem; font-weight: 600; cursor: pointer; }
.hx-how-more:hover { border-color: var(--border-strong); color: var(--text); }
@media (max-width: 900px) { .hx-how { grid-template-columns: 1fr; } .hx-how-more { justify-content: center; } }

/* Gallery */
.hx-gallery-wrap { padding: 36px 0 24px; }
.hx-gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.hx-gallery-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

.hp-gallery { min-height: 260px; margin-top: 16px; }
.hpg-loading, .hpg-error, .hpg-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 20px; color: var(--muted); text-align: center; }
.hpg-error { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.hpg-error .main-drive-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.loader-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent); animation: hxSpin .8s linear infinite; }
@keyframes hxSpin { to { transform: rotate(360deg); } }

.hpg-toolbar {
    position: sticky; top: var(--header-h); z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 0; margin-bottom: 8px;
    background: var(--bg);
    transition: background .3s;
}
.hpg-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .9rem; }
.hpg-crumb { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; font: inherit; }
.hpg-crumb:hover { color: var(--text); background: var(--chip-bg); }
.hpg-crumb.current { color: var(--text); font-weight: 700; }
.hpg-sep { color: var(--muted); opacity: .5; }
.hpg-count { font-size: .8rem; font-weight: 600; color: var(--text-2); background: var(--chip-bg); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; }

.hpg-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 24px; }
.hpg-folder {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: var(--r);
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font: inherit; text-align: left; cursor: pointer;
    transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.hpg-folder:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.hpg-folder-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(251, 191, 36, .14); color: var(--gold); font-size: 1.5rem; }
.hpg-folder-icon svg { width: 26px; height: 26px; }
.hpg-folder-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hpg-folder-name { font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpg-folder-hint { font-size: .8rem; color: var(--muted); }
.hpg-folder:hover .hpg-folder-hint { color: var(--accent-2); }

.hpg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hpg-item {
    position: relative; aspect-ratio: 3 / 2; border: 0; padding: 0;
    border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--img-bg);
}
.hpg-item::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); animation: hpgShimmer 1.4s infinite; }
.hpg-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .35));
    opacity: 0; transition: opacity .3s;
}
.hpg-item:hover::after { opacity: 1; }
.hpg-item.loaded::before, .hpg-item.err::before { display: none; }
.hpg-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s, transform .6s var(--ease); }
.hpg-item.loaded img { opacity: 1; }
.hpg-item:hover img { transform: scale(1.05); }
.hpg-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes hpgShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (min-width: 1100px) { .hpg-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) {
    .hpg-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .hpg-item { border-radius: 8px; }
    .hpg-folders { grid-template-columns: 1fr; gap: 8px; }
}


/* Thư mục con: thẻ icon lớn, dàn trang cân đối 12 cột */
.hpg-albums { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; align-items: stretch; }
.hpg-album.hpg-folder {
    grid-column: span 4;
    position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px;
    height: 100%; padding: 22px 24px; min-height: 0; border-radius: 20px; overflow: hidden; text-align: left;
    border: 1px solid var(--border); background: var(--surface);
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.hpg-album.hpg-folder[data-span="12"] { grid-column: span 12; }
.hpg-album.hpg-folder[data-span="6"] { grid-column: span 6; }
.hpg-album.hpg-folder[data-span="4"] { grid-column: span 4; }
.hpg-album.hpg-folder[data-span="3"] { grid-column: span 3; }
.hpg-album.hpg-folder::after {
    content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, .14), transparent 70%); pointer-events: none; transition: transform .4s var(--ease);
}
.hpg-album.hpg-folder:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.hpg-album.hpg-folder:hover::after { transform: scale(1.3); }
.hpg-album-icon {
    width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, rgba(251, 191, 36, .22), rgba(251, 191, 36, .08)); color: var(--gold);
    transition: transform .3s var(--ease); flex-shrink: 0;
}
.hpg-album:hover .hpg-album-icon { transform: scale(1.08) rotate(-4deg); }
.hpg-album-info { width: 100%; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; }
.hpg-album .hpg-folder-name { font-size: 1.15rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; white-space: normal; color: var(--text); }
.hpg-album-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; font-size: .84rem; color: var(--muted); }
.hpg-album-count:empty { display: none; }
.hpg-album-go { margin-left: auto; flex-shrink: 0; white-space: nowrap; padding: 6px 13px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; transition: background .25s, color .25s, border-color .25s; }
.hpg-album:hover .hpg-album-go { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 1024px) {
    .hpg-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hpg-album.hpg-folder,
    .hpg-album.hpg-folder[data-span] { grid-column: span 1; }
    .hpg-album.hpg-folder:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .hpg-albums { grid-template-columns: 1fr; gap: 10px; }
    .hpg-album.hpg-folder,
    .hpg-album.hpg-folder[data-span] { grid-column: 1 / -1; flex-direction: row; align-items: center; padding: 16px; gap: 14px; border-radius: 16px; }
    .hpg-album-icon { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
    .hpg-album .hpg-folder-name { font-size: 1.05rem; }
}

/* Khu tải về cuối trang */
.hx-final { padding: 8px 0 56px; }
.hx-final-card { padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); }
.hx-final-card h3 { margin: 0 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; }
.hx-final-card > p { margin: 0 0 20px; color: var(--muted); }
.hx-final-card .hx-how { margin: 0 0 22px; }
.hx-final-card .hx-actions .hx-btn { min-width: 220px; }
@media (max-width: 640px) { .hx-final-card { padding: 22px 18px; } .hx-final-card .hx-actions .hx-btn { flex: 1 1 100%; } }

/* Lightbox */
.hpg-lb { position: fixed; inset: 0; z-index: 3000; background: rgba(6, 6, 8, .97); display: none; color: #fff; }
.hpg-lb.open { display: block; animation: hxFade .25s var(--ease); }
@keyframes hxFade { from { opacity: 0; } }
.hpg-lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; z-index: 2; background: linear-gradient(rgba(0, 0, 0, .65), transparent); }
.hpg-lb-name { font-size: .85rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpg-lb-actions { display: flex; gap: 8px; flex-shrink: 0; }
.hpg-lb-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.hpg-lb-dl { background: linear-gradient(135deg, #e30613, #ff3b47); }
.hpg-lb-btn:hover { filter: brightness(1.15); }
.hpg-lb-close { width: 42px; padding: 0; justify-content: center; }
.hpg-lb-stage { position: absolute; inset: 70px 80px 56px; display: flex; align-items: center; justify-content: center; }
.hpg-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; transition: opacity .25s; }
.hpg-lb-stage .loader-spinner { position: absolute; display: none; border-color: rgba(255, 255, 255, .2); border-top-color: #fff; }
.hpg-lb-stage.loading .loader-spinner { display: block; }
.hpg-lb-stage.loading img { opacity: .3; }
.hpg-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.hpg-lb-nav:hover { background: rgba(255, 255, 255, .22); }
.hpg-lb-nav.prev { left: 16px; }
.hpg-lb-nav.next { right: 16px; }
.hpg-lb-counter { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; opacity: .7; font-size: .85rem; }
@media (max-width: 640px) {
    .hpg-lb-stage { inset: 62px 0 48px; }
    .hpg-lb-nav { display: none; }
}

/* Đánh giá + QR */
.hx-thanks { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.hx-thanks.hx-thanks-single { grid-template-columns: 1fr; }
.hx-review {
    position: relative; overflow: hidden;
    padding: 40px; border-radius: var(--r-xl);
    background: linear-gradient(135deg, #1c1208, #2a1a07 50%, #120d05);
    border: 1px solid rgba(251, 191, 36, .25);
    color: #fff;
}
[data-theme="light"] .hx-review { background: linear-gradient(135deg, #fff8e8, #fdecc8); color: #2a1a07; border-color: rgba(217, 119, 6, .3); }
.hx-review::after { content: '★'; position: absolute; right: -10px; bottom: -70px; font-size: 260px; line-height: 1; color: rgba(251, 191, 36, .08); pointer-events: none; }
.hx-stars { display: flex; gap: 4px; color: #fbbf24; font-size: 1.4rem; letter-spacing: 2px; }
.hx-review h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; margin: 12px 0 8px; line-height: 1.2; }
.hx-review p { margin: 0 0 24px; opacity: .8; max-width: 520px; }
.hx-btn-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1205; box-shadow: 0 10px 30px -10px rgba(251, 191, 36, .6); }
.hx-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(251, 191, 36, .75); }
.hx-qr { display: flex; gap: 22px; align-items: center; padding: 28px; border-radius: var(--r-xl); }
.hx-qr-img { flex-shrink: 0; padding: 10px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.hx-qr-img img { width: 150px; height: 150px; }
.hx-qr h4 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.hx-qr p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) {
    .hx-thanks { grid-template-columns: 1fr; }
    .hx-qr { display: none; }
    .hx-review { padding: 28px 22px; text-align: center; }
    .hx-review .hx-stars { justify-content: center; }
    .hx-review p { margin-left: auto; margin-right: auto; }
    .hx-review .hx-btn { width: 100%; }
}

/* Thanh tải nổi */
.hx-dock {
    position: fixed; left: 50%; bottom: 18px; z-index: 950;
    width: min(620px, calc(100% - 24px));
    display: flex; align-items: center; gap: 12px;
    padding: 8px 8px 8px 18px; border-radius: 999px;
    background: var(--header-bg); border: 1px solid var(--border-strong);
    backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    box-shadow: var(--shadow);
    transform: translate(-50%, 140%); opacity: 0;
    transition: transform .45s var(--ease), opacity .3s;
}
.hx-dock.show { transform: translate(-50%, 0); opacity: 1; }

.hx-dock-info { flex: 1; min-width: 0; line-height: 1.25; }
.hx-dock-info small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.hx-dock-info strong { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-dock .hx-btn { min-height: 46px; padding: 0 20px; }
.hx-dock .hx-dock-copy { width: 46px; padding: 0; }
@media (max-width: 480px) {
    .hx-dock { bottom: 10px; padding-left: 14px; gap: 8px; }
    .hx-dock .hx-btn-primary { padding: 0 16px; font-size: .9rem; }
}

/* Thông báo mở bằng Zalo / Facebook */
.inapp-notice { position: relative; z-index: 5; max-width: var(--container); width: calc(100% - 32px); margin: calc(var(--header-h) + 14px) auto 14px; animation: hxIn .45s var(--ease); transition: opacity .25s, transform .25s; }
.inapp-notice.hide { opacity: 0; transform: translateY(-8px); }
.inapp-card { position: relative; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); overflow: hidden; }
.inapp-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #e30613, #ff4d5a, #fbbf24); }
.inapp-head { display: flex; gap: 14px; align-items: flex-start; }
.inapp-badge { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #e30613, #ff4d5a); }
.inapp-text { flex: 1; min-width: 0; padding-right: 26px; }
.inapp-title { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.35; margin-bottom: 4px; }
.inapp-desc { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.inapp-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--chip-bg); color: var(--muted); font-size: .85rem; cursor: pointer; }
.inapp-actions { display: flex; gap: 10px; margin-top: 16px; }
.inapp-main { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 18px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #e30613, #ff3b47); color: #fff; font: inherit; font-size: .98rem; font-weight: 700; cursor: pointer; }
.inapp-main:active { transform: scale(.97); }
.inapp-main.done { background: linear-gradient(135deg, #16a34a, #22c55e); }
.inapp-later { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; }
.inapp-title, .inapp-desc { word-break: keep-all; overflow-wrap: anywhere; }
@keyframes hxIn { from { opacity: 0; transform: translateY(-12px); } }
@media (min-width: 768px) { .inapp-main { flex: 0 0 auto; min-width: 240px; } .inapp-actions { padding-left: 60px; } }
.has-inapp .hx-header { background: var(--header-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom-color: var(--border); }
.has-inapp.on-cover .hx-header:not(.scrolled) { color: var(--text); }
.has-inapp.on-cover .hx-header:not(.scrolled) .hx-nav-link { color: var(--text-2); }
.has-inapp.on-cover .hx-header:not(.scrolled) .hx-icon-btn { color: var(--text); background: var(--chip-bg); border-color: var(--border); }
.has-inapp .hx-cover-inner { padding-top: 56px; }

/* Modal hướng dẫn */
.guide-modal { position: fixed; inset: 0; z-index: 3500; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.guide-modal.active { opacity: 1; visibility: visible; }
.guide-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.guide-modal-container { position: relative; max-width: 980px; width: 100%; max-height: 90vh; border-radius: var(--r-lg); overflow: auto; background: var(--surface); box-shadow: var(--shadow); transform: scale(.96); transition: transform .3s var(--ease); }
.guide-modal.active .guide-modal-container { transform: none; }
.guide-modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px -54px 0; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.guide-modal-img { width: 100%; height: auto; }

/* 404 */
.hx-404 { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: calc(var(--header-h) + 40px) 20px 60px; }
.hx-404 h1 { font-size: clamp(5rem, 16vw, 9rem); line-height: 1; margin: 0; font-weight: 800; letter-spacing: -.05em; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-404 h2 { margin: 8px 0; }
.hx-404 p { color: var(--muted); margin: 0 0 28px; }

.desktop-only { }
@media (max-width: 900px) { .desktop-only { display: none !important; } }

/* Điều hướng thư mục: nút Quay lại + đường dẫn to, dễ bấm */
.hpg-nav { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.hpg-crumbs { font-size: 1rem; gap: 2px; }
.hpg-crumb { padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.hpg-crumb.current { font-size: 1.05rem; padding: 8px 4px; }
.hpg-crumb:not(.current):not(.hpg-back) { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.hpg-back.hpg-crumb {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; padding: 0 18px 0 12px; border-radius: 999px;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none;
    box-shadow: 0 8px 20px -8px rgba(227, 6, 19, .6);
}
.hpg-back.hpg-crumb:hover { background: var(--accent-2); color: #fff; }
@media (max-width: 640px) {
    .hpg-nav { gap: 8px; }
    .hpg-crumbs { font-size: .92rem; }
    .hpg-crumb { padding: 6px 8px; }
}

/* Thẻ link Drive gốc */
.hx-drive-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.hx-drive-ico { flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(251, 191, 36, .14); color: var(--gold); }
.hx-drive-txt { flex: 1; min-width: 0; }
.hx-drive-card h3 { margin: 0 0 2px; font-size: 1.1rem; }
.hx-drive-card .hx-drive-txt p { margin: 0; color: var(--muted); font-size: .9rem; }
.hx-drive-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 760px) {
    .hx-drive-card { flex-wrap: wrap; padding: 18px; }
    .hx-drive-actions { width: 100%; }
    .hx-drive-actions .hx-btn { flex: 1; padding: 0 12px; }
}

/* Tiếng Hàn: không ngắt giữa từ */
html[lang="ko"] body { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- SaaSpo & Transitions.dev Enhancements (2026) ---------- */
#hxPhotoCount, .hpg-lb-counter, .hx-stat b, .hx-step-label b, .hx-year-btn, .hx-month-btn {
    font-variant-numeric: tabular-nums;
}
.hx-nav-island {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px !important;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.32);
    color: #fbbf24 !important;
    font-weight: 700 !important;
    font-size: 0.86rem;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease;
}
[data-theme="light"] .hx-nav-island {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.35);
    color: #b45309 !important;
}
.hx-nav-island:hover {
    transform: translateY(-1.5px);
    background: rgba(251, 191, 36, 0.22);
    border-color: rgba(251, 191, 36, 0.55);
}
.hx-trust-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.hx-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.hx-trust-pill--link {
    margin-left: auto;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
    text-decoration: none;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease;
}
[data-theme="light"] .hx-trust-pill--link {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.35);
    color: #b45309;
}
.hx-trust-pill--link:hover {
    transform: translateY(-1.5px);
    background: rgba(251, 191, 36, 0.22);
}
.hx-tab, .hx-btn, .hx-card {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, background 0.25s ease;
}
.hx-tab:hover {
    transform: translateY(-2px);
}
@media (max-width: 640px) {
    .hx-trust-pill--link {
        margin-left: 0;
    }
}

