/* 羅天大陸網頁版｜內容圖樣式 v1（2026-11-28）
   - 首頁主視覺（.hero-art）、頁首橫幅（.page-banner）、登入背景（.login-art）。
   - 圖是純裝飾（alt=""）；每個容器自帶底色，圖載入失敗時只剩底色，版面不跳。
   - 圖放 app/static/img/game/；CSP img-src 'self'，不引用外部圖。
   - 回滾：刪各模板中的 <img> 容器即可，本檔可留。 */

/* ── 首頁訪客主視覺：圖鋪在 .hero 後面，疊暗幕保字可讀 ───────────── */
.hero-with-art {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 22px 16px; background: #03060A;
  border: 1px solid rgba(47, 224, 255, .14);
}
.hero-with-art > .hero-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 45% 35%;
}
.hero-with-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 10, .72) 0%, rgba(3, 6, 10, .82) 55%, rgba(3, 6, 10, .92) 100%);
}
@media (min-width: 768px) {
  .hero-with-art { padding: 40px 28px; }
  .hero-with-art > .hero-art { object-position: 50% 40%; }
  .hero-with-art::before {
    background: linear-gradient(90deg, rgba(3, 6, 10, .9) 0%, rgba(3, 6, 10, .82) 58%, rgba(3, 6, 10, .5) 100%);
  }
}

.hero-with-art .hint { color: var(--sx-lead); }

/* ── 功能頁頁首橫幅（21:9）：主體在中央，窄螢幕以 cover 裁左右 ───────── */
.page-banner {
  position: relative; overflow: hidden; width: 100%; margin: 0 0 16px;
  aspect-ratio: 1600 / 686; max-height: 320px;
  background: #07101A; border: 1px solid rgba(47, 224, 255, .14);
}
.page-banner > img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
}
.page-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 6, 10, 0), rgba(3, 6, 10, .75));
}

/* ── 登入背景：固定鋪滿，疊 55% 暗幕，卡片在最上層 ─────────────────── */
.login-art {
  position: fixed; inset: 0; z-index: 0; background: #03060A; overflow: hidden; pointer-events: none;
}
.login-art > img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
}
.login-art::after {
  content: ""; position: absolute; inset: 0; background: rgba(3, 6, 10, .55);
}

/* ── 首頁特色卡插圖（3:2）：自帶底色，卡內左右貼齊 ─────────────────── */
.feature-art {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  margin: 0 0 12px; background: #07101A; border: 1px solid rgba(47, 224, 255, .14);
}

/* ── 建角引導插圖（透明底 1:1）：置中、不超過 160px ──────────────────── */
/* 圖只掛在「已展開」的 #register-form 上：[hidden] 時沒有盒子 ⇒ 不下載（不靠 loading=lazy）。
   背景圖路徑由 collectstatic（Manifest）改寫成帶雜湊的網址；CSP img-src 'self' 允許。 */
#register-form:not([hidden])::before {
  content: ""; display: block; width: 160px; max-width: 50%; aspect-ratio: 1 / 1; margin: 0 auto 8px;
  background: url("../img/game/empty-no-character.4c80e0ccfca5.webp") center / contain no-repeat;
}

/* 登入頁：body 自成堆疊、卡片在背景之上（不依賴 html 無背景、不依賴新式選擇器） */
body.login-page { isolation: isolate; }
body.login-page > main { position: relative; z-index: 1; }
