* {
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #ffe29f 0%, #ffa99f 25%, #f6d365 50%, #fda085 75%, #ffe29f 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  position: relative;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 24px 20px 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.levels {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.lvl-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #eadfce;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.lvl-btn.active {
  background: #fff2d6;
  border-color: #d98324;
  color: #8a4b06;
  font-weight: 700;
}

.stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  flex: 1;
  background: #fff6e6;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.stat .label {
  font-size: 13px;
  color: #8a6d3b;
}

.stat .value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 2px;
  color: #4a3418;
}

.question-box {
  background: #fffaf0;
  border: 1px solid #eadfce;
  border-radius: 14px;
  padding: 20px 16px 24px;
  text-align: center;
  margin-bottom: 20px;
}

#prompt {
  font-size: 17px;
  font-weight: 700;
  color: #6a4b1b;
  margin-bottom: 16px;
}

.board {
  display: grid;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.tile {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px solid #d9b98a;
  background: linear-gradient(160deg, #e8c78a, #c99b52);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.tile:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.04);
}

.tile:disabled {
  cursor: default;
}

.tile-treasure {
  background: linear-gradient(160deg, #ffe27a, #ffb703);
  border-color: #e08e00;
  animation: pop 0.35s ease;
}

.tile-trap {
  background: linear-gradient(160deg, #ff9d9d, #e05656);
  border-color: #b23a3a;
}

.tile-empty {
  background: #f1e4c9;
  border-color: #d9c9a3;
  opacity: 0.85;
}

@keyframes pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

#feedback {
  min-height: 22px;
  font-size: 15px;
  margin-top: 16px;
  color: #6a4b1b;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.check-btn {
  background: #d98324;
  color: #fff;
}

.check-btn:hover {
  background: #b96c15;
}
