body {
  background: #578a34;
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

.container {
  display: flex;
  height: 70vh;
  width: 80vw;
  flex-wrap: wrap;
 
  background-color: #a2d149;
  background-image: conic-gradient(
    #aad751 25%,
    #a2d149 0 50%,
    #aad751 0 75%,
    #a2d149 0
  );
  background-size: 60px 60px;
  border: 10px solid #4a752c;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
}



@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, 2px); }
  30% { transform: translate(5px, -3px); }
  45% { transform: translate(-4px, -1px); }
  60% { transform: translate(3px, 2px); }
  75% { transform: translate(-2px, 1px); }
  90% { transform: translate(1px, 0); }
}

.shaking {
  animation: shake 0.45s ease-out;
}

.smoke {
  position: absolute;
  border-radius: 45% 55% 50% 48%;
  background: radial-gradient(circle at 40% 40%, rgba(115, 115, 115, 0.85) 0%, rgba(150, 150, 150, 0) 72%);
  pointer-events: none;
  opacity: 0;
  animation: puff ease-out both;
  z-index: 6;
}

@keyframes puff {
  0%   { transform: translate(0, 0) scale(0.3) rotate(0deg); opacity: 0.85; }
  55%  { opacity: 0.5; }
  100% { transform: translate(var(--dx), var(--dy)) scale(var(--grow)) rotate(var(--spin)); opacity: 0; }
}

.dizzy-star {
  position: absolute;
  font-size: 15px;
  pointer-events: none;
  animation: dizzy 1.2s ease-in-out both;
  z-index: 7;
}

@keyframes dizzy {
  0%   { transform: translate(0, 0) rotate(0deg) scale(0.4); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(var(--dx), -26px) rotate(300deg) scale(1.1); opacity: 0; }
}

.scoreboard {
  position: fixed;
  top: 18px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(95deg, #6b4a2f 0 7px, #61432a 7px 13px, #684730 13px 22px);
  border: 3px solid #3a2818;
  border-radius: 4px;
  padding: 9px 16px 13px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: rotate(-0.6deg);
  z-index: 10;
}


.scoreboard::before,
.scoreboard::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9b8a0, #6e5a41 60%, #40311f);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

.scoreboard::before { top: 4px; left: 5px; }
.scoreboard::after { top: 4px; right: 5px; }

.board-label {
  color: #efe6d0;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  opacity: 0.85;
  transform: rotate(0.5deg);
}

.score {
  display: flex;
  gap: 4px;
}

.digit {
  position: relative;
  width: 27px;
  height: 40px;
  background: linear-gradient(180deg, #3d3d3b 0%, #34342f 49%, #262622 51%, #2c2c28 100%);
  color: #f2efe4;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 30px;
  font-weight: bold;
  line-height: 40px;
  text-align: center;
  border-radius: 3px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.7), 0 2px 3px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}


.digit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}


.digit:nth-child(odd) { transform: rotate(0.9deg); }
.digit:nth-child(even) { transform: rotate(-0.7deg); }

@keyframes flipTick {
  0%   { transform: rotateX(0deg); }
  45%  { transform: rotateX(-88deg); }
  100% { transform: rotateX(0deg); }
}

.digit.tick {
  animation: flipTick 0.28s ease-in;
}

.gameOver {
  width: 300px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(95deg, #6b4a2f 0 7px, #61432a 7px 13px, #684730 13px 22px);
  border: 4px solid #3a2818;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-0.4deg);
  display: none;
  place-items: center;
  padding: 18px 20px 24px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
  color: #efe6d0;
  z-index: 100;
}

.gameOver .ft {
  color: #efe6d0;
  font-size: 1.45rem;
  font-weight: bold;
  letter-spacing: 7px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  margin: 4px 0 12px;
  border-bottom: 2px dashed rgba(58, 40, 24, 0.8);
  padding-bottom: 12px;
  width: 100%;
  transform: rotate(0.5deg);
}

.gameOver .final-score {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 0 0 10px;
}

.gameOver .commentary {
  color: #d8ccb2;
  font-size: 0.88rem;
  font-style: italic;
  margin: 0 0 16px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.gameOver button {
  padding: 10px 26px;
  background: linear-gradient(180deg, #efe6d0, #d8ccb2);
  color: #4a3320;
  font-size: 0.95rem;
  letter-spacing: 1px;
  border-radius: 4px;
  border: 2px solid #3a2818;
  border-bottom-width: 4px;
  cursor: pointer;
  font-weight: bold;
  transform: rotate(-0.5deg);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
}

.gameOver button:hover {
  background: linear-gradient(180deg, #fbf4e3, #e8dcc2);
}

.gameOver button:active {
  transform: rotate(-0.5deg) translateY(2px);
  border-bottom-width: 2px;
}

.box{
  min-height: 30px;
  min-width: 30px;
  background: transparent;
  box-sizing: border-box;
  background-size: cover !important;
  background-repeat: no-repeat;
  transform-origin: 50% 50%;
}