/* 01-nen.css: Biến :root (màu, chữ, khoảng cách), reset cơ bản, cảnh nền chiến trường Tam Quốc.
   CẮT LIÊN TIẾP từ khối <style> gốc, giữ đúng thứ tự tầng đè: nạp sau file số nhỏ hơn. Đổi thứ tự file là hỏng giao diện. */
    :root {
    --muc: #120d09; --muc-sau: #0b0805; --muc-den: #070403;
    --kinh: #1d150e; --mat: #1d150e; --mat-vua: #1a120c; --mat-cao: #261b12; --mat-sang: #3a2716;
    --nen-nut: #2a1e14; --nen-nut-mo: #2a1e14cc; --nen-nut-hover: #3a2a1b;
    --nen-o: #120d09aa; --nen-o-dam: #120d09cc; --nen-o-nhat: #120d0988; --nen-o-dac: #120d09f2;
    --nen-hop-tren: #1d140ce6; --nen-hop-duoi: #120c07f2; --nen-phu-giua: #1c120acc; --nen-phu: #050302f2; --nen-phu-mo: #050302d9;
    --nen-san: #0b090b; --nen-nut-bo: #0e0e10b3; --khoa-nen: #1a140f; --khoa-chu: #7d6e5a;
    --chu: #f3e6cf; --chu-sang: #fff4df; --chu-phu: #e3d2b3; --chu-mo: #b9a68a; --chu-mo-nhat: #e9d7b5aa;
    --chu-tren-dong: #2a1a08; --chu-tren-dong-mo: #2a1a08aa; --chu-tren-ngoc: #10220f;
    --dong: #d9a441; --dong-nhat: #f2cf86; --dong-sang: #ffe7a3; --dong-tren: #e9b552; --dong-hover-tren: #f1c062;
    --dong-dam: #c98d2c; --dong-hover-duoi: #d39834; --dong-vien-sang: #f0c46b; --dong-chan: #7d5418;
    --dong-co: #c9a24a; --dong-co-mo: #c9a24a55; --dong-co-sang: #c9a24a99; --dong-hat: #e8c46a;
    --dong-bong: #d9a44133; --dong-vong: #d9a44144; --dong-vien-mo: #d9a44155; --dong-anh: #d9a44166; --dong-nhe: #d9a44122; --dong-rat-nhe: #d9a44118;
    --son: #b3261e; --son-co: #c0392b; --son-sang: #d9472b; --son-bong: #d9472b55; --son-vien-mo: #d9472b44;
    --son-nhat: #ff9b7a; --son-canh-bao: #ff6b5a; --son-nong: #ff8a66; --son-nen: #5a2424; --son-chu-nhat: #f2c9c9;
    --ngoc: #4f8a6b; --ngoc-sang: #4cc46a; --ngoc-nhat: #7fd18b; --ngoc-chu: #8fd4ae; --ngoc-nen: #2e5a2e; --ngoc-chu-nhat: #c9f2c9;
    --hoa-lam: #3fb6a8; --hoa-chu: #bfe8e1; --hoa-nen: #4a4030;
    --nhap-giay: #cfd8d6; --nhap-vien: #546e7a; --nhap-nen: #152229; --nhap-chu: #d7ebf0; --nhap-nhan: #7cc4d9;
    --giay: #f1e3c6; --quan-nen: #efe0c2; --quan-sang: #fff6e2; --quan-giua: #e9cd98; --quan-dam: #a8763f; --quan-chan: #6d4a24;
    --go: #e8c58a; --go-dam: #c99a55; --go-canh: #6b4320; --go-day: #3a230f; --ke: #5a3a1c;
    --quan-den: #222222; --quan-vien-den: #777777; --cham-tat: #6b5a45;
    --phe-thuc: #58b878; --phe-thuc-vien: #3a7a52; --phe-thuc-chu: #a8e8bc;
    --phe-nguy: #6b9ce8; --phe-nguy-vien: #3f6294; --phe-nguy-chu: #b7d3fa;
    --phe-ngo: #e06d53; --phe-ngo-vien: #9e4635; --phe-ngo-chu: #ffc1b0;
    --vien: #5d4429; --vien-nhe: #6b4d2e; --vien-sang: #7a5a34; --vien-the: #6b4d2e99; --vien-mo: #6b4d2e88; --vien-nhat: #6b4d2e66; --vien-rat-nhat: #6b4d2e55;
    --vien-chia: #3a2a1b; --vien-do: #8e3a2a; --vien-het: #a8442f; --chu-het: #e07a5f;
    --lua-tam: #fff6d8; --lua-vong: #ffcf6b; --lua-ngoai: #ff7a2a55; --hao-quang-ban: #ffb26b26;
    --den: #000000; --den-mo-4: #00000044; --den-mo-6: #00000066; --den-mo-8: #00000088; --den-mo-9: #00000099; --den-mo-a: #000000aa; --den-mo-b: #000000bb; --den-mo-c: #000000cc; --den-mo-d: #000000dd;
    --trang-mo: #ffffff14; --trang-anh: #ffffff66; --trong-suot: #00000000;
    --bong-nho: 0 2px 8px var(--den-mo-8); --bong-the: 0 12px 32px var(--den-mo-a); --bong-hop: 0 28px 72px var(--den-mo-c);
    --bong-chinh: 0 4px 0 var(--dong-chan), 0 10px 24px var(--dong-bong);
    --serif: "Noto Serif", "Palatino Linotype", "Times New Roman", Georgia, serif;
    --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --thu-phap: "Noto Serif", "Palatino Linotype", "Times New Roman", serif;
    --co-12: 12px; --co-14: 14px; --co-16: 16px; --co-20: 20px; --co-24: 24px; --co-28: 28px; --co-32: 32px; --co-40: 40px; --co-44: 44px; --co-56: 56px;
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;
    --bo-nho: 8px; --bo-nut: 12px; --bo-the: 18px; --bo-tron: 999px;
    --tg-nhanh: 120ms; --tg-thuong: 200ms; --tg-vua: 320ms; --tg-cham: 600ms;
    --cong-ra: cubic-bezier(.22, 1, .36, 1); --cong-vao: cubic-bezier(.4, 0, 1, 1); --cong-nay: cubic-bezier(.34, 1.56, .64, 1); --cong: var(--cong-ra);
    --tre-so-le: 40ms;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; background: var(--muc); overflow-x: clip; scrollbar-width: none; -ms-overflow-style: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
  body { font-family: var(--sans); background: var(--muc); color: var(--chu); line-height: 1.6; }
  .an { display: none !important; }
  .sr { position: absolute !important; top: 0; left: 0; margin: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .trang { max-width: 1180px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 2; }
  .dau { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 0 8px; }
  .menu { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: var(--co-14); line-height: 1.3; }
  .menu a { color: var(--chu-phu); text-decoration: none; padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; }
  .menu a:hover, .menu a[aria-current] { color: var(--dong-nhat); }
  .logo { font-family: var(--serif); font-size: var(--co-20); font-weight: 700; color: var(--chu); text-decoration: none; display: flex; align-items: center; gap: 8px; }
  .logo i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: var(--co-16);
            background: radial-gradient(circle at 35% 30%, var(--quan-sang), var(--quan-giua) 55%, var(--quan-dam)); color: var(--son); border: 2px solid var(--son);
            box-shadow: 0 3px 0 var(--quan-chan), 0 6px 12px var(--den-mo-8); font-family: "KaiTi","STKaiti","Noto Serif CJK SC",serif; overflow: hidden; }
  .logo i .logo-svg { width: 100%; height: 100%; display: block; }

  /* ===== Cảnh chiến trường Tam Quốc (nền toàn trang) ===== */
  #canh { position: fixed; inset: 0; z-index: 0; overflow: clip; pointer-events: none; contain: layout paint size; }
  #canh svg { position: absolute; left: 0; width: 100%; bottom: 0; height: 100%; }
  #canh .lop { transition: transform var(--tg-nhanh) var(--cong); will-change: transform; }
  #tro { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
  #canh::after { content: ""; position: absolute; inset: 0; z-index: 2; background: radial-gradient(ellipse 120% 90% at 50% 38%, transparent 52%, var(--den-mo-a) 100%), linear-gradient(180deg, transparent 54%, var(--nen-o-nhat) 76%, var(--muc) 98%); }
  /* Sương trôi, tia sáng, hạt phim: tạo chiều sâu kiểu điện ảnh */
  #canh .suong { position: absolute; left: 0; width: 100%; height: 46%; bottom: 8%; pointer-events: none; filter: blur(40px); opacity: .55;
                 background: radial-gradient(ellipse 40% 50% at 30% 60%, var(--s), transparent 70%), radial-gradient(ellipse 35% 45% at 75% 50%, var(--s), transparent 70%);
                 background-size: 120% 100%; animation: troi 60s linear infinite alternate; }
  #canh .suong.s2 { bottom: 0; height: 34%; opacity: .7; animation-duration: 90s; animation-direction: alternate-reverse; }
  @keyframes troi { from { background-position: 0% 0; } to { background-position: 100% 0; } }
  #canh .tia { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .2; filter: blur(16px);
               background: repeating-conic-gradient(from 205deg at 62% -10%, var(--c) 0deg, transparent 3deg 11deg, var(--c) 14deg);
               -webkit-mask-image: radial-gradient(ellipse 60% 70% at 62% 10%, var(--den) 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 70% at 62% 10%, var(--den) 10%, transparent 70%); }
  #canh .hat-min { position: absolute; inset: 0; opacity: .09; mix-blend-mode: overlay; pointer-events: none;
                   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
  .nhan-canh { display: none !important; position: fixed; right: 16px; bottom: 12px; z-index: 2; font-size: var(--co-12); color: var(--chu-mo-nhat); letter-spacing: .3px; pointer-events: none; }

