/* 消除边距 */
* {
  margin: 0;
  padding: 0;
}
body,
hr,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
blockquote,
p {
  padding: 0;
  margin: 0;
}
/*列表样式消除*/
ol,
ul,
li {
  list-style: none;
}
ul::-webkit-scrollbar {
  width: 0 !important;
}
/* a标签样式重置 */
a {
  text-decoration: none;
}
/*盒模型默认使用内边框*/
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
/* Hides from IE-mac */
* html .clearfix {
  height: 1%;
}
/* End hide from IE-mac */
* + html .clearfix {
  min-height: 1%;
}
/*合并表格边框*/
table,
td,
tr,
th {
  border-collapse: collapse;
}
/*img在盒子中有下边距*/
img {
  /*IE7*/
  border: none;
  vertical-align: middle;
  object-fit: cover;
}
/*全局设置*/
body {
  font-family: "Poppins", "HelveticaNeueLTStd", "sans-serif";
}
/* 响应式布局 */
.gameWrap {
  width: 100%;
  max-width: 500px;
  margin: auto;
  font-family: Arial, sans-serif;
}
.gameWrap .top {
  position: relative;
}
.gameWrap .top #title {
  margin: 10px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333333;
  text-align: center;
}
.gameWrap .top #refresh {
  display: none;
  position: absolute;
  top: 0;
  right: 20%;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.gameWrap .container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.gameWrap .container #mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
}
.gameWrap .container .tips {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  z-index: 2;
  /* 显示弹窗时的状态 */
}
.gameWrap .container .tips #status {
  display: none;
  color: #666666;
  font-size: 18px;
  line-height: 150%;
  margin-bottom: 20px;
  text-align: center;
}
.gameWrap .container .tips #startGame,
.gameWrap .container .tips #tryAgain,
.gameWrap .container .tips #nextLevel {
  width: 160px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
  color: white;
  background: #4CAF50;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.gameWrap .container .tips #startGame:hover,
.gameWrap .container .tips #tryAgain:hover,
.gameWrap .container .tips #nextLevel:hover {
  background: #45a049;
}
.gameWrap .container .tips #tryAgain {
  display: none;
  background: #F5B60D;
}
.gameWrap .container .tips #tryAgain:hover {
  background: #eda508;
}
.gameWrap .container .tips #nextLevel {
  display: none;
  background: #4CAF50;
}
.gameWrap .container .tips #nextLevel:hover {
  background: #45a049;
}
.gameWrap .container .tips .popup {
  width: 60%;
  position: fixed;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #FFFFFF;
  color: #666666;
  padding: 20px;
  border-radius: 5px;
  opacity: 0;
  /* 初始时隐藏 */
  visibility: hidden;
  /* 初始时隐藏 */
  transition: visibility 1s ease-out;
  /* 过渡效果 */
}
.gameWrap .container .tips .popup .text {
  color: #666666;
  font-size: 16px;
  line-height: 150%;
  text-align: center;
}
.gameWrap .container .tips .popup.show {
  opacity: 1;
  visibility: visible;
}
.gameWrap .container .grid {
  width: 60%;
  display: grid;
  gap: 5px;
  background: #eee;
  padding: 10px;
  border-radius: 5px;
}
.gameWrap .container .grid .cell {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #F5B60D;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 150%;
  user-select: none;
  transition: background-color 0.2s;
}
.gameWrap .container .grid .cell .cellImg {
  width: calc(100% - 10px);
  height: auto;
  aspect-ratio: 1 / 1;
  pointer-events: none;
}
.gameWrap .container .grid .fixedCell {
  background: #f93a30;
  color: white;
}
.gameWrap .container .grid .selected {
  background: #4CAF50;
  color: white;
}
