:root {
    --main-dark: #212529;
    --card-slot: #15181b;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', cursive;
  background-color: var(--main-dark);
  overflow: hidden;
}

/* Ensure Pixel Art Remains Crisp */
img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#game-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

#greenhouse-viewport {
  flex: 2;
  padding: 20px;
  overflow-y: auto; /* Scroll down if player unlocks dozens of slots */
}

/* Auto-fitting Grid Layout */
#cactus-holder {
  display: grid;
  /* Automatically wraps items and forces minimum tile sizes */
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  width: 100%;
}

/* Individual Card Item */
.cactus-object {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 4px solid #3c434c;
  border-radius: 8px;
  padding: 10px;
  aspect-ratio: 1 / 1.2; /* Maintains proportions */
  position: relative;
}

/* Responsive Image Scaling inside the Grid Slot */
.cactus-img {
  width: 100%;
  height: 70%;
  object-fit: contain; /* Prevents squishing/stretching */
  filter: drop-shadow(3px 0 0 #3c434c) 
          drop-shadow(-3px 0 0 #3c434c) 
          drop-shadow(0 3px 0 #3c434c) 
          drop-shadow(0 -3px 0 #3c434c);
}

#ui-sidebar {
  flex: 1;
  padding: 15px;
  background-color: #1a1d20;
  overflow-y: auto;
  border-left: 4px solid #000;
}

.nes-badge {
  transform: scale(0.7);
}