body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    background-color: #fef4e8;
    padding: 20px;
    position: relative;
  }
  
  .apple-area {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    width: 300px; /* Adjusted for 5 columns + gap */
    height: 240px; /* Adjusted for 4 rows + gap */
    margin: 5px auto;
    padding: 10px;
    border: 2px dashed #ccc;
    background-color: #fff;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
  }
  
  .apple {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.3s ease-in-out;
  }
  
  @keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
  }
  
  /* bounce animation for all apples */
  @keyframes bounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
    60% { transform: translateY(0); }
    100% { transform: translateY(0); }
  }
  
  .controls {
    margin-top: 5px;
  }
  
  button {
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: green;
    margin: 5px;
    color: rgb(212, 161, 161);
    cursor: pointer;
  }
  
  button.add {
    background-color: #c9f8d4;
    color: #007bff;
  }
  
  button.remove {
    background-color: #f7c8cd;
    color: #5a2d0c;
  }
  
  button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
  }
  
  #overlayCount {
    font-size: 45px;
    font-weight: bold;
    color: #5a2d0c;
    margin: 5px auto;
    text-align: center;
    border: 3px solid #5a2d0c;       /* Brown border */
    padding: 5px 10px;              /* Space inside the box */
    border-radius: 12px;             /* Rounded corners */
    background-color: #fbf9f5;       /* Light background */
    width: fit-content;              /* Shrink to content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  /* Subtle shadow */
  }
  
  
    /* Rich Back to Home Button */
.back-button {
  display: inline-block;
  margin-top: 90px;
  margin-bottom: 20px;
  padding: 15px 30px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.back-button:hover {
  background: linear-gradient(135deg, #45a049, #4CAF50);
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button.toggle {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

button.toggle:hover {
  background-color: #0056b3;
}

