body {
  font-family: sans-serif;
  margin: 0;
  padding: 30px;
  display: flex;
  justify-content: center;
  background-color: #121212;
  color: #f0f0f0;
}

#main-menu {
  text-align: center;
  padding: 20px;
}

.game-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* Two equal columns */
  gap: 15px;
  max-width: 600px; /* Increased to accommodate two columns */
  margin: 0 auto;
}

.game-buttons button {
  padding: 15px;
  font-size: 1.2rem;
  width: 100%; /* Make buttons fill their grid cells */
  box-sizing: border-box; /* Include padding in width calculation */
}

.back-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 15px;
}

.back-button:hover {
  color: #ffee58;
}

#casino-container {
  padding: 20px;
  border-radius: 10px;
  width: 800px;
  max-width: 90vw;
  background-color: #1e1e1e;
  margin: 0 auto;
}

.game-tab {
  display: none;
}

.game-tab.active {
  display: block;
}

/* Shared Elements */
#xp-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background-color: #333;
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0;
}

#xp-fill {
  height: 100%;
  background-color: #4caf50;
  width: 0%;
  transition: width 0.3s ease;
}

#xp-text {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  text-align: center;
  line-height: 20px;
  color: white;
  font-size: 14px;
  pointer-events: none;
}

#free-reward {
  margin: 10px 0;
  text-align: center;
}

input[type="number"] {
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 4px 8px;
}

button {
  background-color: #444;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
  padding: 5px 10px;
  margin-left: 8px;
  cursor: pointer;
}

button:hover {
  background-color: #555;
}

#claimRewardBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.game-header {
  display: flex;
  align-items: left;
  justify-content: left;
  gap: 10px;
}

.info-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: help;
  padding: 0;
  margin: 0;
  line-height: 1;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #1e1e1e;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #444;
  width: 80%;
  max-width: 600px;
  border-radius: 5px;
  position: relative;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: white;
}

/* Animations */
@keyframes balancePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.balance-update {
  animation: balancePulse 0.5s ease-in-out;
  color: #4CAF50 !important;
}

@media (max-width: 600px) {
  #casino-container {
    width: 95vw;
    padding: 10px;
  }
  .game-buttons {
    grid-template-columns: 1fr; /* Single column on small screens */
    max-width: 300px;
  }
}