/* ===== Responsive CSS for mobile devices ===== */

/* --- Mobile (max-width: 768px) --- */
@media screen and (max-width: 768px) {

  
  .platform {
      width: 100%;
      height: 4rem;
  }

  /* ===== FIX: popMaskMF must never block interaction ===== */
  .pop_mask_mf {
    pointer-events: none !important;
    display: none !important;
  }
  .pop_mask_mf.mf_pop_show {
    display: block !important;
    pointer-events: auto !important;
  }

  /* ===== TOPBAR ===== */
  .topbar_right .btn_download
  {
    background: none;
  }
  .topbar {
    height: 52px;
    padding: 0 8px;
    box-sizing: border-box;
  }
  .topbar_left {
    width: 100%;
    padding: 0;
    gap: 0;
  }
  .topbar_logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-right: 6px;
  }
  .menu {
    height: 52px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-end;
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu li {
    padding: 0 10px;
    font-size: 16px !important;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .menu li span { font-size: 16px !important; }
  .menu li span::after { height: 3px; }
  .topbar_right {
    display: flex;
    flex-grow: 0;
    width: auto;
    padding-right: 10px;
    align-items: center;
    gap: 8px;
  }
  .topbar_right .btn_download {
    width: auto !important;
    height: 32px !important;
    padding: 0 12px;
    font-size: 12px;
    line-height: 32px;
    background-size: 100% 100%;
    text-indent: 0;
    color: #fff;
    white-space: nowrap;
  }
  .topbar_right .login {
    display: block;
    height: auto;
    padding: 0;
    margin-left: 0;
    border-left: none;
  }
  .topbar_right .login .login_box {
    font-size: 12px;
    padding: 0;
  }
  .topbar_right .login .login_box a {
    white-space: nowrap;
  }
  .topbar_right .btn_audio { display: none; }
  .topbar_right .download_tips { display: none; }

  /* ===== LAYOUT ===== */
  .wraper, #wraper {
    width: 100% !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
  }
  .swiper_sections { width: 100%; height: 100%; }
  .swiper-slide.section { overflow: hidden; }

  /* ===== HEADER SECTION ===== */
  .section_header .bg_video,
  .section_header .bg_video video {
    width: 100%; height: 100%; object-fit: cover;
  }
  .header_main {
    width: 90%;
    padding-bottom: 90px !important;
  }
  .header_main .logo {
    width: 200px !important;
    height: auto !important;
  }
  .header_main .logo img { width: 100%; height: auto; }
  .reserve_tips {
    width: 100% !important;
    height: auto !important;
    padding: 24px 0 20px !important;
  }
  .reserve_tips img {
    width: 200px !important;
    height: auto !important;
  }
  .reserve_tips::before,
  .reserve_tips::after {
    width: 18px; height: 18px;
  }
  .header_btns {
    width: 100% !important;
    height: auto !important;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding-top: 16px !important;
  }
  .header_btns a.btn_item {
    width: 160px !important;
    height: 48px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  .header_btns a.btn_ios,
  .header_btns a.btn_android {
    height: 44px !important;
  }
  .platform {
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.55) !important;
    transform-origin: center bottom;
    width: max-content;
  }
  .btn_get_fixed { display: none !important; }
  .sltips {
    bottom: 8px !important; right: 8px !important;
    width: 28px !important;
  }

  /* ===== CHARACTERS SECTION ===== */
  .section_characters { overflow: hidden; position: relative; }
  .characters_bg_video video { object-fit: cover; }

  /* Hide characters_list on mobile, show random character_info instead */
  .characters_list { display: none !important; }
  .character_list_prev,
  .character_list_next { display: none !important; }

  /* Hide original character_info panel on mobile */
  .character_info { display: none !important; }

  /* ===== MOBILE INLINE CHARACTER (cloned into section) ===== */
  .section_characters .mobile-character-inline {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important;
    display: block !important;
    opacity: 1 !important;
    background-size: cover !important;
    background-position: center !important;
  }
  .section_characters .mobile-character-inline .character_main {
    position: absolute !important;
    width: 55% !important;
    left: 4% !important;
    bottom: 62% !important;
    top: auto !important;
    z-index: 10;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column;
    transform: none !important;
  }
  .section_characters .mobile-character-inline .character_main .title {
    opacity: 1 !important;
    transform: none !important;
  }
  .section_characters .mobile-character-inline .character_main .title,
  .section_characters .mobile-character-inline .character_main .title i {
    font-size: 16px !important;
    line-height: 1.4;
  }
  .section_characters .mobile-character-inline .character_main .name {
    opacity: 1 !important;
  }
  .section_characters .mobile-character-inline .character_main .name,
  .section_characters .mobile-character-inline .character_main .name i {
    font-size: 28px !important;
    line-height: 1.3;
    transform: none !important;
    opacity: 1 !important;
  }
  .section_characters .mobile-character-inline .character_info_pic {
    position: absolute !important;
    /* width: 50% !important; */
    /* right: -5% !important; */
    width: 155% !important;
    height: auto !important;
    bottom: var(--selector-h, 0px) !important;
    transform: none !important;
    opacity: 1 !important;
    display: flex !important;
    justify-content: flex-end;
    align-items: flex-end;
  }
  .section_characters .mobile-character-inline .character_info_pic img {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: right bottom;
  }
  .section_characters .mobile-character-inline .cloud_back {
    display: none !important;
  }

  /* ===== MOBILE CHARACTER SELECTOR (total_box style) ===== */
  .section_characters .mobile-character-selector {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 20 !important;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 6px;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .section_characters .mobile-character-selector::before {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    position: absolute;
    top: 0;
    left: 0;
    background: url(../images/characters/total/ico_line.png) repeat-x 0 0/auto 100%;
    transform: translateY(-70%);
  }
  .section_characters .mobile-character-selector ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .section_characters .mobile-character-selector ul li {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
  }
  .section_characters .mobile-character-selector ul li img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
  }
  .section_characters .mobile-character-selector ul li.active::after {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url(../images/characters/total/ico_active.png) no-repeat 0 0/100% 100%;
  }

  /* ===== PV SECTION ===== */
  .pv_sum_item video { object-fit: cover; }
  .pv_btn_play {
    width: 60px !important;
    height: 60px !important;
    background-size: contain !important;
  }
  .pv_list {
    width: 100% !important;
    /* height: auto !important; */
    bottom: 10px !important;
    left: 0 !important;
    margin-left: 0 !important;
    padding: 8px 36px;
    box-sizing: border-box;
    opacity: 1 !important;
    transform: none !important;
  }
  .pv_list_scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .pv_list ul {
    width: max-content !important;
    height: 56px !important;
    gap: 8px;
    display: flex;
  }
  .pv_list ul li {
    width: 96px !important;
    height: 54px !important;
    margin: 0 !important;
    flex-shrink: 0;
    border-radius: 6px !important;
  }
  .pv_list ul li img { border-radius: 6px; }
  .pv_list_prev,
  .pv_list_next {
    width: 32px !important;
    min-height: 56px !important;
    font-size: 0 !important;
    background-size: 18px auto !important;
    /* tap target */
    padding: 0 4px;
  }

  /* ===== NEWS SECTION ===== */
  .news_bg_video video { object-fit: cover; }
  .news_wrap {
    padding-top: 60px;
    box-sizing: border-box;
  }
  .news {
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box;
  }
  .news h3 {
    font-size: 22px !important;
    height: auto !important;
    margin-bottom: 14px;
  }
  .news h3 span { font-size: 22px !important; }
  .news_list {
    width: 100% !important;
    padding: 0 !important;
  }
  .news_list li {
    padding: 14px 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .news_list li a {
    flex-wrap: wrap;
    gap: 4px;
    min-height: 48px;
    padding: 4px 0;
  }
  .news_list li a span {
    font-size: 16px !important;
    width: 100% !important;
    line-height: 1.5;
  }
  .news_list li a span i {
    font-size: 13px !important;
    width: auto !important;
    height: auto !important;
    padding: 4px 12px !important;
    margin-right: 10px !important;
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }
  .news_list li a em {
    font-size: 14px !important;
    width: 100% !important;
    text-align: left;
    margin-top: 4px;
  }
  .news_more {
    text-align: center;
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    margin-top: 20px;
  }
  .news_more a {
    font-size: 16px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
  }

  /* ===== FOOTER ===== */
  .section_footer {
    height: auto !important;
    padding: 24px 16px !important;
    background-size: cover !important;
  }
  .footer_content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.8;
  }
  .footer_logos {
    width: 100% !important;
    height: auto !important;
    padding-top: 0 !important;
    background-size: contain !important;
    background-position: center top;
  }
  .foot_tips {
    font-size: 12px !important;
    line-height: 1.7;
  }
  .foot_copyright { margin-top: 12px; }
  .copyright_nbgi span {
    font-size: 12px !important;
    line-height: 1.6;
  }

  /* ===== LOADING ===== */
  .loading .progress { font-size: 52px !important; }
  .loading .main { transform: scale(0.6); }

  /* ===== POPUPS ===== */
  .pop {
    width: 92vw !important;
    height: auto !important;
    max-width: 380px;
    transform: translate(-50%, -50%) !important;
  }
  .pop .pop_content {
    width: 100% !important;
  }
  .pop h3, .pop .title {
    font-size: 20px !important;
  }
  .pop .close {
    width: 40px !important;
    height: 40px !important;
    padding: 6px;
    box-sizing: content-box;
  }
  .pop .btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }
  .pop .btns a,
  .pop .btns .btn_item {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .pop_giftcode {
    width: 92vw !important;
    max-width: none !important;
    height: 70vh !important;
  }
  .pop_giftcode .title {
    background: none !important;
    text-indent: 0 !important;
    width: auto !important;
    height: auto !important;
    font-size: 22px !important;
    color: #282828;
    text-align: center;
    padding: 16px 0 8px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
  }
  .pop_giftcode .pop_content {
    height: 100% !important;
  }
  .pop_giftcode .pop_main {
    /* padding: 2.384rem 0; */
    overflow-y: auto !important;
  }
  .pop_giftcode .giftcode_list li {
    padding: 14px 16px;
  }
  .pop_giftcode .giftcode_text {
    font-size: 16px !important;
  }
  .pop_giftcode .btn_copy_code {
    min-width: 64px;
    height: 36px;
    line-height: 36px;
    font-size: 14px !important;
  }
  .pop_pv { z-index: 10002 !important; }
  .close_pv {
    width: 40px; height: 40px;
    padding: 6px; box-sizing: content-box;
  }
}

/* --- Small phones (max-width: 420px) --- */
@media screen and (max-width: 420px) {
  .menu li {
    padding: 0 8px;
    font-size: 14px !important;
  }
  .menu li span { font-size: 14px !important; }

  /* Mobile inline character: smaller text on small phones */
  .section_characters .mobile-character-inline .character_main {
    width: 60% !important;
    left: 4% !important;
    bottom: 58% !important;
    padding: 16px 12px;
    box-sizing: border-box;
    /* background: linear-gradient(transparent, rgba(0,0,0,0.7)); */
  }
  .section_characters .mobile-character-inline .character_main .title,
  .section_characters .mobile-character-inline .character_main .title i {
    font-size: 14px !important;
  }
  .section_characters .mobile-character-inline .character_main .name,
  .section_characters .mobile-character-inline .character_main .name i {
    font-size: 22px !important;
  }

  /* Smaller character selector icons on small phones */
  .section_characters .mobile-character-selector ul li {
    width: 28px;
    height: 28px;
  }
  .section_characters .mobile-character-selector ul li img {
    width: 22px;
    height: 22px;
  }
  .section_characters .mobile-character-selector ul li.active::after {
    width: 28px;
    height: 28px;
  }

  /* PV */
  .pv_list ul li { width: 80px !important; height: 44px !important; }
  .pv_btn_play { width: 52px !important; height: 52px !important; }

  /* Header */
  .header_main .logo { width: 160px !important; }
  .reserve_tips img { width: 170px !important; }
  .header_btns a.btn_item {
    width: 140px !important;
    height: 44px !important;
  }

  /* News */
  .news h3, .news h3 span { font-size: 20px !important; }
  .news_list li a span { font-size: 15px !important; }
  .news_list li a span i { font-size: 12px !important; }
  .news_list li a em { font-size: 13px !important; }
}

/* --- Tablet (769px - 1200px) --- */
@media screen and (min-width: 769px) and (max-width: 1200px) {
  .topbar_right .login { font-size: 12px; }
  .menu li { padding: 0 0.3rem; }
}
