/* ═══════════════════════════════════════════════════════════════════════════
   Phòng truyền thống - Public Site
   Dark Cyber Theme với Tech Blue / Cyan accent
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg-primary:    #050810;
    --bg-secondary:  #0a0e1a;
    --bg-card:       #0f172a;
    --bg-elevated:   #1e293b;

    --accent-primary:    #00d4ff;
    --accent-secondary:  #0ea5e9;
    --accent-glow:       #06b6d4;
    --accent-deep:       #1e40af;

    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;

    --success: #10b981;
    --danger:  #ef4444;
    --warning: #f59e0b;

    --border:        rgba(148, 163, 184, 0.12);
    --border-accent: rgba(0, 212, 255, 0.3);
    --glow-cyan:     0 0 20px rgba(0, 212, 255, 0.45);

    --gradient-hero: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #1e40af 100%);
    --gradient-text: linear-gradient(135deg, #00d4ff 0%, #38bdf8 100%);
}

* { box-sizing: border-box; }

html {
    margin: 0; padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px; line-height: 1.6;
    scroll-behavior: smooth;
}
/* Canvas (#cyber-bg-canvas) ĐANG được đặt z-index:1 + mix-blend-mode:screen
   để LUÔN nhìn thấy được trên mọi nền tối, không bị stacking context của
   .hero hay .site-main che mất. Vì vậy body GIỮ background tối — screen blend
   cần nền tối để các pixel sáng (đỏ cờ / vàng sao) "phát sáng" rõ ràng. */
body {
    margin: 0; padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit; line-height: inherit;
}



a { color: var(--accent-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-glow); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ─── Background effects ───────────────────────────────────────────────────
   The bulk of the moving background is now painted by the
   <canvas id="cyber-bg-canvas"> (cyber-bg.js):
   - mesh nodes & data packets   → kết nối
   - expanding shield rings      → bảo vệ
   - red attack vectors blocked  → chiến đấu công nghệ cao
   The DOM layers below add static ambience that complements the canvas.
   ────────────────────────────────────────────────────────────────────────── */

/* deep vignette + ambient nebula behind everything */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -10; pointer-events: none;
    background:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(14, 165, 233, 0.10), transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(30, 64, 175, 0.10), transparent 70%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(0, 212, 255, 0.06), transparent 70%),
        linear-gradient(180deg, #03060d 0%, #050810 60%, #03060d 100%);
}

/* ───────────────────────────────────────────────────────────────────────────
   Z-INDEX ORDER (bottom → top):
     -10  body::before          deepest gradient nebula
      -8  .bg-glow              ambient aurora
      -7  .bg-orbs              floating neon orbs
      -5  .bg-grid              sweeping highlight band
      -5  .bg-scanline          HUD scanlines
      -5  .bg-hex               honeycomb pattern (much dimmer now)
      -2  .bg-shield-watermark  cờ Tổ quốc watermark (ngôi sao vàng lớn)
       0  page content (.hero, .site-main, .feed, ...)
       1  #cyber-bg-canvas      🇻🇳 BẢN ĐỒ VN + HOÀNG SA + TRƯỜNG SA
                                (canvas position:fixed + mix-blend-mode:screen
                                 → "đâm xuyên" mọi nội dung tối, chỉ pixel
                                 sáng (đỏ cờ / vàng sao / cyan) mới hiện)
       5  .hero-inner           hero title/content nổi LÊN TRÊN canvas
      90  #cyber-hud-frame      HUD overlay (corners, flag, toasts)
     100  .site-header          sticky header (chắn canvas vùng header)
   ─────────────────────────────────────────────────────────────────────────── */


/* subtle moving aurora glow */
.bg-glow {
    position: fixed; inset: 0; z-index: -8; pointer-events: none;

    background:
        radial-gradient(ellipse 60% 40% at 50% 0%,  rgba(0, 212, 255, 0.10), transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 60%, rgba(30, 64, 175, 0.10), transparent 70%),
        radial-gradient(ellipse 35% 25% at 20% 70%, rgba(125, 250, 255, 0.06), transparent 70%);
    animation: bgGlowDrift 18s ease-in-out infinite alternate;
}
@keyframes bgGlowDrift {
    0%   { transform: translate3d(0,   0,   0) scale(1);    opacity: 0.95; }
    50%  { transform: translate3d(-2%, 1%,  0) scale(1.04); opacity: 1;    }
    100% { transform: translate3d(2%,  -1%, 0) scale(1.02); opacity: 0.9;  }
}

/* fine HUD scanlines (BEHIND canvas) */
.bg-scanline {
    position: fixed; inset: 0; z-index: -5; pointer-events: none;
    background: repeating-linear-gradient(0deg,
        rgba(0,212,255,0.020) 0px, rgba(0,212,255,0.020) 1px,
        transparent 1px, transparent 4px);
    opacity: 0.35;
    animation: bgScanShift 6s linear infinite;
}
@keyframes bgScanShift {
    0%   { background-position: 0 0;    }
    100% { background-position: 0 120px;}
}

/* sweeping highlight band (BEHIND canvas) */
.bg-grid {
    position: fixed; inset: 0; z-index: -5; pointer-events: none;
    background: linear-gradient(115deg,
        transparent 0%,
        rgba(0, 212, 255, 0.00) 30%,
        rgba(0, 212, 255, 0.05) 50%,
        rgba(0, 212, 255, 0.00) 70%,
        transparent 100%);
    background-size: 250% 100%;
    animation: bgSweep 12s linear infinite;
    opacity: 0.5;
}
@keyframes bgSweep {
    0%   { background-position: -150% 0; }
    100% { background-position:  150% 0; }
}

/* ─── Hexagonal honeycomb pattern (BEHIND canvas, very dim) ─────────────── */
.bg-hex {
    position: fixed; inset: 0; z-index: -5; pointer-events: none;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 64' width='56' height='64'><path d='M28 2 L52 16 L52 48 L28 62 L4 48 L4 16 Z' fill='none' stroke='%2300d4ff' stroke-width='0.5' opacity='0.12'/></svg>");
    background-size: 56px 64px;
    opacity: 0.25;
    animation: hexDrift 30s linear infinite;
}
@keyframes hexDrift {
    0%   { background-position: 0 0; }
    100% { background-position: 0 256px; }
}

/* ─── Floating neon orbs (BEHIND canvas) ─────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; z-index: -7; pointer-events: none; overflow: hidden; }
.bg-orbs i {
    position: absolute;
    width: 360px; height: 360px;
    border-radius: 50%;
    filter: blur(80px); opacity: 0.35;
}

.bg-orbs .orb-1 { top: -120px; left:  -120px; background: radial-gradient(circle, #00d4ff, transparent 70%); animation: orbFloatA 22s ease-in-out infinite; }
.bg-orbs .orb-2 { top: 30%;    right: -160px; background: radial-gradient(circle, #1e40af, transparent 70%); animation: orbFloatB 28s ease-in-out infinite; }
.bg-orbs .orb-3 { bottom: -180px; left: 30%;  background: radial-gradient(circle, #0ea5e9, transparent 70%); animation: orbFloatA 32s ease-in-out infinite reverse; }
.bg-orbs .orb-4 { top: 55%;    left:  10%;    background: radial-gradient(circle, rgba(56, 130, 255, 0.65), transparent 70%); width: 260px; height: 260px; animation: orbFloatB 26s ease-in-out infinite; }
.bg-orbs .orb-5 { top: 15%;    left:  55%;    background: radial-gradient(circle, rgba(255, 70, 90, 0.45), transparent 70%); width: 220px; height: 220px; opacity: 0.3; animation: orbFloatA 24s ease-in-out infinite reverse; }
@keyframes orbFloatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.08); }
}
@keyframes orbFloatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-50px, 30px) scale(1.05); }
}

/* ─── (REMOVED) Police shield watermark — replaced by VN map on canvas ─────
   Canvas (cyber-bg.js) now paints a wireframe Bản đồ Việt Nam với Hoàng Sa &
   Trường Sa, lá cờ đỏ sao vàng (DOM .vn-flag) và compass — không cần huy hiệu
   khiên nền nữa. .bg-shield-watermark trong _Layout.cshtml giờ chỉ chứa lá cờ
   nước rất mờ ở giữa làm watermark phụ trợ.
   ───────────────────────────────────────────────────────────────────────── */
.bg-shield-watermark {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.bg-shield-watermark svg {
    width: clamp(360px, 42vw, 720px);
    opacity: 0.045;
    filter: drop-shadow(0 0 50px rgba(218, 37, 29, 0.45));
    animation: shieldPulse 8s ease-in-out infinite;
}
@keyframes shieldPulse {
    0%, 100% { opacity: 0.035; transform: scale(1);    }
    50%      { opacity: 0.075; transform: scale(1.04); }
}

/* ─── Lá cờ Việt Nam (DOM) — góc dưới-trái, bay phấp phới ──────────────── */
.vn-flag {
    position: fixed;
    bottom: 64px;
    left: 28px;
    width: 230px;
    height: 180px;
    display: block;
    font-family: 'Consolas', 'Courier New', monospace;
    pointer-events: none;
    z-index: 95;
    transform-origin: bottom left;
    animation: vnFlagSway 6s ease-in-out infinite;
}


.vn-flag-pole {
    position: absolute;
    left: 0; bottom: 0;
    width: 4px;
    height: 120px;
    background: linear-gradient(
        180deg,
        #f5d77a 0%,
        #d4af37 35%,
        #8b6914 100%);
    border-radius: 2px;
    box-shadow:
        0 0 10px rgba(255, 205, 0, 0.75),
        inset -1px 0 0 rgba(0, 0, 0, 0.4);
}
.vn-flag-pole::before {
    /* "đầu cọc" — hình ngôi sao vàng nhỏ trên đỉnh cột cờ */
    content: '★';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: #ffcd00;
    text-shadow: 0 0 8px #ffcd00, 0 0 16px rgba(255, 205, 0, 0.9);
}
.vn-flag-cloth {
    position: absolute;
    left: 4px;
    bottom: 60px;
    width: 124px;
    height: 80px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow:
        0 0 22px rgba(218, 37, 29, 0.7),
        0 6px 14px rgba(0, 0, 0, 0.55),
        inset 0 0 14px rgba(0, 0, 0, 0.3);
    transform-origin: left center;
    animation: vnFlagWave 2.4s ease-in-out infinite;
}
.vn-flag-cloth svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 205, 0, 0.55));
}
.vn-flag-label {
    position: absolute;
    bottom: -36px;
    left: 0;
    width: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.15;
    white-space: nowrap;
    opacity: 0.96;
}
.vn-flag-label-line1 {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #ffcd00;
    text-shadow: 0 0 10px rgba(255, 205, 0, 0.75), 0 1px 2px rgba(0, 0, 0, 0.95);
    text-transform: uppercase;
}
.vn-flag-label-line2 {
    font-size: 10.5px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.4px;
    color: #fff5cc;
    text-shadow: 0 0 8px rgba(255, 205, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.95);
    text-decoration: underline;
    text-decoration-color: rgba(255, 205, 0, 0.65);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
@keyframes vnFlagWave {
    0%, 100% { transform: perspective(160px) rotateY(0deg)   skewY(0deg); }
    25%      { transform: perspective(160px) rotateY(-14deg) skewY(-1.6deg); }
    50%      { transform: perspective(160px) rotateY(0deg)   skewY(0deg); }
    75%      { transform: perspective(160px) rotateY(14deg)  skewY(1.6deg); }
}
@keyframes vnFlagSway {
    0%, 100% { transform: rotate(0deg)    translateY(0); }
    50%      { transform: rotate(-1.2deg) translateY(-2px); }
}

@media (max-width: 768px) {
    .vn-flag { bottom: 52px; left: 14px; width: 180px; height: 120px; }
    .vn-flag-pole { height: 88px; width: 3px; }
    .vn-flag-cloth { width: 92px; height: 60px; bottom: 44px; left: 3px; }
    .vn-flag-label { width: 180px; bottom: -32px; gap: 1px; }
    .vn-flag-label-line1 { font-size: 8.5px; letter-spacing: 1px; }
    .vn-flag-label-line2 { font-size: 9px; letter-spacing: 0.2px; }
}


/* ─── HUD frame (corner brackets + status strip + alert toasts) ──────────── */
#cyber-hud-frame {
    position: fixed; inset: 0; z-index: 90; pointer-events: none;
    font-family: 'Consolas', 'Courier New', monospace;
}
.hud-corner {
    position: absolute; width: 32px; height: 32px;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
    opacity: 0.85;
}
.hud-tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.hud-tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.hud-bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.hud-br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.hud-status {
    position: absolute; bottom: 16px;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(5, 8, 16, 0.7);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.15);
}
.hud-status-left  { left: 60px;  }
.hud-status-right { right: 60px; }
.hud-label { color: var(--text-muted); }
.hud-value { color: var(--accent-primary); font-weight: 700; }
.hud-value-ok    { color: #10b981; }
.hud-value-warn  { color: #fbbf24; }
.hud-value-crit  { color: #ef4444; animation: critBlink 0.7s steps(2) infinite; }
@keyframes critBlink { 50% { opacity: 0.4; } }
.hud-sep { color: rgba(148, 163, 184, 0.4); }
.hud-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #10b981; box-shadow: 0 0 8px #10b981;
    animation: hudDotPulse 1.5s ease-in-out infinite;
}
@keyframes hudDotPulse {
    0%, 100% { opacity: 1;   transform: scale(1);   }
    50%      { opacity: 0.5; transform: scale(0.8); }
}
.hud-bar {
    display: inline-block;
    width: 60px; height: 4px;
    background: rgba(0, 212, 255, 0.12);
    border-radius: 2px; overflow: hidden;
    position: relative; vertical-align: middle;
}
.hud-bar i {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #a7f7ff);
    box-shadow: 0 0 6px var(--accent-primary);
    transition: width 0.8s cubic-bezier(.22,.7,.3,1);
}

/* Alert toasts — top-right stack (vertical column above status bar) */
.hud-toasts {
    position: absolute; right: 16px; top: 60px;
    display: flex; flex-direction: column; gap: 8px;
    width: min(360px, 38vw);
    pointer-events: none;
}
.hud-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: rgba(5, 8, 16, 0.78);
    border: 1px solid var(--border-accent);
    border-left: 3px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px; letter-spacing: 0.4px;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.4), 0 0 14px rgba(0, 212, 255, 0.15);
    transform: translateX(28px); opacity: 0;
    transition: transform .35s cubic-bezier(.22,.7,.3,1), opacity .35s ease;
}
.hud-toast.show { transform: translateX(0); opacity: 1; }
.hud-toast i { font-size: 16px; color: var(--accent-primary); flex-shrink: 0; filter: drop-shadow(0 0 6px currentColor); }
.hud-toast span { flex: 1; }
.hud-toast b { color: var(--text-muted); font-weight: 500; font-size: 10px; }
.hud-toast-ok   { border-left-color: #10b981; }
.hud-toast-ok   i { color: #10b981; }
.hud-toast-warn { border-left-color: #fbbf24; }
.hud-toast-warn i { color: #fbbf24; }
.hud-toast-info { border-left-color: #38bdf8; }
.hud-toast-info i { color: #38bdf8; }

/* Mobile: hide noisy HUD elements */
@media (max-width: 768px) {
    .hud-status-left  { display: none; }
    .hud-status-right { left: 12px; right: 12px; bottom: 8px; font-size: 10px; padding: 4px 10px; }
    .hud-status-right .hud-bar { width: 36px; }
    .hud-toasts { width: calc(100vw - 32px); top: auto; bottom: 50px; right: 16px; }
    .hud-toast { font-size: 11px; padding: 6px 10px; }
    .hud-corner { width: 22px; height: 22px; }
    .bg-shield-watermark svg { width: 80vw; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .bg-glow,
    .bg-scanline,
    .bg-grid,
    .bg-hex,
    .bg-orbs i,
    .bg-shield-watermark svg { animation: none !important; }
    .hud-dot { animation: none; }
}

/* ─── Demo banner ─── */
.demo-banner {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 24px;
    background: linear-gradient(90deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
    border-bottom: 1px solid rgba(245,158,11,0.3);
    color: #fbbf24;
    font-size: 13px;
    position: sticky; top: 0; z-index: 99;
    backdrop-filter: blur(8px);
}
.demo-banner i { font-size: 18px; }
.demo-banner strong { color: #fcd34d; }

/* ─── Hero floating icons ─── */
.hero-floating-icons {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.float-icon {
    position: absolute;
    opacity: 0.18;
    filter: drop-shadow(0 0 12px rgba(0,212,255,0.6));
}
.float-icon-1 { top: 8%;  left: 8%;   width: 110px; animation: floatA 18s ease-in-out infinite; }
.float-icon-2 { top: 12%; right: 9%;  width: 130px; animation: floatB 22s ease-in-out infinite; }
.float-icon-3 { top: 60%; left: 5%;   width: 90px;  animation: floatA 20s ease-in-out infinite reverse; }
.float-icon-4 { bottom: 12%; right: 7%; width: 100px; animation: floatB 16s ease-in-out infinite reverse; }
.float-icon-5 { top: 40%; left: 50%;  width: 70px; transform: translateX(-50%); animation: pulseGlow 6s ease-in-out infinite; }
.float-icon-6 { top: 80%; left: 50%;  width: 80px; transform: translateX(-50%); animation: floatA 24s ease-in-out infinite; }
@keyframes floatA {
    0%,100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-22px) rotate(3deg); }
}
@keyframes floatB {
    0%,100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(18px) rotate(-3deg); }
}
@keyframes pulseGlow {
    0%,100% { opacity: 0.15; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.4; transform: translateX(-50%) scale(1.08); }
}

/* ═══ Header ═══ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(5, 8, 16, 0.85);
    border-bottom: 1px solid var(--border);
    padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-brand { display: flex; align-items: center; gap: 14px; color: var(--text-primary); max-width: 620px; }
.site-brand:hover { color: var(--text-primary); }
.brand-mark { width: 46px; height: 46px; flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(0,212,255,0.55)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text {
    display: flex; flex-direction: column; line-height: 1.25;
    max-width: 560px;
}
/* ─── Dòng 1: "Công an tỉnh Tuyên Quang" — VÀNG ĐẬM (cờ đỏ sao vàng) ───── */
.brand-line-1 {
    font-family: 'Oswald', 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ffd84d;
    /* Viền vàng đậm + glow đỏ cờ Tổ quốc */
    text-shadow:
        -1px -1px 0 #8b6914,
         1px -1px 0 #8b6914,
        -1px  1px 0 #8b6914,
         1px  1px 0 #8b6914,
         0 0 10px rgba(255, 205, 0, 0.85),
         0 0 18px rgba(218, 37, 29, 0.55),
         0 2px 4px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}
/* ─── Dòng 2: tên phòng dài — CYAN sáng đậm, không uppercase ──────────── */
.brand-line-2 {
    font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.2px;
    color: #e2f8ff;
    text-shadow:
        0 0 8px rgba(0, 212, 255, 0.75),
        0 0 14px rgba(0, 212, 255, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.9);
    margin-top: 2px;
    /* Cho phép wrap 2 dòng nếu màn hình hẹp */
    white-space: normal;
    word-break: keep-all;
}


.site-nav { display: flex; gap: 4px; }
.site-nav a {
    padding: 8px 16px; border-radius: 8px;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: all .2s;
}
.site-nav a:hover { color: var(--accent-primary); background: rgba(0,212,255,0.05); }
.site-nav a.active { color: var(--accent-primary); background: rgba(0,212,255,0.08); }

/* ═══ Hero ═══
   Note: KHÔNG được set overflow:hidden hay background đặc trên .hero, vì
   canvas (#cyber-bg-canvas) ở phía sau cần "đâm xuyên" qua hero để hiển thị
   bản đồ Việt Nam ở giữa viewport. .hero chỉ tạo layout flexbox cho hero
   content, không tạo nền che. */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    /* overflow: hidden ← bỏ! nó cắt mất nội dung khác và tạo stacking ngầm */
}
.hero.hero-small { min-height: 50vh; }
.hero-bg {
    /* gradient nền hero quá đặc che canvas — chuyển sang gradient rất mờ
       chỉ làm tăng độ tương phản cho hero title, không lấp toàn bộ */
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.04), transparent 80%);
    pointer-events: none;
}
.hero-particles {
    position: absolute; inset: 0;
    pointer-events: none;
}

.hero-inner {
    /* Phải nằm TRÊN canvas (z:1 + mix-blend-mode:screen) để title/text
       không bị canvas blend lên gây mờ. Canvas vẫn hiển thị xung quanh
       (rings, floating icons, map ở hai bên). */
    position: relative; z-index: 5;
    max-width: 980px; width: 100%; text-align: center;
    isolation: isolate;
}


/* ─── Hero animated rings (orbiting around the center title) ─────────────── */
.hero-rings {
    position: absolute; inset: 0;
    pointer-events: none;
    display: flex; align-items: center; justify-content: center;
}
.hero-rings .ring {
    position: absolute;
    border: 1px dashed rgba(0, 212, 255, 0.22);
    border-radius: 50%;
    box-shadow: inset 0 0 60px rgba(0, 212, 255, 0.05);
}
.hero-rings .ring-1 { width: 520px; height: 520px; animation: heroRingSpin 26s linear infinite; }
.hero-rings .ring-2 { width: 720px; height: 720px; border-style: dotted; border-color: rgba(0, 212, 255, 0.18); animation: heroRingSpin 38s linear infinite reverse; }
.hero-rings .ring-3 { width: 940px; height: 940px; border-color: rgba(56, 130, 255, 0.14); animation: heroRingSpin 56s linear infinite; }
.hero-rings .ring-1::before,
.hero-rings .ring-2::before {
    content: ''; position: absolute; top: -5px; left: 50%;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 14px var(--accent-primary), 0 0 30px var(--accent-primary);
    transform: translateX(-50%);
}
.hero-rings .ring-2::before { background: #ff465a; box-shadow: 0 0 14px #ff465a, 0 0 30px #ff465a; }
@keyframes heroRingSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Glitch effect for the gradient title ──────────────────────────────── */
.grad-text.glitch {
    position: relative;
    display: inline-block;
}
/* ─ Two-tone split ─
   Chia chữ làm 2 nửa: nửa trên 0%-50% ĐỎ thuần (#ff465a), nửa dưới
   50%-100% XANH cyan (#38bdf8). KHÔNG dùng RGB-shift, mà PHỦ ĐÈ màu
   thẳng lên chữ gốc, tạo cảm giác "lá cờ điện tử" rõ ràng.
   Cả 2 pseudo-element dùng `-webkit-text-fill-color` (không gradient)
   để màu phủ kín toàn vùng clip, bao gồm dấu thanh tiếng Việt. */
.grad-text.glitch::before,
.grad-text.glitch::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    background: none;
    -webkit-background-clip: initial; background-clip: initial;
    -webkit-text-fill-color: currentColor;
}
.grad-text.glitch::before {
    color: #ff465a;
    -webkit-text-fill-color: #ff465a;
    text-shadow:
        0 0 10px rgba(255, 70, 90, 0.55),
        0 0 22px rgba(255, 70, 90, 0.35);
    /* Phần ĐỎ — chiếm 0% → 60% chiều cao line-box (tăng thêm 10%) */
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    animation: glitchTop 4s infinite linear alternate-reverse;
}
.grad-text.glitch::after {
    color: #38bdf8;
    -webkit-text-fill-color: #38bdf8;
    text-shadow:
        0 0 10px rgba(56, 189, 248, 0.55),
        0 0 22px rgba(56, 189, 248, 0.35);
    /* Phần XANH — tiếp ngay sau đỏ, 60% → 100% */
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    animation: glitchBot 4.5s infinite linear alternate-reverse;
}
@keyframes glitchTop {
    0%, 92%, 100% { transform: translate(0, 0); }
    93% { transform: translate(-2px, 0); }
    95% { transform: translate(2px, 0); }
    97% { transform: translate(-1px, 0); }
}
@keyframes glitchBot {
    0%, 88%, 100% { transform: translate(0, 0); }
    89% { transform: translate(2px, 0); }
    91% { transform: translate(-2px, 0); }
    94% { transform: translate(1px, 0); }
}

/* ─── Terminal-style readout (xuất hiện dưới hero stats) ─────────────────── */
.hero-terminal {
    /* Theo yêu cầu của user: ẩn khối terminal — bản đồ Việt Nam giờ là hero chính */
    display: none !important;
    max-width: 640px; margin: 24px auto 0;

    text-align: left;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12.5px; letter-spacing: 0.4px;
    background: rgba(5, 8, 16, 0.7);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 26px rgba(0,0,0,0.45), 0 0 18px rgba(0, 212, 255, 0.12);
    position: relative;
    overflow: hidden;
}
.hero-terminal::before {
    content: '';
    position: absolute; left: 12px; top: 12px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #10b981; box-shadow: 14px 0 0 #fbbf24, 28px 0 0 #ef4444;
}
.hero-terminal .term-line {
    margin-top: 22px; padding: 2px 0;
    white-space: nowrap; overflow: hidden;
}
.hero-terminal .term-line + .term-line { margin-top: 0; }
.hero-terminal .term-line::before {
    content: '$ '; color: var(--accent-primary); font-weight: 700;
}
.hero-terminal .term-ok    { color: #10b981; }
.hero-terminal .term-warn  { color: #fbbf24; }
.hero-terminal .term-crit  { color: #ef4444; }
.hero-terminal .term-info  { color: #38bdf8; }
.hero-terminal .term-cursor {
    display: inline-block; width: 7px; height: 14px;
    background: var(--accent-primary); margin-left: 4px; vertical-align: -2px;
    animation: termBlink 1s steps(2) infinite;
}
@keyframes termBlink { 50% { opacity: 0; } }

/* Typewriter-style appearance per line */
.hero-terminal .typewriter {
    display: inline-block;
    overflow: hidden; white-space: nowrap;
    border-right: 0;
    width: 0; animation: typeIn 2.2s steps(60) forwards;
}
.hero-terminal .typewriter.delay-1 { animation-delay: 0.6s; }
.hero-terminal .typewriter.delay-2 { animation-delay: 2.8s; }
.hero-terminal .typewriter.delay-3 { animation-delay: 5.0s; }
.hero-terminal .typewriter.delay-4 { animation-delay: 7.2s; }
@keyframes typeIn {
    from { width: 0; }
    to   { width: 100%; }
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; margin-bottom: 24px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    font-size: 13px; font-weight: 500; color: var(--accent-primary);
    backdrop-filter: blur(8px);
}
.hero-title {
    /* ─── Font cứng cáp, đầy đủ tiếng Việt ───
       Cinzel KHÔNG hỗ trợ tiếng Việt → trước đây bị lỗi dấu thanh (font fallback
       ghép tay khiến dấu lệch). Saira Condensed là font sans-serif gân guốc,
       condensed (gọn ngang) → giữ được "uy nghi quân đội" nhưng vẫn render
       dấu thanh chuẩn xác. */
    font-family: 'Saira Condensed', 'Oswald', 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    font-size: clamp(34px, 6vw, 64px);
    /* line-height 1.1 quá chật — descender ('g', 'p', 'y') + dấu thanh
       tiếng Việt bị cắt phía dưới. Tăng lên 1.3 để pseudo-element
       (::before / ::after) phủ đủ chiều cao chữ, đồng thời tránh chèn
       lên dòng tiếp theo. */
    line-height: 1.3; margin: 0 0 18px;
    /* Saira Condensed weight 900 (black) — rất "lực sĩ", phù hợp tiêu đề
       "Phòng truyền thống". Letter-spacing dương 1px cho condensed thoáng. */
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.grad-text.glitch {
    /* Bảo đảm phần tử inline-block cao đủ để bao trùm cả descender +
       dấu thanh tiếng Việt — `padding-bottom: 0.08em` tạo thêm khoảng
       trống dưới baseline để clip-path không cắt mất "g/y/p". */
    padding-bottom: 0.08em;
}

/* ─── DÒNG CHỮ "PHÒNG AN NINH MẠNG VÀ PHÒNG, CHỐNG TỘI PHẠM..." ──────────
   Dòng tên đơn vị: dùng Oswald (uppercase chuẩn quân) + viền vàng kép +
   bóng đổ đỏ cờ Tổ quốc, đậm rõ trên nền tối. */
.hero-title-sub {
    display: block;
    font-family: 'Oswald', 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    font-size: clamp(18px, 2.7vw, 30px);
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.25;
    text-transform: uppercase;
    margin-top: 16px;
    padding: 4px 8px;
    color: #fff7d6;
    /* Viền chữ vàng đậm — dùng nhiều text-shadow xếp lớp để mô phỏng
       stroke 1.5px (cross-browser, không cần -webkit-text-stroke). */
    text-shadow:
        -1px -1px 0 #b8860b,
         1px -1px 0 #b8860b,
        -1px  1px 0 #b8860b,
         1px  1px 0 #b8860b,
        -1.5px 0 0 #ffcd00,
         1.5px 0 0 #ffcd00,
         0 -1.5px 0 #ffcd00,
         0  1.5px 0 #ffcd00,
         0 0 14px rgba(255, 205, 0, 0.85),
         0 0 28px rgba(218, 37, 29, 0.75),
         0 4px 10px rgba(0, 0, 0, 0.85);
    /* Hiệu ứng pulse nhẹ — tỏa sáng đỏ-vàng */
    animation: heroSubGlow 4s ease-in-out infinite;
}
@keyframes heroSubGlow {
    0%, 100% {
        text-shadow:
            -1px -1px 0 #b8860b, 1px -1px 0 #b8860b,
            -1px  1px 0 #b8860b, 1px  1px 0 #b8860b,
            -1.5px 0 0 #ffcd00, 1.5px 0 0 #ffcd00,
             0 -1.5px 0 #ffcd00, 0  1.5px 0 #ffcd00,
             0 0 14px rgba(255, 205, 0, 0.85),
             0 0 28px rgba(218, 37, 29, 0.75),
             0 4px 10px rgba(0, 0, 0, 0.85);
    }
    50% {
        text-shadow:
            -1px -1px 0 #b8860b, 1px -1px 0 #b8860b,
            -1px  1px 0 #b8860b, 1px  1px 0 #b8860b,
            -1.5px 0 0 #ffcd00, 1.5px 0 0 #ffcd00,
             0 -1.5px 0 #ffcd00, 0  1.5px 0 #ffcd00,
             0 0 22px rgba(255, 205, 0, 1),
             0 0 44px rgba(218, 37, 29, 0.9),
             0 4px 10px rgba(0, 0, 0, 0.85);
    }
}

.grad-text {
    background: var(--gradient-text);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 30px rgba(0,212,255,0.4);
}

/* ─── DÒNG "VỮNG VÀNG TRÊN KHÔNG GIAN MẠNG..." (tagline) ─────────────────
   Khẩu hiệu/châm ngôn: dùng Saira Stencil One (font stencil quân đội, đầy đủ
   tiếng Việt) cho cảm giác tem khắc, anh hùng; gradient đỏ→vàng→đỏ theo cờ
   Tổ quốc + viền vàng + glow đỏ.
   (Trước đây dùng Cinzel — KHÔNG hỗ trợ tiếng Việt nên gây lỗi font dấu thanh.) */
.hero-tagline {
    font-family: 'Saira Stencil One', 'Saira Condensed', 'Oswald', 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 400; /* Saira Stencil One chỉ có 1 weight (400) — nét đã rất dày */
    letter-spacing: 2px;
    line-height: 1.5;
    text-transform: uppercase;
    margin: 8px auto 32px;
    max-width: 880px;
    padding: 10px 22px;
    /* Gradient đỏ→vàng→đỏ — tô màu chữ */
    background: linear-gradient(
        90deg,
        #ffd84d 0%,
        #ffeb78 20%,
        #fff4a3 50%,
        #ffeb78 80%,
        #ffd84d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Viền + glow */
    -webkit-text-stroke: 0.5px rgba(218, 37, 29, 0.45);
    filter:
        drop-shadow(0 0 8px rgba(255, 205, 0, 0.65))
        drop-shadow(0 0 20px rgba(218, 37, 29, 0.5))
        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
    position: relative;
    display: inline-block;
}
/* Viền trang trí 2 đầu khẩu hiệu (★ ─── ★) */
.hero-tagline::before,
.hero-tagline::after {
    content: '★';
    color: #ffcd00;
    -webkit-text-fill-color: #ffcd00;
    font-size: 0.85em;
    margin: 0 0.6em;
    vertical-align: middle;
    text-shadow: 0 0 10px #ffcd00, 0 0 20px rgba(218, 37, 29, 0.8);
    animation: heroTaglineStarPulse 2.6s ease-in-out infinite;
}
.hero-tagline::after { animation-delay: 1.3s; }
@keyframes heroTaglineStarPulse {
    0%, 100% { transform: scale(1) rotate(0); opacity: 0.85; }
    50%      { transform: scale(1.25) rotate(36deg); opacity: 1; }
}

.hero-actions { margin-bottom: 48px; }
.hero-stats {
    display: flex; gap: 48px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 32px;
}
.hero-stat { text-align: center; }
.stat-num {
    display: block; font-size: 36px; font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.hero-scroll-hint {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: var(--accent-primary); font-size: 28px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ═══ Buttons ═══ */
.btn-cyber {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(0,212,255,0.12) 0%, rgba(14,165,233,0.12) 100%);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 10px;
    font-weight: 600; font-size: 14px;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 0 0 rgba(0,212,255,0);
}
.btn-cyber:hover {
    background: linear-gradient(135deg, rgba(0,212,255,0.2) 0%, rgba(14,165,233,0.2) 100%);
    color: #fff; transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

/* ═══ Feature stripe ═══ */
.feature-stripe {
    background: linear-gradient(180deg, rgba(0,212,255,0.03) 0%, transparent 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 50px 24px;
}
.feature-stripe-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}
.feature-item {
    text-align: center;
    padding: 20px;
}
.feature-icon {
    width: 64px; height: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.55));
    transition: transform .35s;
}
.feature-item:hover .feature-icon {
    transform: translateY(-4px) scale(1.08);
}
.feature-item h4 {
    color: var(--text-primary); font-size: 16px; font-weight: 700;
    margin: 0 0 8px;
}
.feature-item p {
    color: var(--text-muted); font-size: 13px; line-height: 1.5;
    margin: 0;
}

/* ═══ Filter bar ═══ */
.filter-bar {
    position: sticky; top: 70px; z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(5, 8, 16, 0.85);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.filter-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 0 24px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 999px;
    font-size: 13px; font-weight: 500;
    transition: all .2s;
}
.filter-chip:hover { border-color: var(--border-accent); color: var(--accent-primary); }
.filter-chip.active {
    background: rgba(0,212,255,0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.filter-chip-count {
    margin-left: 4px; padding: 1px 8px;
    background: rgba(0,212,255,0.15); color: var(--accent-primary);
    border-radius: 999px; font-size: 11px;
}
.filter-search {
    position: relative; min-width: 240px;
    margin-left: auto;
}
.filter-search input {
    width: 100%; padding: 8px 14px 8px 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 13px;
}
.filter-search input:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.15);
}
.filter-search i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}

/* ═══ Feed ═══ */
.feed {
    max-width: 1200px; margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.8) 99%, transparent 100%);
    z-index: 10;
}
.feed-context { text-align: center; margin-bottom: 48px; }
.feed-context-title { font-size: 28px; margin: 0 0 8px; font-weight: 700; }

.empty-feed {
    text-align: center; padding: 80px 20px;
    color: var(--text-muted);
}
.empty-feed i { font-size: 64px; color: var(--accent-primary); opacity: .5; display: block; margin-bottom: 12px; }

/* ─── Timeline layout ──────────────────────────────────────────────────────
   .feed-timeline-row chia 2 cột:
     • cột trái: nhãn ngày tháng (.timeline-date) + chấm tròn trên trục đứng
     • cột phải: nội dung .feed-card
   Một đường gradient cyan→xám chạy dọc giữa 2 cột; phần đã cuộn qua sẽ
   chuyển từ xám sang cyan tươi (qua class .timeline-active được JS gắn).
   ────────────────────────────────────────────────────────────────────────── */
.feed {
    --timeline-col: 150px;
    --timeline-gap: 36px;
    --timeline-line-x: 170px;
    /* Chiều dài (px) đoạn "đã đi qua" trên trục timeline.
       JS cập nhật theo vị trí cuộn (vd. "345px"). Mặc định 0px. */
    --timeline-progress: 0px;
}


/* ─── Đường nền (track) ─ chạy suốt từ chấm đầu đến chấm cuối ─ */
.feed::before {
    content: '';
    position: absolute;
    top: 90px; bottom: 90px;
    left: var(--timeline-line-x);
    width: 2px;
    background: linear-gradient(180deg,
        rgba(100, 116, 139, 0.28) 0%,
        rgba(100, 116, 139, 0.22) 50%,
        rgba(100, 116, 139, 0.18) 100%);
    box-shadow: 0 0 6px rgba(100, 116, 139, 0.18);
    pointer-events: none;
    z-index: 0;
    border-radius: 2px;
}
/* ─── Đường sáng tiến trình ─ chiều dài bằng --timeline-progress ─
   Có cyan→xanh-điện→cyan, glow mạnh, "đầu tia" phát quang ở mũi. */
.feed::after {
    content: '';
    position: absolute;
    top: 90px;
    left: calc(var(--timeline-line-x) - 1px);
    width: 4px;
    height: calc(var(--timeline-progress) * 1);
    max-height: calc(100% - 180px);
    background: linear-gradient(180deg,
        rgba(0, 212, 255, 0.95) 0%,
        rgba(56, 189, 248, 0.85) 50%,
        rgba(14, 165, 233, 0.75) 100%);
    box-shadow:
        0 0 10px rgba(0, 212, 255, 0.85),
        0 0 22px rgba(0, 212, 255, 0.55),
        0 0 44px rgba(0, 212, 255, 0.28);
    pointer-events: none;
    z-index: 1;
    border-radius: 3px;
    transition: height 0.18s cubic-bezier(.22,.7,.3,1);
}
/* "Đầu tia" — vòng sáng nhỏ ở mũi của đường tiến trình */
.feed > .timeline-progress-head {
    position: absolute;
    left: calc(var(--timeline-line-x) - 6px);
    top: calc(90px + var(--timeline-progress) - 7px);
    width: 14px; height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #aef6ff 0%, #00d4ff 45%, rgba(0, 212, 255, 0) 75%);
    box-shadow:
        0 0 14px rgba(0, 212, 255, 0.95),
        0 0 28px rgba(0, 212, 255, 0.6),
        0 0 56px rgba(0, 212, 255, 0.3);
    pointer-events: none;
    z-index: 2;
    transition: top 0.18s cubic-bezier(.22,.7,.3,1);
    animation: timelineHeadPulse 1.6s ease-in-out infinite;
}
@keyframes timelineHeadPulse {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%      { transform: scale(1.4); opacity: 0.85;}
}


.feed-timeline-row {
    position: relative;
    display: grid;
    grid-template-columns: var(--timeline-col) 1fr;
    column-gap: var(--timeline-gap);
    margin-bottom: 40px;
    align-items: start;
    /* ─── Fade in/out theo scroll ─
       JS gắn data-vis="far" | "enter" | "in" | "leave" tuỳ theo
       intersectionRatio để CSS chuyển đổi opacity / blur / scale.
       Mặc định (chưa tracked) — vẫn hiển thị bình thường. */
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    transition:
        opacity .55s cubic-bezier(.22,.7,.3,1),
        transform .55s cubic-bezier(.22,.7,.3,1),
        filter .55s cubic-bezier(.22,.7,.3,1);
}
/* Khi entry chưa lọt vào viewport (ở rất xa phía dưới) */
.feed-timeline-row[data-vis="far"] {
    opacity: 0;
    transform: translateY(56px) scale(0.96);
    filter: blur(6px);
}
/* Đang bắt đầu lọt vào — fade-in nhẹ */
.feed-timeline-row[data-vis="enter"] {
    opacity: 0.55;
    transform: translateY(24px) scale(0.985);
    filter: blur(2px);
}
/* Hoàn toàn nằm trong vùng đọc — rõ nét nhất */
.feed-timeline-row[data-vis="in"] {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}
/* Đang cuộn qua phía trên — fade-out nhẹ (mờ dần như xa dần) */
.feed-timeline-row[data-vis="leave"] {
    opacity: 0.45;
    transform: translateY(-12px) scale(0.985);
    filter: blur(1.5px);
}
/* Đã cuộn quá xa lên trên (ra khỏi viewport) — gần như biến mất */
.feed-timeline-row[data-vis="gone"] {
    opacity: 0.18;
    transform: translateY(-30px) scale(0.96);
    filter: blur(4px);
}


.timeline-date {
    position: sticky;
    top: 140px;
    align-self: start;
    padding-right: 28px;
    text-align: right;
    font-family: 'Oswald', 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    color: var(--text-muted);
    transition: color .35s ease, transform .35s ease;
    user-select: none;
    z-index: 1;
}
.timeline-date-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.05;
    transition: filter .35s ease;
}
.timeline-date-day {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #94a3b8;
    transition: color .35s ease, text-shadow .35s ease, transform .35s ease;
}
.timeline-date-month {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #94a3b8;
    transition: color .35s ease;
}
.timeline-date-year {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color .35s ease;
}
.timeline-date-weekday {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
    transition: color .35s ease;
}

/* Chấm tròn trên trục — căn vào dòng feed::before */
.timeline-dot {
    position: absolute;
    top: 20px;
    /* căn chính giữa trục dọc (170px so với edge của .feed) — bù padding 24 */
    left: calc(var(--timeline-col) + var(--timeline-gap) / 2 - 8px);
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #64748b;
    box-shadow: 0 0 0 4px rgba(5, 8, 16, 0.85);
    transition: all .4s cubic-bezier(.22,.7,.3,1);
    z-index: 2;
}

/* ─── State khi item đã được cuộn vào vùng nhìn (JS toggle .timeline-active) ─ */
.feed-timeline-row.timeline-active .timeline-date-day {
    color: #00d4ff;
    text-shadow: 0 0 18px rgba(0, 212, 255, 0.65),
                 0 0 36px rgba(0, 212, 255, 0.35);
    transform: scale(1.04);
}
.feed-timeline-row.timeline-active .timeline-date-month,
.feed-timeline-row.timeline-active .timeline-date-year {
    color: #38bdf8;
}
.feed-timeline-row.timeline-active .timeline-date-weekday {
    color: #ffd84d;
    text-shadow: 0 0 10px rgba(255, 205, 0, 0.45);
}
.feed-timeline-row.timeline-active .timeline-dot {
    background: radial-gradient(circle, #00d4ff 30%, #1e40af 100%);
    border-color: #00d4ff;
    box-shadow:
        0 0 0 4px rgba(5, 8, 16, 0.9),
        0 0 18px rgba(0, 212, 255, 0.85),
        0 0 36px rgba(0, 212, 255, 0.45);
    transform: scale(1.15);
}
/* Hiệu ứng "đã đi qua" — chấm xanh đậm hơn, viền sáng */
.feed-timeline-row.timeline-passed .timeline-date-day,
.feed-timeline-row.timeline-passed .timeline-date-month,
.feed-timeline-row.timeline-passed .timeline-date-year,
.feed-timeline-row.timeline-passed .timeline-date-weekday {
    color: var(--text-secondary);
}
.feed-timeline-row.timeline-passed .timeline-date-day {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}
.feed-timeline-row.timeline-passed .timeline-dot {
    background: #0ea5e9;
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(5, 8, 16, 0.9),
                0 0 8px rgba(56, 189, 248, 0.5);
}

/* ─── Feed card ───
   Background ở mức ~50% trong suốt — để canvas (bản đồ VN, beacon, matrix)
   "đâm xuyên" qua thấy được phía sau card. Để chữ vẫn rõ → tăng
   backdrop-filter blur + saturate, thêm gradient gentle phía trên đỉnh
   và inset shadow tối ở mép. */
.feed-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(0, 112, 112, 0.6) 0%, rgba(15, 23, 42, 0.0) 100%),
        rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 0;
    transition: all .3s;
    overflow: hidden;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 212, 255, 0.04) inset,
        inset 0 0 30px rgba(5, 8, 16, 0.35);
}

.feed-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-hero);
    opacity: 0; transition: opacity .3s;
}
.feed-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 24px rgba(0,212,255,0.08);
}
.feed-card:hover::before { opacity: 1; }
.feed-card.is-pinned {
    border-color: rgba(245, 158, 11, 0.55);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.6) 0%, rgba(15, 23, 42, 0.6) 100%),
        rgba(15, 23, 42, 0.6);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(245, 158, 11, 0.20),
        inset 0 0 30px rgba(5, 8, 16, 0.35);
}
.card-pin {
    position: absolute; top: 0; right: 0;
    padding: 6px 14px; background: var(--warning); color: #1a1a1a;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    border-bottom-left-radius: 8px;
}

.card-header { margin-bottom: 14px; }
.card-meta {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
    font-size: 12px; color: var(--text-muted);
}
.badge-type {
    padding: 4px 10px;
    background: rgba(0,212,255,0.1); border: 1px solid var(--border-accent);
    color: var(--accent-primary); border-radius: 6px;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-cat {
    padding: 4px 10px;
    background: var(--cat-color); color: #fff;
    border-radius: 6px; font-size: 11px; font-weight: 600;
    filter: brightness(1.2);
}
.badge-cat:hover { color: #fff; filter: brightness(1.3); }
.card-date, .card-views { display: inline-flex; align-items: center; gap: 4px; }

.card-link { color: var(--text-primary); }
.card-link:hover .card-title { color: var(--accent-primary); }
.card-title {
    font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25;
    margin: 0 0 12px; font-weight: 700;
    transition: color .2s;
}
.card-excerpt {
    color: var(--text-secondary); font-size: 16px;
    margin-bottom: 18px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-clamp: 3; overflow: hidden;
}

/* ─── Album preview grid (3-6 ảnh) ─── */
.album-preview-grid {
    display: grid; gap: 4px;
    border-radius: 12px; overflow: hidden;
    margin-bottom: 18px;
    aspect-ratio: 16/9;
}
.album-preview-grid.items-1 { grid-template-columns: 1fr; }
.album-preview-grid.items-2 { grid-template-columns: 1fr 1fr; }
.album-preview-grid.items-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.album-preview-grid.items-3 .preview-tile:first-child { grid-row: span 2; }
.album-preview-grid.items-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.album-preview-grid.items-5,
.album-preview-grid.items-6 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.album-preview-grid.items-5 .preview-tile:first-child,
.album-preview-grid.items-6 .preview-tile:first-child { grid-row: span 2; }
.preview-tile {
    position: relative; overflow: hidden; background: #000;
}
.preview-tile img, .preview-tile video {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.preview-tile:hover img, .preview-tile:hover video { transform: scale(1.05); }
.preview-video-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 36px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    pointer-events: none;
}
.preview-more {
    background: rgba(0,212,255,0.08);
    color: var(--accent-primary);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 4px;
    font-weight: 700; font-size: 22px;
    border: 1px dashed var(--border-accent);
}
.preview-more small { font-size: 11px; font-weight: 400; color: var(--text-muted); }

.video-preview {
    position: relative; aspect-ratio: 16/9;
    background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 18px;
}
.video-preview iframe, .video-preview video { width: 100%; height: 100%; }

.card-cover { display: block; border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.card-cover img { width: 100%; height: auto; max-height: 420px; object-fit: cover; transition: transform .4s; }
.card-cover:hover img { transform: scale(1.02); }

.card-tags { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-mini {
    display: inline-block; padding: 3px 10px;
    background: rgba(0,212,255,0.06);
    border: 1px solid rgba(0,212,255,0.18);
    color: var(--accent-secondary);
    border-radius: 999px;
    font-size: 12px; font-weight: 500;
}
.tag-mini:hover { background: rgba(0,212,255,0.14); border-color: var(--accent-primary); color: var(--accent-primary); }

.card-footer { display: flex; justify-content: flex-end; }
.btn-read-more {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent-primary); font-weight: 600; font-size: 14px;
}
.btn-read-more:hover { color: var(--accent-glow); gap: 12px; }

.feed-pagination { text-align: center; padding: 24px 0; }

/* ─── Infinite-scroll: loader / end / sentinel ─────────────────────────── */
.feed-list { display: block; }

/* Loader — chỉ hiện khi đang fetch */
.feed-loader {
    display: none;
    align-items: center; justify-content: center; gap: 12px;
    padding: 28px 16px 12px;
    color: var(--text-secondary);
    font-size: 14px;
}
.feed-loader.is-visible { display: flex; }
.feed-loader-spinner {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.18);
    border-top-color: var(--accent-primary);
    animation: feedLoaderSpin .9s linear infinite;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.45);
}
@keyframes feedLoaderSpin { to { transform: rotate(360deg); } }
.feed-loader-text { letter-spacing: .3px; }

/* End-of-feed banner */
.feed-end {
    display: none;
    align-items: center; justify-content: center; gap: 10px;
    padding: 32px 16px 16px;
    color: var(--text-muted);
    font-size: 13px;
    opacity: 0; transform: translateY(8px);
    transition: opacity .4s, transform .4s;
}
.feed-end.is-visible { display: flex; opacity: 1; transform: none; }
.feed-end i { color: var(--success); font-size: 18px; }

/* Sentinel — phần tử "vô hình" để IntersectionObserver bám */
.feed-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
}

/* ─── In-content mode: giảm tải animation nền khi đang đọc ─────────────
   JS (site.js) gắn <body class="in-content"> khi cuộn tới phần feed/post.
   - Tắt animation orbs/scanline/grid/hex/glow/floating-icons/rings (giữ
     static layer mờ → không gây flash).
   - Giảm độ sáng & opacity các layer nền để tăng contrast cho nội dung.
   - cyber-bg.js đọc body.classList.contains('in-content') / window.__inContent
     để bỏ qua nhiều layer canvas nặng (matrix, beacons, attacks).
   ────────────────────────────────────────────────────────────────────── */
body.in-content .bg-glow,
body.in-content .bg-scanline,
body.in-content .bg-grid,
body.in-content .bg-hex,
body.in-content .bg-orbs i,
body.in-content .bg-shield-watermark svg,
body.in-content .hero-floating-icons .float-icon,
body.in-content .hero-rings .ring,
body.in-content #cyber-hud-frame .hud-dot {
    animation-play-state: paused !important;
}
body.in-content .bg-glow      { opacity: 0.35; }
body.in-content .bg-scanline  { opacity: 0.10; }
body.in-content .bg-grid      { opacity: 0.18; }
body.in-content .bg-hex       { opacity: 0.10; }
body.in-content .bg-orbs i    { opacity: 0.14; filter: blur(100px); }
body.in-content .hero-floating-icons,
body.in-content .hero-rings,
body.in-content .hero-particles { opacity: 0; pointer-events: none; }
body.in-content #cyber-bg-canvas { opacity: 0.55; }
body.in-content .bg-shield-watermark svg { opacity: 0.02; }

/* Mượt mà khi enter/leave in-content */
.bg-glow, .bg-scanline, .bg-grid, .bg-hex, .bg-orbs i,
.bg-shield-watermark svg, .hero-floating-icons, .hero-rings, .hero-particles,
#cyber-bg-canvas {
    transition: opacity .6s ease;
}

@media (prefers-reduced-motion: reduce) {
    .feed-loader-spinner { animation-duration: 1.6s; }
}


/* ═══ Tag cloud section ═══ */
.tag-cloud-section {
    max-width: 1100px; margin: 0 auto; padding: 60px 24px 80px;
    text-align: center;
}
.section-title {
    font-size: 24px; margin: 0 0 24px;
    color: var(--text-primary);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.section-title i { color: var(--accent-primary); }
.tag-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tag-chip {
    padding: 8px 16px;
    background: rgba(0,212,255,0.06);
    border: 1px solid var(--tag-color, var(--accent-primary));
    color: var(--tag-color, var(--accent-primary));
    border-radius: 999px;
    font-weight: 600;
    transition: all .25s;
    opacity: 0.85;
}
.tag-chip:hover {
    opacity: 1;
    background: var(--tag-color, var(--accent-primary));
    color: #050810;
    transform: translateY(-2px);
    box-shadow: 0 0 16px var(--tag-color, var(--accent-primary));
}
.tag-chip-count {
    margin-left: 6px; padding: 0 8px;
    background: rgba(0,0,0,0.3); border-radius: 999px;
    font-size: 11px;
}

/* ═══ Post detail ═══ */
.post-detail { padding-bottom: 80px; }
.post-hero {
    height: 56vh; min-height: 360px; max-height: 600px;
    background-size: cover; background-position: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.post-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(5,8,16,0.4) 60%, var(--bg-primary) 100%);
}
.post-detail-inner {
    max-width: 880px; margin: -80px auto 0;
    padding: 40px 24px; position: relative; z-index: 1;
}
.post-meta-top {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
    margin-bottom: 16px;
    font-size: 13px; color: var(--text-muted);
}
.post-title {
    font-size: clamp(28px, 4.5vw, 48px); line-height: 1.15;
    margin: 0 0 20px; font-weight: 800;
    color: var(--text-primary);
}
.post-excerpt {
    font-size: 19px; color: var(--text-secondary);
    line-height: 1.6; margin: 0 0 32px;
    padding: 18px 22px; border-left: 3px solid var(--accent-primary);
    background: rgba(0,212,255,0.04);
    border-radius: 0 8px 8px 0;
}
.post-tags { margin: 16px 0 32px; }

.post-video {
    aspect-ratio: 16/9; margin: 32px 0;
    background: #000; border-radius: 12px; overflow: hidden;
}
.post-video iframe, .post-video video { width: 100%; height: 100%; }

.post-content {
    font-size: 17px; line-height: 1.8; color: var(--text-primary);
    margin: 32px 0;
}
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 24px 0; }
.post-content h2, .post-content h3, .post-content h4 {
    color: var(--text-primary); margin: 36px 0 16px;
}
.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 22px; }
.post-content blockquote {
    border-left: 3px solid var(--accent-primary);
    background: rgba(0,212,255,0.04);
    padding: 16px 22px; margin: 24px 0;
    border-radius: 0 8px 8px 0; color: var(--text-secondary);
}
.post-content pre, .post-content code {
    background: var(--bg-card); padding: 4px 8px;
    border-radius: 4px; font-family: 'Consolas', monospace; font-size: 14px;
    border: 1px solid var(--border);
}
.post-content pre { padding: 18px; margin: 18px 0; overflow-x: auto; }
.post-content a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-left: 24px; }
.post-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.post-content th, .post-content td { padding: 10px 14px; border: 1px solid var(--border); }
.post-content th { background: var(--bg-card); color: var(--text-primary); }

/* ─── Gallery (album & tagged) ─── */
.post-gallery { margin: 48px 0; }
.tagged-items-section { max-width: 1280px; margin: 0 auto; padding: 40px 24px; }
.gallery-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-tile {
    position: relative; aspect-ratio: 4/3;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; cursor: pointer;
    transition: all .25s;
    color: var(--text-primary);
}
.gallery-tile:hover {
    border-color: var(--accent-primary); transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}
.gallery-tile img, .gallery-tile video {
    width: 100%; height: 100%; object-fit: cover;
}
.gallery-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 48px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    pointer-events: none;
}
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 12px 14px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
    color: #fff; font-size: 13px;
    transform: translateY(100%); transition: transform .25s;
}
.gallery-tile:hover .gallery-caption { transform: translateY(0); }
.gallery-tags {
    position: absolute; top: 8px; right: 8px;
    display: flex; flex-wrap: wrap; gap: 4px; max-width: 70%;
    justify-content: flex-end;
}
.gallery-tile-linked:hover .gallery-caption { transform: translateY(0); }

.post-back { text-align: center; margin-top: 48px; }
.post-error h1 { color: var(--accent-primary); margin: 20px 0 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Album book viewer — Quyển album 2 trang (trái / phải) + gáy sách tiến trình
   ═══════════════════════════════════════════════════════════════════════════ */
.album-book-section {
    margin: 56px 0 32px;
    /* Full-width breakout khỏi .post-detail-inner (max-width 880px) để cuốn sách rộng hơn */
    position: relative;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    width: 100vw; max-width: 100vw;
    padding: 0 24px;
}
.album-book-header {
    max-width: 1280px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.album-book-header .section-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0; font-size: 22px; color: var(--text-primary);
}
.album-book-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.album-delay-label {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-secondary); font-size: 13px;
    padding: 6px 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 999px;
}
.album-delay-select {
    background: transparent; color: var(--text-primary);
    border: 0; outline: none; cursor: pointer;
    font: inherit;
}
.album-delay-select option { background: var(--bg-card); color: var(--text-primary); }
.album-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-card); color: var(--accent-primary);
    border: 1px solid var(--border-accent);
    cursor: pointer; transition: all .2s;
}
.album-btn:hover { background: var(--accent-primary); color: #050810; box-shadow: var(--glow-cyan); }
.album-btn.is-paused { color: var(--warning); border-color: rgba(245,158,11,0.5); }

/* ─── Book container ─── */
.album-book {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    aspect-ratio: 16 / 10;
    perspective: 2400px;
    background: linear-gradient(180deg, #1a1206 0%, #0b0805 100%);
    border-radius: 16px;
    border: 1px solid rgba(180, 130, 60, 0.25);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(0, 212, 255, 0.06) inset;
    overflow: hidden;
    /* Padding để spread không chạm rìa "bìa sách" */
    padding: 22px;
}
/* "Bìa sách" — kết cấu gỗ/da nâu để gợi cảm giác album cổ điển */
.album-book::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255,200,120,0.06), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(0,212,255,0.05), transparent 50%),
        repeating-linear-gradient(45deg, rgba(120,80,40,0.04) 0 2px, transparent 2px 6px);
    border-radius: 16px;
}

/* Stage chứa các spread chồng lên nhau, chỉ spread.active hiện ra */
.album-book-stage {
    position: relative;
    width: 100%; height: 100%;
}

/* Mỗi spread = 2 trang trái/phải. Tất cả chồng nhau, dùng opacity để fade. */
.album-spread {
    position: absolute; inset: 0;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .55s ease, transform .55s ease;
    transform: scale(0.985);
    pointer-events: none;
}
.album-spread.active {
    opacity: 1; visibility: visible;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}
/* Hiệu ứng lật sang phải (next) */
.album-spread.leave-next {
    opacity: 0; transform: translateX(-3%) rotateY(-8deg);
}
.album-spread.enter-next {
    opacity: 0; transform: translateX(3%) rotateY(8deg);
}
/* Hiệu ứng lật sang trái (prev) */
.album-spread.leave-prev {
    opacity: 0; transform: translateX(3%) rotateY(8deg);
}
.album-spread.enter-prev {
    opacity: 0; transform: translateX(-3%) rotateY(-8deg);
}

/* Trang trái / phải */
.album-page {
    position: relative;
    background: linear-gradient(180deg, #1a1f2e 0%, #0d1320 100%);
    border: 1px solid rgba(0, 212, 255, 0.08);
    overflow: hidden;
}
.album-page-left  { border-radius: 8px 0 0 8px; border-right: 0; }
.album-page-right { border-radius: 0 8px 8px 0; border-left: 0; }
.album-page-empty {
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 6px, transparent 6px 12px);
}
.album-page-inner {
    position: relative;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    cursor: zoom-in;
}
.album-media {
    flex: 1; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    background: #000;
    overflow: hidden;
}
.album-media img, .album-media video {
    max-width: 100%; max-height: 100%;
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.album-media .svg-placeholder { width: 100%; height: 100%; }
.album-page-caption {
    padding: 10px 14px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
    color: #fff; font-size: 13px;
    text-align: center;
    position: absolute; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}
.album-page-number {
    position: absolute; top: 10px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--accent-primary);
    border-radius: 50%;
    font-size: 12px; font-weight: 700;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.album-page-left  .album-page-number { left: 10px; }
.album-page-right .album-page-number { right: 10px; }

/* Gáy ngầm cho mỗi spread — gradient mềm giữa 2 trang để gợi "khe gấp" */
.album-spread-spine {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px;
    pointer-events: none;
    background:
        linear-gradient(90deg,
            rgba(0,0,0,0.55) 0%,
            rgba(0,0,0,0.85) 50%,
            rgba(0,0,0,0.55) 100%);
    box-shadow:
        inset 6px 0 12px rgba(0,0,0,0.5),
        inset -6px 0 12px rgba(0,0,0,0.5);
    z-index: 3;
}

/* ─── Gáy sách CHÍNH (nằm giữa book) với thanh tiến trình DỌC ─── */
.album-book-spine {
    position: absolute;
    top: 22px; bottom: 22px;
    left: 50%; transform: translateX(-50%);
    width: 38px;
    z-index: 6;
    pointer-events: none;
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 0;
    background:
        linear-gradient(90deg,
            rgba(0,0,0,0) 0%,
            rgba(0,0,0,0.4) 30%,
            rgba(0,0,0,0.7) 50%,
            rgba(0,0,0,0.4) 70%,
            rgba(0,0,0,0) 100%);
}
.album-spine-track {
    position: relative;
    flex: 1; min-height: 0;
    width: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.18);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
}
.album-spine-fill {
    position: absolute; left: 0; right: 0; top: 0;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-deep) 100%);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.7);
    transition: height .45s ease;
}
.album-spine-counter {
    margin-top: 10px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.75);
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    color: var(--accent-primary);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    writing-mode: horizontal-tb;
}

/* ─── Nav buttons ─── */
.album-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 7;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(5, 8, 16, 0.75);
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    font-size: 22px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    backdrop-filter: blur(6px);
}
.album-nav:hover { background: var(--accent-primary); color: #050810; box-shadow: var(--glow-cyan); }
.album-nav-prev { left: 12px; }
.album-nav-next { right: 12px; }
.album-nav[disabled] { opacity: 0.35; cursor: not-allowed; }

/* ─── Thanh "auto-flip progress" ngang phía trên book ─── */
.album-autoflip-progress {
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.05);
    z-index: 5;
    overflow: hidden;
}
.album-autoflip-progress > span {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-glow));
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
    transition: width .2s linear;
}
.album-book.paused .album-autoflip-progress > span { background: rgba(245,158,11,0.7); }

/* ─── Fullscreen mode ─── */
.album-book.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    z-index: 10000 !important;
    border-radius: 0 !important;
    padding: 32px !important;
}
.album-book.is-fullscreen + .post-back,
body.album-book-fullscreen .site-header,
body.album-book-fullscreen .site-footer { display: none !important; }

/* ─── Fullscreen image viewer (khi click 1 ảnh) ─── */
.album-image-viewer {
    display: none;
    position: fixed; inset: 0; z-index: 11000;
    background: rgba(2, 6, 14, 0.97);
    backdrop-filter: blur(12px);
    align-items: center; justify-content: center;
    flex-direction: column;
    padding: 24px;
}
.album-image-viewer.active { display: flex; }
.album-image-viewer img,
.album-image-viewer video {
    max-width: 96vw; max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.album-image-viewer .album-viewer-caption {
    color: var(--text-primary);
    margin-top: 14px; font-size: 14px;
    max-width: 90vw; text-align: center;
}
.album-image-viewer .album-viewer-close {
    position: absolute; top: 24px; right: 24px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-accent);
    color: #fff; cursor: pointer;
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
}
.album-image-viewer .album-viewer-close:hover {
    background: var(--accent-primary); color: #050810;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .album-book {
        aspect-ratio: 3 / 4;
        padding: 12px;
    }
    .album-spread { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .album-page-left  { border-radius: 8px 8px 0 0; border-right: 1px solid rgba(0,212,255,0.08); border-bottom: 0; }
    .album-page-right { border-radius: 0 0 8px 8px; border-left: 1px solid rgba(0,212,255,0.08); border-top: 0; }
    .album-spread-spine {
        top: 50%; bottom: auto; left: 0; right: 0;
        transform: translateY(-50%);
        width: auto; height: 24px;
        background:
            linear-gradient(180deg,
                rgba(0,0,0,0.55) 0%,
                rgba(0,0,0,0.85) 50%,
                rgba(0,0,0,0.55) 100%);
        box-shadow:
            inset 0 6px 12px rgba(0,0,0,0.5),
            inset 0 -6px 12px rgba(0,0,0,0.5);
    }
    .album-book-spine {
        top: auto; bottom: 8px; left: 12px; right: 12px;
        transform: none; width: auto; height: 38px;
        flex-direction: row;
        padding: 0 8px;
        background:
            linear-gradient(180deg,
                rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
    }
    .album-spine-track { width: auto; height: 6px; }
    .album-spine-fill {
        left: 0; top: 0; bottom: 0; height: auto;
        width: 0%;
        background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-deep) 100%);
        transition: width .45s ease;
    }
    .album-spine-counter { margin-top: 0; margin-left: 10px; }
    .album-nav { width: 42px; height: 42px; font-size: 18px; }
    .album-book-header { padding: 0 12px; }
}


/* ═══ Tag detail ═══ */
.tag-detail-hero {
    padding: 80px 24px 60px; text-align: center;
    background: radial-gradient(ellipse at top, rgba(0,212,255,0.06), transparent 60%);
    border-bottom: 1px solid var(--border);
}
.tag-detail-inner { max-width: 800px; margin: 0 auto; }
.tag-detail-title { font-size: clamp(32px, 5vw, 56px); margin: 16px 0; font-weight: 800; }

/* ═══ About ═══ */
.about-content { max-width: 980px; margin: 0 auto; padding: 60px 24px; }
.about-inner p { font-size: 17px; color: var(--text-secondary); line-height: 1.8; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 40px 0; }
.about-feature {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}
.about-feature i { font-size: 36px; color: var(--accent-primary); margin-bottom: 12px; display: block; }
.about-feature h4 { color: var(--text-primary); margin: 0 0 8px; }
.about-feature p { color: var(--text-muted); font-size: 14px; margin: 0; }

.contact-list { list-style: none; padding: 0; }
.contact-list li {
    padding: 10px 0; color: var(--text-secondary); display: flex; align-items: center; gap: 10px;
}
.contact-list li i { color: var(--accent-primary); }

/* ═══ Footer ═══ */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 48px 24px 32px;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.footer-col h6 {
    color: var(--accent-primary); font-size: 14px; text-transform: uppercase;
    letter-spacing: 1.5px; margin: 0 0 14px;
}
.footer-col p, .footer-col a { color: var(--text-muted); font-size: 14px; display: block; margin-bottom: 6px; }
.footer-col a:hover { color: var(--accent-primary); }
.footer-tagline { color: var(--text-secondary); font-style: italic; font-size: 13px; }
.text-muted { color: var(--text-muted) !important; }

/* ═══ Lightbox ═══ */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(2, 6, 14, 0.96);
    backdrop-filter: blur(10px);
    align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-content {
    max-width: 92vw; max-height: 90vh;
    position: relative; text-align: center;
}
.lightbox-image, .lightbox-video {
    max-width: 100%; max-height: 80vh;
    border-radius: 8px; box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.lightbox-caption {
    color: var(--text-primary); padding: 16px; font-size: 14px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: rgba(255,255,255,0.08); border: 1px solid var(--border-accent);
    color: #fff; cursor: pointer;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; transition: all .2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: var(--accent-primary); color: #050810;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ═══ SVG Placeholder (cyber illustrations) ═══ */
.svg-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.07) 0%, rgba(30, 64, 175, 0.10) 100%);
    overflow: hidden;
}
.svg-placeholder::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle, #000 30%, transparent 80%);
}
.svg-placeholder svg {
    width: 50%; height: 50%; max-width: 120px;
    filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.55));
    position: relative; z-index: 1;
}
.preview-tile .svg-placeholder svg { width: 60%; height: 60%; max-width: 80px; }
.card-cover-svg { aspect-ratio: 16/9; min-height: 240px; }
.card-cover-svg .svg-placeholder svg { width: 30%; max-width: 160px; }
.svg-placeholder-caption {
    position: absolute; bottom: 10px; left: 10px; right: 10px;
    color: var(--accent-primary); font-size: 11px; font-weight: 500;
    text-align: center; opacity: 0.7;
    z-index: 1;
}
.svg-placeholder-video {
    position: relative; aspect-ratio: 16/9;
}
.svg-placeholder-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff; font-size: 64px;
    text-shadow: 0 4px 16px rgba(0,0,0,0.7);
    z-index: 2;
}

/* ═══ Animations ═══ */
[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
[data-aos].aos-show { opacity: 1; transform: translateY(0); }

/* ═══ Responsive ═══ */
@media (max-width: 960px) {
    /* Timeline thu gọn: cột date hẹp hơn, số ngày bớt to */
    .feed { --timeline-col: 100px; --timeline-gap: 24px; --timeline-line-x: 112px; }
    .timeline-date { padding-right: 16px; }
    .timeline-date-day { font-size: 32px; }
    .timeline-date-month { font-size: 13px; letter-spacing: 1.5px; }
    .timeline-date-year { font-size: 10px; letter-spacing: 2px; }
    .timeline-date-weekday { font-size: 10px; }
}

@media (max-width: 768px) {
    .site-header { padding: 12px 16px; }
    .brand-text { display: none; }
    .site-nav a { padding: 6px 10px; font-size: 13px; }
    .filter-bar { top: 64px; }
    .filter-inner { padding: 0 16px; }
    .filter-search { width: 100%; min-width: 0; margin-left: 0; margin-top: 8px; }
    .feed-card { padding: 20px; }
    .hero-stats { gap: 24px; }
    .post-hero { height: 40vh; min-height: 240px; }
    .post-detail-inner { margin-top: -40px; padding: 24px 16px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    /* Mobile: timeline chuyển thành "chip" ngày nằm bên trên mỗi card */
    .feed { padding: 32px 16px; }
    .feed::before { display: none; }
    .feed-timeline-row {
        display: block;
        margin-bottom: 28px;
    }
    .timeline-date {
        position: static;
        padding: 0 0 10px 0;
        text-align: left;
    }
    .timeline-date-inner {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        padding: 6px 12px;
        background: rgba(15, 23, 42, 0.85);
        border-left: 3px solid #00d4ff;
        border-radius: 4px;
        display: inline-flex;
    }
    .timeline-date-day { font-size: 22px; }
    .timeline-date-month { font-size: 13px; }
    .timeline-date-year { font-size: 11px; }
    .timeline-date-weekday { font-size: 10px; margin-top: 0; }
    .timeline-dot { display: none; }
}

