body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: radial-gradient(circle at top, #ffe4b5, #deb887);
  font-family: "Poppins", sans-serif;
  margin: 0;
}

.container {
  text-align: center;
  background: #f8f1e7;
  padding: 25px 35px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 6px solid #8b5a2b;
}

h1 {
  margin-bottom: 20px;
  color: #5a381e;
  text-shadow: 1px 1px 3px #c19a6b;
  font-family: "Georgia", serif;
}

#game {
  width: 420px;
  height: 420px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  margin: 20px auto;
  background: #cdaa7d;
  padding: 8px;
  border-radius: 15px;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.4);
}

.tile {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background-size: 420px 420px; /* For image mode */
}

.tile:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.empty {
  background: transparent !important;
  box-shadow: none;
  cursor: default;
}

/* Wooden style number tiles */
.numberTile {
  background: url("https://i.imgur.com/5YMRhYt.jpg"); /* wood texture */
  background-size: cover;
  color: #fff8dc;
  text-shadow: 2px 2px 3px #000;
  border: 2px solid #4b2e14;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3),
              inset 0 -2px 6px rgba(0,0,0,0.4);
}

/* Controls */
.controls {
  margin: 12px 0;
}

/* Fancy Buttons */
button {
  background: linear-gradient(145deg, #d4a373, #8b5a2b);
  border: none;
  padding: 12px 22px;
  margin: 0 8px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: #fff8dc;
  text-shadow: 1px 1px 2px #000;
  transition: transform 0.2s ease, background 0.3s;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

button:hover {
  background: linear-gradient(145deg, #8b5a2b, #d4a373);
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0,0,0,0.4);
}

#moves {
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  color: #5a381e;
}

#status {
  font-size: 22px;
  font-weight: bold;
  margin-top: 8px;
  color: green;
  text-shadow: 1px 1px 2px #c19a6b;
}

/* Preloaded image thumbnails */
#preloadedImages {
  margin-top: 12px;
}

.preImg {
  width: 65px;
  height: 65px;
  object-fit: cover;
  margin: 5px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s ease, border 0.3s;
}

.preImg:hover {
  border: 3px solid #8b5a2b;
  transform: scale(1.1);
}

