/* =========================================================
   Infestation Việt Nam — lớp ẢNH GIAO DIỆN
   Nguồn: ISSVN-31-10-2026.fig (trang 40 Assets)
   Ảnh: /static/img/art/  ·  Nạp SAU design.css
   Mọi lớp ảnh chỉ là nền; chữ / thẻ / nút vẫn phẳng.
   ========================================================= */

/* ---------------------------------------------------------
   22 · Bê tông nền trang (ô 384 px, hiện 7 %)
   Dùng gradient phủ 93 % thay vì opacity để không tạo
   stacking context mới cho toàn trang.
   --------------------------------------------------------- */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(19, 21, 18, .93), rgba(19, 21, 18, .93)),
    url("/static/img/art/concrete.jpg");
  background-size: auto, 384px auto;
  background-position: center, center;
  background-repeat: repeat, repeat;
  background-attachment: fixed, fixed;
}

/* ---------------------------------------------------------
   01 / 02 · Hero trang chủ
   --------------------------------------------------------- */
.hero {
  isolation: isolate;
  background-color: var(--bg);
  background-image:
    url("/static/img/art/hero-desktop.jpg"),
    var(--cross);
  background-size: cover, 640px auto;
  background-position: center 42%, center;
  background-repeat: no-repeat, repeat;
}

/* 26 · Sương lưới thép — trộn screen, hiện 30 % */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/img/art/chainlink-fog.jpg") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .30;
  pointer-events: none;
}

/* Lớp phủ 30 % + dốc tối bên trái giữ chữ đọc được */
.hero::after {
  background:
    linear-gradient(90deg,
      rgba(19, 21, 18, .80) 0%,
      rgba(19, 21, 18, .52) 42%,
      rgba(19, 21, 18, .30) 74%,
      rgba(19, 21, 18, .30) 100%);
}

/* ---------------------------------------------------------
   03 / 04 / 05 / 06 · Băng tiêu đề trang con
   --------------------------------------------------------- */
.page-hero {
  background-color: var(--bg);
  background-image:
    url("/static/img/art/pagetitle-generic.jpg"),
    var(--cross);
  background-size: cover, 640px auto;
  background-position: center 45%, center;
  background-repeat: no-repeat, repeat;
}
.page-hero::after {
  background:
    linear-gradient(90deg,
      rgba(19, 21, 18, .62) 0%,
      rgba(19, 21, 18, .34) 55%,
      rgba(19, 21, 18, .26) 100%);
}

body[data-page="news"] .page-hero {
  background-image: url("/static/img/art/pagetitle-news.jpg"), var(--cross);
}
body[data-page="kho"] .page-hero,
body[data-page="store"] .page-hero {
  background-image: url("/static/img/art/pagetitle-items.jpg"), var(--cross);
}
body[data-page="rank"] .page-hero {
  background-image: url("/static/img/art/pagetitle-ranking.jpg"), var(--cross);
}

/* Trang "Tài khoản bị hạn chế" — dùng ảnh nền 29 như trang 500 (phủ 72 %) */
.page-hero--blocked {
  background-image:
    linear-gradient(90deg,
      rgba(19, 21, 18, .80) 0%,
      rgba(19, 21, 18, .66) 60%,
      rgba(19, 21, 18, .58) 100%),
    url("/static/img/art/error-500.jpg"),
    var(--cross);
}

/* ---------------------------------------------------------
   10 · Dải số liệu nhanh (phủ 35 %) + 21 · hạt kính mờ
   --------------------------------------------------------- */
.facts {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(12, 13, 11, .35), rgba(12, 13, 11, .35)),
    url("/static/img/art/band-wide.jpg");
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: repeat, no-repeat;
}
.facts__grid { position: relative; z-index: 1; }

.fact { position: relative; }
.fact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/img/art/frosted-glass.jpg") repeat;
  background-size: 256px auto;
  opacity: .30;
  pointer-events: none;
}
.fact > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   21 · Hạt kính mờ cho thẻ kính (Túi đồ khởi đầu)
   + vạch quét VHS trên ảnh chính
   --------------------------------------------------------- */
.kit {
  background-color: var(--card);
  background-image:
    var(--cross),
    linear-gradient(rgba(25, 28, 23, .70), rgba(25, 28, 23, .70)),
    url("/static/img/art/frosted-glass.jpg");
  background-size: 640px auto, auto, 256px auto;
  background-position: center, center, center;
  background-repeat: repeat, repeat, repeat;
}
.kit__main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, .24) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
}
.kit__tag { z-index: 2; }

/* Thẻ vật phẩm — hạt kính mờ + lưới dấu cộng */
.item-card__media {
  position: relative;
  background-color: var(--card-alt);
  background-image:
    var(--cross),
    linear-gradient(rgba(31, 35, 29, .72), rgba(31, 35, 29, .72)),
    url("/static/img/art/frosted-glass.jpg");
  background-size: 640px auto, auto, 256px auto;
  background-position: center, center, center;
  background-repeat: repeat, repeat, repeat;
}
.item-card__media img { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   11 / 12 · Lời kêu gọi (CTA) + 27 · pháo sáng
   --------------------------------------------------------- */
.cta__box {
  isolation: isolate;
  background-color: var(--card);
  background-image:
    linear-gradient(90deg,
      rgba(19, 21, 18, .86) 0%,
      rgba(19, 21, 18, .58) 46%,
      rgba(19, 21, 18, .38) 100%),
    url("/static/img/art/cta-desktop.jpg"),
    var(--cross);
  background-size: auto, cover, 640px auto;
  background-position: left center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
.cta__box::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -28px;
  width: 260px;
  height: 260px;
  background: url("/static/img/art/flare-glow.jpg") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .75;
  pointer-events: none;
}
.cta__copy,
.cta__actions { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   23 / 24 / 25 · Chân trang: thép gỉ, vệt bẩn, dây thép gai
   --------------------------------------------------------- */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(12, 13, 11, .84), rgba(12, 13, 11, .84)),
    url("/static/img/art/rust-steel.jpg");
  background-size: auto, 384px auto;
  background-position: center, center;
  background-repeat: repeat, repeat;
}
/* 24 · vệt bẩn mép trên, 18 px */
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  background: url("/static/img/art/smear.jpg") center top / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .55;
  pointer-events: none;
}
/* 25 · dây thép gai mép trên, 68 px, hiện 60 % */
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 68px;
  background: url("/static/img/art/barbed-wire.jpg") center top / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .60;
  pointer-events: none;
}
.site-footer > .wrap { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   07 · Ảnh nền khối Đăng nhập / Đăng ký (phủ 70 %)
   --------------------------------------------------------- */
.auth-panel {
  position: relative;
  background-color: var(--card);
  background-image:
    linear-gradient(180deg,
      rgba(19, 21, 18, .52) 0%,
      rgba(19, 21, 18, .72) 55%,
      rgba(19, 21, 18, .82) 100%),
    url("/static/img/art/auth-visual.jpg"),
    var(--cross);
  background-size: auto, cover, 640px auto;
  background-position: center, center 35%, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
.auth-panel > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   09 · Thẻ Tải game (phủ 45 %)
   --------------------------------------------------------- */
.dl-card {
  position: relative;
  background-color: var(--card);
  background-image:
    linear-gradient(90deg,
      rgba(25, 28, 23, .90) 0%,
      rgba(25, 28, 23, .72) 48%,
      rgba(25, 28, 23, .50) 100%),
    url("/static/img/art/download-card.jpg"),
    var(--cross);
  background-size: auto, cover, 640px auto;
  background-position: left center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
.dl-card__main { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   16 / 18 / 19 / 20 · Bìa tin theo loại
   --------------------------------------------------------- */
.feature__media {
  background-color: var(--card-alt);
  background-image: url("/static/img/art/cover-event.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.feature--no-media {
  background-color: var(--card);
  background-image:
    linear-gradient(90deg,
      rgba(25, 28, 23, .88) 0%,
      rgba(25, 28, 23, .62) 60%,
      rgba(25, 28, 23, .52) 100%),
    url("/static/img/art/cover-default.jpg");
  background-size: auto, cover;
  background-position: left center, center;
  background-repeat: no-repeat, no-repeat;
}

/* Ảnh bìa đầu bài viết */
.article-hero {
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg,
      rgba(19, 21, 18, .86) 0%,
      rgba(19, 21, 18, .62) 55%,
      rgba(19, 21, 18, .45) 100%),
    url("/static/img/art/cover-update.jpg"),
    var(--cross);
  background-size: auto, cover, 640px auto;
  background-position: left center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}

/* ---------------------------------------------------------
   13 / 29 · Trang lỗi
   --------------------------------------------------------- */
.error-page {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(19, 21, 18, .55), rgba(19, 21, 18, .72)),
    url("/static/img/art/error-404.jpg"),
    var(--cross);
  background-size: auto, cover, 640px auto;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
.error-page[data-code="500"] {
  background-image:
    linear-gradient(rgba(19, 21, 18, .70), rgba(19, 21, 18, .78)),
    url("/static/img/art/error-500.jpg"),
    var(--cross);
}

/* ---------------------------------------------------------
   Trỏ chuột (cursor.png 32×32, điểm nóng 1,1)
   --------------------------------------------------------- */
body {
  cursor: url("/static/img/art/cursor.png") 1 1, auto;
}

/* =========================================================
   Màn hình hẹp
   ========================================================= */
@media (max-width: 1199px) {
  body { background-attachment: scroll, scroll; }
}

@media (max-width: 899px) {
  /* Băng tiêu đề điện thoại — phủ 62 % */
  .page-hero::after {
    background: linear-gradient(90deg,
      rgba(19, 21, 18, .78) 0%,
      rgba(19, 21, 18, .62) 100%);
  }
  /* Ảnh nền Auth trên điện thoại (khối .auth-panel bị ẩn) */
  .auth-mobile-intro {
    position: relative;
    isolation: isolate;
    margin: -8px -4px 8px;
    padding: 28px 24px;
    background-color: var(--card);
    background-image:
      linear-gradient(180deg,
        rgba(19, 21, 18, .74) 0%,
        rgba(19, 21, 18, .90) 100%),
      url("/static/img/art/auth-visual.jpg"),
      var(--cross);
    background-size: auto, cover, 640px auto;
    background-position: center, center 30%, center;
    background-repeat: no-repeat, no-repeat, repeat;
  }
  .auth-mobile-intro > * { position: relative; z-index: 1; }
}

@media (max-width: 768px) {
  /* 02 · Hero điện thoại — phủ 45 %, lệch 70 % 20 % */
  .hero {
    background-image: url("/static/img/art/hero-mobile.jpg"), var(--cross);
    background-position: 70% 20%, center;
  }
  .hero::after {
    background: linear-gradient(180deg,
      rgba(19, 21, 18, .48) 0%,
      rgba(19, 21, 18, .74) 100%);
  }

  /* 12 · Lời kêu gọi bản điện thoại */
  .cta__box {
    background-image:
      linear-gradient(180deg,
        rgba(19, 21, 18, .80) 0%,
        rgba(19, 21, 18, .62) 100%),
      url("/static/img/art/cta-mobile.jpg"),
      var(--cross);
    background-position: center, center top, center;
  }
  .cta__box::after {
    width: 180px;
    height: 180px;
    right: -16px;
    bottom: -16px;
  }

  .site-footer::after { height: 48px; }
}
