/* 重置默认样式 */
.side-button {
  position: fixed;
  right: 0;
  top: 40%;
  transform: translateY(-40%);
  cursor: pointer;
  z-index: 5;
}

.side-button img {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 25px;
}

.hidden {
  display: none !important;
}

/* 弹层样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  height: 600px;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  animation: slideIn 0.3s ease;
  background-color: #f7e6f2;
}

.close-btn {
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.close-btn:hover {
  color: #333;
}

.game-header {
    width: 100%;
    text-align: center;
    margin: 5px 0px 15px 0px;
}

.kaitext {
    font-weight: 700;
    color: #b44c8d;
}
.period {
    font-weight: 700;
    color: #cd665d;
}


.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.scratch-container {
  position: relative;
  width: 300px;
  height: 150px;
  background: #fff;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid #ccc;
  z-index: 2;
}

.prize-text {
  text-align: center;
  width: 260px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #ff0000;
  z-index: 1;
  pointer-events: none;
}

#resetBtn, #closeModal {
  width: 100%;
  padding: 10px 20px;
  background-color: #c8ce5f;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

#closeModal {
    background-color: #cd635a;;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.kainum {
  display: inline-block;
  width: 44px;
  height: 44px;
  text-align: center;
  /*垂直居中*/
  line-height: 44px;
  border-radius: 22px;
  background-color: #cd665d;
  color: #fff;
}
