/* style.css */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background-image: url('images/background_w.JPG');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

#pageBackground {
  background-image: url('images/background_w.JPG'); /* 🌊 水波背景 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 
#puzzleWrapper {
  background-image: url('images/extend_frame.png'); 
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  width: clamp(340px, 57vmin, 1000px); 
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#puzzle {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  background-color: rgba(0, 0, 0, 0.556);
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
} */

#puzzleWrapper {
  position: relative;
  width: clamp(300px, 50vw, 750px); /* 手机略小，电脑舒适 */
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#puzzleWrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('images/extend_frame.png');  /* 蝴蝶图 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

#puzzle {
  position: relative;
  z-index: 1;
  width: 57%;
  height: 57%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  background-color: rgba(0, 0, 0, 0.471);
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
}


@media (max-width: 800px) {
  #puzzleWrapper {
    width: 200vw;
  }

  #puzzle {
    width: 60%;
    height: 60%;
  }
}



#winText {
  text-align: left;
  line-height: 1.6;
  font-size: 15px;
  margin-top: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.win-modal-content {
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 20px 30px;
  animation: fadeIn 0.3s ease-out;
  margin: auto;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.tile {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s;
}
.tile:hover {
  transform: scale(1.03);
}
.empty {
  background-color: white;
}

@keyframes shrinkIntoTile {
  0% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#finalPiece {
  animation: shrinkIntoTile 0.5s ease forwards;
  transform-origin: center center;
  position: fixed; 
}

#footerNotice {
  position: fixed;
  bottom: 5px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7); /* 白色半透明 */
  background-color: rgba(0, 0, 0, 0.3); /* 可选：浅黑底 */
  padding: 4px 0;
  z-index: 999;
  pointer-events: none; /* 不阻挡操作 */
}
