@media (max-width:  576px){
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 1050;
  }
  .navbar-collapse::before {
    content: '';
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    pointer-events: auto;
  }
  .active {
    border-radius: 0!important
  }

  .navbar-collapse.show {
    display: block !important;
  }
 

  .navbar-collapse .navbar-nav {
    position: relative;
    z-index: 1051;  /* 比菜单容器还高，确保在遮罩之上 */
    background: white;
  }

  .navbar > .container {
    position: relative !important;
    z-index: 1050;
  }
  .nav-main,.banner-wrapper {
    padding-left:  1rem!important;
    padding-right: 1rem!important;
  }
  .nav-item {
    padding-bottom: 0.5rem!important;
  }

  .main-wrap, .item-box  {
    margin-left: 1rem!important;
    margin-right: 1rem!important;
  }
  .custom-footer { font-size: 0.75rem; }
}
/* 导航 */
.nav-link {
  display: block;
  box-sizing: border-box;
  padding-left:  20px!important;
  padding-right: 20px!important;
  color: #000000!important;
}
.active {
  color: #ffffff!important;
  background-color: #000000;
}
/* banner */
.banner-wrapper {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  position: relative;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50%;
  margin-right: -50%;
}
.web-bg {
  background-color: #f1f5f9;
}
.main-wrap p {
  cursor: default;
}
/* 游戏列表 */
.item-box {
  background-color: #ffffff;
  box-sizing: border-box;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.item-box:hover {
  background-color: #e9ecef;
}
.game-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
    white-space: nowrap;        /* 强制不换行 */
    overflow: hidden;           /* 隐藏超出内容 */
    text-overflow: ellipsis;    /* 超出显示省略号 */
    max-width: 100%;            /* 限制最大宽度 */
    flex: 1;                    /* 弹性占满剩余空间 */
}
@media (min-width: 576px) {
  .item-box { padding: 0.75rem; }
  .game-icon { width: 56px; height: 56px; }
  .game-title { font-size: 1rem;}
  .game-badge {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.5rem !important;
  }
  .game-desc,.custom-footer { font-size: 0.75rem }
}

@media (min-width: 768px) {
  .item-box { padding: 0.75rem; }
  .game-icon { width: 60px; height: 60px; }
  .game-title { font-size: 1.05rem;}
  .game-badge {
    font-size: 0.75rem !important;
  }
  .game-desc,.custom-footer { font-size: 0.8rem; }
  .nav-spacing .nav-item:not(:last-child) {
    margin-right: 10px;  /* 精确10px间隔 */
  }
}

@media (min-width: 992px) {
  .item-box { padding: 0.85rem; }
  .game-icon { width: 55px; height: 55px; }
  .game-title { font-size: 1rem;} 
  .game-badge {
    font-size: 0.7rem !important; 
  }
  .game-desc,.custom-footer { font-size: 0.75rem; }
  -webkit-line-clamp: 2;
  .ms-2 {
    margin-left: 0.6rem; 
  }
}

@media (min-width: 1200px) {
  .item-box { padding: 0.9rem; }
  .game-icon { width: 62px; height: 62px; }
  .game-title { font-size: 1.05rem;}
  .game-desc,.custom-footer { font-size: 0.8rem; }
}

@media (min-width: 1400px) {
  .item-box { padding: 0.8rem; }
  .game-icon { width: 56px; height: 56px; } 
  .game-title { font-size: 0.95rem;}
  .game-badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
  }
  .game-desc,.custom-footer { font-size: 0.75rem; }
  -webkit-line-clamp: 2;
  .ms-2 {
    margin-left: 0.5rem;
  }
}

/* 二维码弹窗 */
.modal-game-image {
  width: 200px;
  height: 200px;
  display: block;
}
.btn-close-custom {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  line-height: 1;
}
/* 页脚 */
footer {
  flex-shrink: 0;
}
.custom-footer {
 color: #7f7f7f!important;
 cursor: default!important;
}
/* 关于我们 */

.custom-lineheight {
  line-height: 1.2!important; /* 放大行高，让空行呼吸感更强 (原lh-lg为1.5左右，此处略增) */
}

.contact-link {
  color: #0d6efd;
  text-decoration: none;
  cursor: pointer;
}
.contact-link:hover {
  color: #0a58ca;
}
