body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-1vmin);
  }
  60% {
    transform: translateY(-0.5vmin);
  }
}

/* Token Display Bar */
.token-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3vmin;
  margin-top: 2vmin;
  padding: 1.5vmin 3vmin;
  border-radius: 2vmin;
  box-shadow: 0 0.5vmin 1.5vmin rgba(0, 0, 0, 0.1);
  max-width: 55vmin;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 5;
}

.token-info {
  display: flex;
  align-items: center;
  gap: 1vmin;
}

.token-label {
  font-size: 2.2vmin;
  font-weight: 500;
}

.token-value {
  font-size: 2.8vmin;
  font-weight: bold;
}

.token-divider {
  font-size: 3vmin;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Token update animation */
@keyframes token-update {
  0% {
    transform: scale(1);
    color: inherit;
  }
  25% {
    transform: scale(1.2);
    color: #4caf50;
    text-shadow: 0 0 1vmin rgba(76, 175, 80, 0.5);
  }
  50% {
    transform: scale(1.1);
    color: #4caf50;
    text-shadow: 0 0 1.5vmin rgba(76, 175, 80, 0.7);
  }
  100% {
    transform: scale(1);
    color: inherit;
    text-shadow: none;
  }
}

/* Mobile view - Token bar adjustments */
@media (375px < width < 768px) {
  .token-bar {
    max-width: 70vmin;
    padding: 3vmin 4vmin;
  }

  .token-bar .token-label {
    font-size: 3vmin;
  }

  .token-bar .token-value {
    font-size: 4vmin;
  }

  .token-bar .token-divider {
    font-size: 4vmin;
  }
}

.chest-container {
  display: flex;
  align-items: center;
  justify-content: center;
  /* min-height: 100vh; */
  position: relative;
}

/* Ensure token bar appears below chest grid on mobile */
@media (375px < width < 768px) {
  .chest-container {
    min-height: 70vh;
  }
}

.chest-grid {
  position: relative;
  display: grid;
  grid-template-columns: 20vmin 20vmin 20vmin;
  grid-template-rows: 20vmin 20vmin 20vmin;
  gap: 5vmin;
}

.chest {
  width: 20vmin;
  height: 20vmin;
}

.chest:hover {
  animation: wiggle 0.4s ease-in-out infinite;
}

.chest-top {
  grid-column: 2;
  grid-row: 1;
}

.chest-left {
  grid-column: 1;
  grid-row: 2;
}

.chest-center {
  grid-column: 2;
  grid-row: 2;
}

.chest-right {
  grid-column: 3;
  grid-row: 2;
}

.chest-bottom {
  grid-column: 2;
  grid-row: 3;
}

.chest-top-left {
  grid-column: 1;
  grid-row: 1;
}

.chest-top-right {
  grid-column: 3;
  grid-row: 1;
}

.chest-bottom-left {
  grid-column: 1;
  grid-row: 3;
}

.chest-bottom-right {
  grid-column: 3;
  grid-row: 3;
}

/* Mobile view */
@media (375px < width < 768px) {
  .chest-grid {
    grid-template-columns: 28vmin 28vmin 28vmin;
    grid-template-rows: 28vmin 28vmin 28vmin;
  }

  .chest {
    width: 28vmin;
    height: 28vmin;
  }
}
