
/* === site common overrides === */
:root {
  --brand-green: #7db10c;
  --nav-height: 90px;
}
html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  /* page css 把 body 设成横向 flex，会导致页脚无法通栏 */
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
.sf-hidden,
.d-none { display: none !important; }
#site-nav-slot { display: contents; }
/* 页脚通栏：挂在 body 下，用 100vw 突破任何父级宽度限制 */
#site-footer-slot {
  display: block !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  background: #000 !important;
  position: relative !important;
  z-index: 20;
}
/* 仅保留版权一行，居中；黑色背景通栏铺满 */
.site-footer-simple,
#site-footer-slot .cib_footer,
#site-footer-slot .site-footer-simple {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px 16px !important;
  box-sizing: border-box !important;
  background: #000 !important;
  background-image: none !important;
  gap: 8px;
}
.site-footer-simple .site-footer-tip,
.site-footer-simple .site-footer-copy {
  margin: 0;
  width: 100%;
  max-width: 960px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #b3b3b3;
}
.site-footer-simple .site-footer-copy {
  color: inherit;
}
.mainwrapper {
  width: 100% !important;
  max-width: 1920px;
  align-self: center;
}
/* 导航沿用快照原样式（home/news/guide.css 内 .navigationitem），此处仅补移动端折叠 */
.hamburgerbtn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.hamburgerbtn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
}
@media (max-width: 992px) {
  .hamburgerbtn { display: flex; }
  .navwrapper:not(.show) { display: none; }
  .navwrapper.show {
    display: flex;
    width: 100%;
    background: rgba(0, 0, 0, 0.92);
    padding: 12px;
  }
  .navbar-nav {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
}
.news-empty, .news-error {
  padding: 40px 20px;
  text-align: center;
  color: #b3b3b3;
}
#news_details img,
#guide_details img {
  max-width: 100%;
  height: auto;
}
/* 详情正文：多图容器，按原始宽度自动换行（不强制每行数量） */
#news_details .img-row,
#guide_details .img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 12px 0;
}
#news_details .img-row img,
#guide_details .img-row img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  flex: 0 0 auto;
}
/* 列表封面：容器尺寸固定，图片 object-fit 缩放裁切，避免随原图大小撑开 */
.mainnewsimg {
  position: relative;
  overflow: hidden;
  flex: 0 0 380px;
  width: 380px;
  height: 240px;
}
.mainnewsimg img,
.newsimg img,
#news_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform-origin: center center;
}
@media screen and (max-width: 1010px) {
  .mainnewsimg {
    flex: 0 0 auto;
    width: 100%;
    height: 220px;
  }
}
/* 详情正文背景区：固定宽度（上限 1000px），不随短文收缩 */
.gamenewswrapper {
  width: 100% !important;
  max-width: 1000px !important;
  box-sizing: border-box;
}
#news_details,
#guide_details {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* 未打开的 Bootstrap modal 仍是 fixed 全屏，会挡住点击/悬停 */
.modal:not(.show),
.modal.fade:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

/* 内容页/首页：取消 absolute；顶部间距与新闻/资讯统一 */
.mainwrapper.contentwrapper,
.mainwrapper.home-no-kv {
  position: relative !important;
  top: auto !important;
  overflow: visible !important;
  margin-top: 100px !important;
  padding-top: 0 !important;
}
/* 首页：裁切绝对定位装饰，避免撑出页脚下方空白 */
.mainwrapper.home-no-kv {
  overflow-x: hidden !important;
  overflow-y: clip !important;
}
/* 去掉首页区块残留渐变底（section4 大背景图已移除） */
.home-no-kv .section3,
.home-no-kv .section4main,
.home-no-kv .section5,
.home-no-kv .section6 {
  background: none !important;
  background-image: none !important;
}
/* 武器区改版后不再需要为右侧大立绘预留 150px；featuretitle 用实际图片占位 */
.home-no-kv .section5 {
  margin-top: 40px !important;
}
.home-no-kv .featuretitle {
  position: relative;
  width: 100%;
  max-width: 1250px;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.home-no-kv .featuretitle span {
  position: static !important;
  display: block;
  width: 100%;
  max-width: 1250px;
  height: auto !important;
  min-height: 120px;
  margin: 0 !important;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  aspect-ratio: 1250 / 180;
}
.home-no-kv .section6 {
  margin-top: 20px !important;
}
/* 特色 banner 切换条：从右侧改为下方横向 */
.home-no-kv .featurebanner {
  flex-direction: column;
  align-items: center;
  max-height: none;
  gap: 16px;
}
.home-no-kv .featurebanner img.fbanner {
  width: 100%;
  max-width: 900px;
  min-width: 0;
  height: auto;
}
.home-no-kv .featurebanner .featuretab {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 900px;
}
.home-no-kv .featurebanner .sidetab {
  width: 40px;
  height: 5px;
  flex: 0 0 auto;
  cursor: pointer;
}
/* 首页 section3 原有 padding-top:100px，去掉以免标题图比新闻页更靠下 */
.home-no-kv .section3 {
  position: relative;
  z-index: 2;
  padding-top: 0 !important;
  padding-bottom: 40px !important;
  margin-bottom: 0 !important;
}
/* 三页标题图（新闻/资讯 banner）垂直位置对齐 */
.mainwrapper.contentwrapper > .container-fluid > .newsctnwrapper > .title.row,
.home-no-kv .section3 .title.row {
  margin-top: 50px;
  margin-bottom: 50px;
}
#news.newswrapper {
  position: relative;
  z-index: 2;
  width: 100%;
}
#news .newsbox {
  position: relative;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
  animation: animatetop 0.8s ease both;
}
#news .newsbox:nth-child(1) { animation-delay: 0.05s; }
#news .newsbox:nth-child(2) { animation-delay: 0.15s; }
#news .newsbox:nth-child(3) { animation-delay: 0.25s; }
#news .newsbox:nth-child(4) { animation-delay: 0.35s; }
/* 与 news.html 一致：容器裁切，悬停放大图片本身 */
#news .newsbox .newsimg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 190px;
  overflow: hidden;
  flex: 1 1 auto;
  scale: 1 !important; /* 覆盖 home.css 对容器 scale 的错误写法 */
}
#news .newsbox:hover .newsimg {
  height: 190px !important;
  scale: 1 !important;
}
#news .newsbox .newsimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  transition: scale 0.5s ease;
  scale: 1;
}
#news .newsbox:hover .newsimg img {
  scale: 1.15;
}
#news .newsbox .newsctn {
  position: relative;
  z-index: 3;
  pointer-events: none;
}
#news .newsbox .newsctn * {
  pointer-events: none;
}
