@charset "UTF-8";
article, aside, blockquote, body, button, code, dd, div, dl, dt, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, input, legend, li, menu, nav, ol, p, pre, section, td, textarea, th, ul {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}
html {
    overflow-scrolling: touch;
    margin: 0 auto;
    height: 100%
}


body {
    font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;
    line-height: 1.5;
    font-size: .28rem;
    color: #333;
    -webkit-user-select: none;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    outline: 0;
    height: 100%;
    background: url(../img/bg01.png) no-repeat bottom center;
    background-size: cover;
    background-attachment: fixed;
}

/* 针对小屏幕设备的优化 */
@media (max-width: 768px) {
    body {
        background-size: cover;
        background-attachment: scroll;
    }
}



html {
    background: #002021
}

li {
    list-style: none
}

/* 修改全局img样式，排除logo */
img:not(.logo-img) {
    position: absolute;
    right: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    border: 0;
    vertical-align: middle;
    width: 100%;
}


.ui-center {
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    align-items: center
}





.game-box ul {
    display: block;
    width: 100%;
    height: 100%;
    border: .04rem solid #fff;
    border-top: none;
    border-right: none;
    position: relative
}

.game-box {
    margin-top: .3rem;
    position: relative;
    width: 6.7rem;
    height: 6.7rem
}


.game-box li {
    width: 2.22rem;
    height: 2.22rem;
    border-top: .04rem solid #fff;
    border-right: .04rem solid #fff;
    position: absolute
}


.game-box li:nth-of-type(1) {
    top: 0;
    left: 0
}

.game-box li:nth-of-type(2) {
    top: 0;
    left: 2.22rem
}

.game-box li:nth-of-type(3) {
    top: 0;
    left: 4.44rem
}


.game-box li:nth-of-type(4) {
    top: 2.22rem;
    left: 0
}

.game-box li:nth-of-type(5) {
    top: 2.22rem;
    left: 2.22rem
}

.game-box li:nth-of-type(6) {
    top: 2.22rem;
    left: 4.44rem
}

.game-box li:nth-of-type(7) {
    top: 4.44rem;
    left: 0
}

.game-box li:nth-of-type(8) {
    top: 4.44rem;
    left: 2.22rem
}

.game-box li:nth-of-type(9) {
    top: 4.44rem;
    left: 4.44rem
}


.page1 {
    position: relative;
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    -webkit-box-align: center;
    align-items: center;
    min-height: 100%;
    /* background: url(../img/bg01.png) no-repeat bottom center; */
    /* background-size: 7.5rem 1.6rem; */
    padding-bottom: 1.5rem
}

/* 为logo图片添加特殊处理，覆盖全局img样式 */
.logo-img {
    position: relative;
    width: clamp(100px, 30vw, 200px);
    height: auto;
    top: auto;
    right: auto;
    transform: none;
}

/* 保持原有的header-container样式 */
.header-container {
    display: grid;
    place-items: center;
    width: 100%;
    padding-top: 2%;
}


.play-time {
    margin-top: .4rem;
    width: 1.9rem;
    height: .6rem;
    line-height: .6rem;
    border-radius: .3rem;
    /*background: url(http://hd.xf.fangdd.com/static/senlingame/img/time.png) no-repeat;*/
    background-size: .4rem .4rem;
    background-position: .2rem .1rem;
    background-color: #ffca7a;
    color: #a82d00;
    font-size: .3rem;
    /*text-indent: .75rem*/
    text-align: center;
}


.pages {
    padding-top: .15rem;
    line-height: .6rem;
    font-size: .3rem;
    color: #982505
}

.pages strong {
    text-shadow: 1px .02rem 0 #982505, 1px -.02rem 0 #982505, -1px -.02rem 0 #982505, -1px .02rem 0 #982505;
    color: #f9fd5f
}

.game-pop-box {
    text-align: center;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    /*  background: url(http://hd.xf.fangdd.com/static/senlingame/img/logo1.png) no-repeat .3rem .3rem;*/
    background-size: 3.46rem 1.06rem;
    background-color: rgba(0, 0, 0, .7);
    z-index: 10;
}


.game-start-btn {
    margin: .3rem 0;
    width: 3rem;
    height: .9rem;
    border-radius: .45rem;
    border: .03rem solid #fff;
    color: #fff;
    display: inline-block;
    font-size: .46rem;
    text-align: center;
    line-height: .9rem;
    background-color:rgba(0, 0, 0, 0.4);/*设置开始按钮背景色透明度*/


}

.game-reset-btn {
    margin: .3rem 0;
    width: 3rem;
    border-radius: .45rem;
    color: #fff;
    display: inline-block;
    font-size: .46rem;
    text-align: center;
    line-height: .9rem;
    background-color: #c77b02;
}

.game-reset-btn:disabled {
    background-color: gainsboro;
}
.game-pop-hd {
    display: none;
}
game-pop-hd
.h2 {
    font-size: .4rem;
    color: #f9fd5f;
}
.game-pop-hd p {
    font-size: .3rem;
    color: #fff
}


/* 弹窗遮罩层 */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.hidden {
  display: none;
}

/* 弹窗主体 */
.popup-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  width: 300px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  animation: pop-in 0.3s ease;
}

.popup-content h2 {
  margin-top: 0;
  font-size: 20px;
  color: #333;
}
.popup-content p {
  font-size: 16px;
  margin: 15px 0;
  color: #666;
}

.popup-buttons {
  display: flex;
  justify-content: space-around;
}

.popup-buttons button {
  padding: 8px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

#btn-ok {
  background: #4caf50;
  color: #fff;
}
#btn-ok:hover {
  background: #45a049;
}

#btn-cancel {
  background: #f44336;
  color: #fff;
}
#btn-cancel:hover {
  background: #da190b;
}

@keyframes pop-in {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}