/*
 * Clash of Critters 官网 · PC
 * 移植自源站 /static/css/common/reset.css、pgame/en/warn.css、pgame/en/pc/{home,header,roles,game,footer}.css
 * （层叠顺序与源站一致）。含文案的多语言图片不再写在 CSS 里，由 js/config.js + data-config-key 绑定；
 * 只按语言改尺寸 / 位置的规则改用 html[data-locale] 选择器。
 */

/* ===== reset ===== */
body, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td, h1, h2, h3, h4, h5, h6, hr {
  margin: 0;
  padding: 0;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration: none;
  outline: none;
}
img {
  height: auto;
}
video {
  width: 100%;
  height: auto;
}
*:focus { outline: none; }
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
}

/* ===== Cookie 提示条 ===== */
.warn_container {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30px;
  width: 94%;
  max-width: 1800px;
  z-index: 9999;
  background-color: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 10px;
  padding: 12px 24px;
  box-sizing: border-box;
  font-size: 16px;
  font-family: 'Helvetica Neue', Helvetica, Tahoma, Arial, 'Microsoft YaHei', 'PingFang SC', sans-serif;
  line-height: 1.5;
}
.warn_content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.warn_text {
  flex: 1;
  padding-right: 20px;
}
.warn_text a {
  color: #ffdf6e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.warn_get img {
  width: 161px;
  height: 45px;
}
@media screen and (max-width: 768px) {
  .warn_container {
    bottom: 16px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
  }
  .warn_content {
    flex-direction: column;
    align-items: stretch;
  }
  .warn_text {
    padding-right: 0;
  }
  .warn_get {
    margin-top: 8px;
    text-align: center;
  }
  .warn_get img {
    width: 120px;
    height: 33px;
  }
}

/* ===== 页面骨架：1920×1080 画布按视口等比缩放（--s 由 js/main.js 写入） ===== */
html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  --primary: #ffa51d;
  cursor: url("../img/common/home/cursor.webp") 4 4, auto;
}
img {
  width: 100%;
  height: auto;
}

#pc_container {
  background-color: #000;
  width: 100vw;
  height: 100vh;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
#pc_container__wrap {
  aspect-ratio: 16 / 9;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) !important;
  --designW: 1920px;
  --designH: 1080px;
}
#pc_container__ground {
  --s: 1;
  width: 2500px;
  height: 1080px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--s)) !important;
  overflow: hidden;
}
#pc_container__content {
  width: var(--designW);
  height: var(--designH);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) !important;
  transform-origin: center !important;
}
.pc_continer_overflow_bg,
.consult_wrapper {
  position: absolute;
  left: 50%;
  top: 0;
  width: 130%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  transform: translate(-50%, 0);
  max-width: calc(100vw / var(--s));
  pointer-events: none;
}
.consult_wrapper {
  z-index: 99;
}
.global_bg {
  display: block !important;
}
.global_bg > * {
  pointer-events: all;
}

/* ===== 右侧社媒浮窗 ===== */
.consult,
.consult_close {
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 10;
  transform: translate(100%, -50%);
  width: 111px;
  height: 531px;
  background: url(../img/common/consult/consult_bg.webp);
  background-size: contain;
  transition: all 0.3s ease;
  margin-top: -25px;
}
.consult.show {
  transform: translate(0, -50%);
}
.consult_item {
  position: absolute;
  width: 60px;
  height: 60px;
  right: 0;
  display: block;
}
.consult_item:nth-of-type(1) {
  background: url(../img/common/consult/facebook.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(1):hover {
  background: url(../img/common/consult/facebook_active.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(2) {
  background: url(../img/common/consult/twitter.lossless.png) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(2):hover {
  background: url(../img/common/consult/twitter_active.lossless.png) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(3) {
  background: url(../img/common/consult/ins.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(3):hover {
  background: url(../img/common/consult/ins_active.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(4) {
  background: url(../img/common/consult/youtube.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(4):hover {
  background: url(../img/common/consult/youtube_active.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(5) {
  background: url(../img/common/consult/reddit.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(5):hover {
  background: url(../img/common/consult/reddit_active.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(6) {
  background: url(../img/common/consult/discord.webp) no-repeat center/40px 46px;
}
.consult_item:nth-of-type(6):hover {
  background: url(../img/common/consult/discord_active.webp) no-repeat center/40px 46px;
}
.consult_item:nth-of-type(7) {
  display: block;
  background: url(../img/common/consult/tiktok.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(7):hover {
  background: url(../img/common/consult/tiktok_active.webp) no-repeat center/40px 40px;
}
.consult_item:nth-of-type(1) { top: 40px; }
.consult_item:nth-of-type(2) { top: 104px; }
.consult_item:nth-of-type(3) { top: 170px; }
.consult_item:nth-of-type(4) { top: 232px; }
.consult_item:nth-of-type(5) { top: 296px; }
.consult_item:nth-of-type(6) { top: 364px; }
.consult_item:nth-of-type(7) { top: 428px; }
.consult_btn_close {
  width: 40px;
  height: 100px;
  position: relative;
  left: 0;
  top: 50%;
  transform: translate(0, -50%);
  background: url(../img/common/consult/arrow.webp) no-repeat 20px/20px 23px;
}
.consult_btn_close:hover {
  background: url(../img/common/consult/arrow_active.webp) no-repeat 20px/20px 23px;
}
/* 收起后的拉手：源站按语言切背景图并带悬停态；这里拆成常态 / 悬停两层，图片走 config 绑定 */
.consult_close {
  width: 66px;
  height: 144px;
  transform: translate(100%, -50%);
  background: none;
}
.consult_close > i {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-repeat: repeat;
  background-position: 0 0;
}
.consult_close > .consult_close__hover,
.consult_close:hover > .consult_close__normal {
  display: none;
}
.consult_close:hover > .consult_close__hover {
  display: block;
}
.consult_close.show {
  transform: translate(0, -50%);
}

/* ===== 转场星形遮罩 ===== */
.star-mask {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  z-index: 999;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* ===== 分屏 ===== */
#home,
#roles,
#game {
  height: 1080px !important;
  padding-top: 90px;
  box-sizing: border-box;
  display: none;
}
#home {
  display: block;
  padding-top: 0;
}
#footer {
  display: block !important;
}

/* ===== 首屏 ===== */
#download {
  position: absolute;
  bottom: 43px;
  left: 50%;
  z-index: 10;
  transform: translate(-50%, 0);
  width: 497px;
  height: 152px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  display: block;
}
#download_android,
#download_ios {
  display: block;
  width: 186px;
  height: 57px;
  position: absolute;
  left: 155px;
  top: 12px;
}
#download_ios {
  top: 82px;
}
#pay_icon {
  display: block;
  width: 123px;
  height: 123px;
  position: absolute;
  top: 14px;
  left: 14px;
}
#download_official {
  position: absolute;
  bottom: 43px;
  left: 50%;
  z-index: 10;
  transform: translate(-50%, 0);
  width: 363px;
  height: 152px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  display: none;
}
#download_official .download_android,
#download_official .download_ios {
  display: block;
  width: 186px;
  height: 57px;
  position: absolute;
  left: 20px;
  top: 12px;
}
#download_official .download_ios {
  top: 82px;
}
/* 镜像站（域名含 -official）：隐藏三方商城入口，换成不带商城图标的下载组 */
html.is-official #download {
  display: none;
}
html.is-official #download_official {
  display: block;
}

#home .pc_continer_overflow_bg {
  position: relative;
}
#section_wrapper_home_bg_video {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2500px;
  height: auto;
  object-fit: cover;
  z-index: 0;
  transform: translateX(-50%);
}
/* 源站"打开二期内容"把标题图 bottom 统一改成了 221px（行内样式，压过各语言的 bottom） */
#home .slogan {
  position: absolute;
  bottom: 221px;
  left: 50%;
  z-index: 10;
  transform: translate(-50%, 0);
  width: 828px;
  height: auto;
  background-size: 100% auto;
  aspect-ratio: 628/261;
}
html[data-locale="zh_TW"] #home .slogan { width: 868px; }
html[data-locale="ko"] #home .slogan { width: 906px; }
html[data-locale="ja"] #home .slogan { width: 906px; }
html[data-locale="en"] #home .slogan { width: 912px; }

/* ===== 顶栏 ===== */
#header {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  padding: 0 100px;
  padding-right: 60px;
  box-sizing: border-box;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 10;
}
#header .pc_continer_overflow_bg {
  background: no-repeat;
  background-size: 2500px 84px;
  background-position: center bottom 6px;
  background-color: #ffa800;
  height: 100%;
}
#header_nav_wrapper {
  display: flex;
  align-items: center;
  gap: 64px;
  position: relative;
}
#header__logo {
  width: 139px;
  height: 84px;
  transform: translateY(6px);
}
#header_nav {
  display: flex;
  gap: 60px;
  align-items: center;
}
.header_nav__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  transition: all 0.2s ease;
  position: relative;
}
.header_nav__item img {
  height: 31px;
  width: auto;
  opacity: 0;
}
.header_nav__item.active img {
  height: 31px;
}
.header_nav__item:not(.active) img:nth-of-type(1) {
  display: block;
  opacity: 1;
}
.header_nav__item img:nth-of-type(2) {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 42px;
  transform: translate(-50%, -50%);
}
.header_nav__item.active img:nth-of-type(2) {
  display: block;
  opacity: 1;
}
.header_nav__item:not(.active):hover {
  transform: scale(1.1);
}
/* 粉丝创作指引入口：只在英语下显示 */
html:not([data-locale="en"]) #nav_fan_guide {
  display: none;
}
/* 商城入口：源站默认隐藏、非镜像站由 jQuery .show() 放出（flex 子项被块化成 block） */
.hidden_store {
  display: none;
}
html:not(.is-official) #nav_store {
  display: block;
}
#header_extra {
  display: flex;
  gap: 40px;
  align-items: center;
}
#header_extra > div {
  width: 35px;
  height: 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}
#header_extra > div > img {
  height: 100%;
  width: auto;
}
#header_lang_pop {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 10px;
  white-space: nowrap;
  z-index: 999;
  display: none;
  transform: translate(-50%, 11px);
}
#header_lang_pop > div {
  background-color: rgba(26, 19, 23, 0.8);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 23px 30px 15px;
  border-bottom-left-radius: 10px;
}
#header_lang_pop a {
  display: block;
  padding: 16px 12px 12px;
  text-decoration: none;
  color: var(--primary);
  font-size: 18px;
  text-align: center;
  transition: all 0.3s ease;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}
#header_lang_pop a:hover {
  color: #fff;
}
#music_toggle #music_bg_play {
  display: none;
}
#music_toggle #music_bg_pause {
  display: block;
}
#music_toggle.playing #music_bg_play {
  display: block;
}
#music_toggle.playing #music_bg_pause {
  display: none;
}

/* ===== 角色屏 ===== */
#section_roles,
#section_roles_content {
  width: 100%;
  height: 100%;
  position: relative;
}
#section_roles_ani {
  position: relative;
}
#section_roles .pc_continer_overflow_bg {
  background: no-repeat center/cover;
}
#role_name {
  height: 181px;
  position: absolute;
  left: 76px;
  top: 99px;
}
#role_name img {
  height: 100%;
  width: auto;
}
#role_description {
  font-size: 24px;
  font-weight: 500;
  color: #6b3f00;
  line-height: 36px;
  width: 446px;
  position: absolute;
  left: 148px;
  top: 286px;
}
#role_list_sub {
  position: absolute;
  top: 151px;
  right: 128px;
  display: flex;
  gap: 56px;
  align-items: center;
}
.role_list_sub_item {
  width: 118px;
  height: 121px;
}
.role_list_sub_item.active {
  transform: scale(1.29);
}
#role_main {
  width: 609px;
  height: 625px;
  background: url(../img/common/roles/role_center_bg.webp) no-repeat center/contain;
  position: absolute;
  top: 252px;
  left: 686px;
  z-index: 11;
}
#role_main > img {
  width: 702px;
  height: 553px;
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  top: 20px;
  left: -20px;
  object-fit: contain;
}
#role_list {
  position: absolute;
  top: 591px;
  left: 120px;
  right: 113px;
  z-index: 10;
  height: 226px;
}
.role_list_item {
  width: 264px;
  height: 226px;
  position: absolute;
  top: 0;
  transition: all 0.3s ease;
}
.role_list_item:active {
  transform: scale(0.9);
}
.role_list_item:nth-of-type(1) { left: 0; }
.role_list_item:nth-of-type(2) { left: 241px; }
.role_list_item:nth-of-type(3) { left: 1185px; }
.role_list_item:nth-of-type(4) { left: 1425px; }

/* ===== 玩法屏 ===== */
#section_game {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
}
#section_game .pc_continer_overflow_bg {
  background: no-repeat center/cover;
}
#game_swiper {
  height: 707px;
  left: 50%;
  top: 199px;
  transform: translate(-50%, 0);
  position: relative;
  box-sizing: border-box;
  width: calc(439px * 3);
}
.game_kv {
  width: 392px !important;
  height: 707px;
  position: relative;
  background: url("../img/common/game/game_ground_border.webp") no-repeat center/cover;
}
#game_swiper .swiper-slide {
  width: 439px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 300ms;
  transform: scale(0.92);
  opacity: 0;
}
#game_swiper .swiper-slide-prev {
  transform: translateY(8px) scale(0.85) rotate(-5deg);
  opacity: 1;
}
#game_swiper .swiper-slide-next {
  transform: translateY(8px) scale(0.85) rotate(5deg);
  opacity: 1;
}
#game_swiper .swiper-slide-active {
  transform: scale(1);
  opacity: 1;
}
.game_kv .img {
  width: 378px;
  height: 667px;
  position: absolute;
  top: 33px;
  left: 8px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.swiper-slide-next .game_kv::after,
.swiper-slide-prev .game_kv::after {
  content: "";
  display: block;
  width: 363px;
  height: 653px;
  position: absolute;
  top: 40px;
  left: 15px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 40px;
}
#game_swiper .game_button_next,
#game_swiper .game_button_prev {
  width: 81px;
  height: 86px;
  margin-top: 0;
  transition: all 0.3s ease;
}
#game_swiper .game_button_next:active,
#game_swiper .game_button_prev:active {
  transform: scale(0.85);
}
#game_swiper .game_button_next {
  right: -114px;
  background: url(../img/common/game/right.webp) no-repeat center/80px 84px;
}
#game_swiper .game_button_prev {
  left: -114px;
  background: url(../img/common/game/left.webp) no-repeat center/80px 84px;
}
#game_swiper .game_button_next:hover {
  background: url(../img/common/game/right_hover.webp) no-repeat center/80px 84px;
}
#game_swiper .game_button_prev:hover {
  background: url(../img/common/game/left_hover.webp) no-repeat center/80px 84px;
}
#game_swiper .game_button_next:after,
#game_swiper .game_button_prev:after {
  font-size: 0;
}
#game_swiper .swiper-pagination {
  left: 50%;
  bottom: 60px;
  top: unset;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
#game_swiper .swiper-pagination-bullet {
  background-color: #fff;
  width: 16px;
  height: 16px;
  margin-right: 32px;
  opacity: 1;
}
#game_swiper .swiper-pagination-bullet-active {
  width: 30px;
  height: 31px;
  background: url("../img/common/game/active.webp") no-repeat;
}
#game_swiper .swiper-horizontal > .swiper-pagination-bullets,
#game_swiper .swiper-pagination-bullets.swiper-pagination-horizontal {
  bottom: -122px;
}

/* ===== 页脚 ===== */
#footer {
  position: relative;
  color: #fff;
  background-color: #000;
  padding-top: 50px;
  padding-bottom: 70px;
}
#footer .pc_continer_overflow_bg {
  background-color: #000;
}
.footer {
  padding: 14px;
  font-family: "MaoKen";
  position: relative;
  z-index: 100;
  margin: 0 auto;
}
.footer span,
.footer div {
  font-size: 14.5px;
  color: #999999;
}
.footer a {
  font-size: 14.5px;
  color: #999999;
  text-align: center;
}
.copyright {
  margin-top: 20px;
  width: 100%;
  text-align: center;
  cursor: pointer;
}
.footer .footer-logo {
  display: block;
  width: 526px;
  height: 79px;
  margin: 0 auto;
}
.footer .footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
}
.footer .footer-info a {
  text-decoration: none;
}
.footer .footer-copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
/* 日本 */
html[data-locale="ja"] .footer-std .footer-info a {
  margin: 0 20px;
}
/* 台湾：单独一版页脚（分级标识 + 提示语） */
.footer-tw {
  display: none;
  justify-content: center;
  align-items: center;
}
html[data-locale="zh_TW"] .footer-tw {
  display: flex;
}
html[data-locale="zh_TW"] .footer-std {
  display: none;
}
.footer-tw .logo {
  height: 100px;
  display: flex;
  align-items: center;
}
.footer-tw .logo img {
  display: block;
  width: auto;
  height: 80px;
  margin: 0 20px;
}
.footer-tw .right {
  width: 745px;
  margin-left: 30px;
  font-size: 16px;
  text-align: left;
}
.footer-tw .right .copyright {
  color: #999999;
  text-align: left;
  margin-top: 0;
}
.footer-tw .right .footer-info {
  color: #999999;
  margin-top: 20px;
  text-align: left;
  justify-content: flex-start;
}
.footer-tw .right .footer-info a {
  color: #999999;
  text-decoration: none;
}
.footer-tw .right .footer-info span {
  color: #999999;
  margin: 0 10px;
}
