body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

#root {
    width: 100%;
    min-height: 100vh;
}

.App {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}


.budget-game {
  /* width: 100%; */
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #2E8B57 0%, #3CB371 100%);
  min-height: 100vh;
  color: white;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.15);
  padding: 15px 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
  gap: 10px;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.budget-display {
  display: flex;
  gap: 20px;
  font-size: 1.1em;
  font-weight: bold;
  flex-wrap: wrap;
}

.spent {
  color: #FFD700;
}

.budget {
  color: #98FB98;
}

.remaining {
  color: #F0E68C;
}

.timer {
  font-size: 1.3em;
  font-weight: bold;
  color: #FF6B6B;
  text-align: center;
}

.game-controls {
  display: flex;
  gap: 10px;
}

.start-btn, .reset-btn, .done-btn, .music-btn {
  background: linear-gradient(45deg, #32CD32, #228B22);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start-btn:hover, .reset-btn:hover, .done-btn:hover, .music-btn:hover {
  background: linear-gradient(45deg, #228B22, #006400);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.music-btn {
  padding: 12px 16px;
  font-size: 1.2em;
  min-width: 50px;
}

.pause-btn {
  background: linear-gradient(45deg, #FF6B35, #FF4500);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.pause-btn:hover {
  background: linear-gradient(45deg, #FF4500, #DC143C);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.pause-btn:active {
  transform: translateY(0) scale(1.02);
}

.resume-btn {
  background: linear-gradient(45deg, #00CED1, #008B8B);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 206, 209, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.resume-btn:hover {
  background: linear-gradient(45deg, #008B8B, #006666);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 206, 209, 0.4);
}

.resume-btn:active {
  transform: translateY(0) scale(1.02);
}

.game-area {
  min-height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  position: relative;
}

.welcome-screen {
  text-align: center;
  padding: 40px 20px;
}

.welcome-screen h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-screen p {
  font-size: 1.2em;
  margin-bottom: 15px;
  line-height: 1.6;
}

.welcome-screen ul {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1em;
  line-height: 1.6;
}

.welcome-screen li {
  margin-bottom: 8px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  padding: 20px 0;
  max-width: 900px;
  margin: 0 auto;
}

.item-card {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  border: 3px solid #CCC;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.item-icon {
  font-size: 3em;
  margin-bottom: 5px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.item-card.purchased {
  opacity: 0.6;
  transform: scale(0.95);
  cursor: not-allowed;
}

.item-card.purchased:hover {
  transform: scale(0.95);
}

.item-name {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.3;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.item-price {
  font-size: 1.4em;
  font-weight: bold;
  color: #2E8B57;
  margin-bottom: 8px;
}

.purchased-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(34, 139, 34, 0.9);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1em;
}

.game-over-screen {
  text-align: center;
  padding: 40px 20px;
}

.game-over-screen h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-over-screen.win h2 {
  color: #32CD32;
}

.game-over-screen.lose h2 {
  color: #FF6B6B;
}

.game-message {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.final-stats {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 400px;
}

.final-stats p {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.game-end-controls {
  margin: 20px 0;
}

.hint-btn {
  background: linear-gradient(45deg, #FF9800, #F57C00);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hint-btn:hover {
  background: linear-gradient(45deg, #F57C00, #E65100);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.hint-display {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin-top: 15px;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hint-display h4 {
  color: #FFD700;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.hint-display ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 15px;
}

.hint-display li {
  margin-bottom: 5px;
  font-size: 1em;
}

.how-to-play {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.how-to-play h3 {
  color: #FFD700;
  margin-bottom: 15px;
  font-size: 1.3em;
  text-align: center;
}

.how-to-play ul {
  list-style: disc;
  padding-left: 20px;
}

.how-to-play li {
  margin-bottom: 8px;
  font-size: 1.1em;
  line-height: 1.5;
}

.game-instructions {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  margin-top: 20px;
}

.game-instructions h3 {
  color: #FFD700;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.game-instructions ul {
  list-style: none;
  padding: 0;
}

.game-instructions li {
  margin-bottom: 8px;
  font-size: 1.1em;
  line-height: 1.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .budget-game {
    padding: 15px;
  }
  
  .game-header {
    flex-direction: column;
    text-align: center;
  }
  
  .budget-display {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .items-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px 0;
  }
  
  .item-card {
    padding: 15px;
  }
  
  .welcome-screen h2 {
    font-size: 2em;
  }
  
  .welcome-screen p {
    font-size: 1.1em;
  }
  
  .game-over-screen h2 {
    font-size: 2em;
  }
  
  .game-message {
    font-size: 1.3em;
  }
}

@media (max-width: 480px) {
  .budget-display {
    font-size: 1em;
  }
  
  .timer {
    font-size: 1.2em;
  }
  
  .item-icon {
    font-size: 2.5em;
  }
  
  .item-name {
    font-size: 1em;
    min-height: 3em;
  }
  
  .item-price {
    font-size: 1.2em;
  }
  
  .welcome-screen h2 {
    font-size: 1.8em;
  }
  
  .game-over-screen h2 {
    font-size: 1.8em;
  }
}

/* Animation for item purchase */
@keyframes purchase {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(0.95);
  }
}

.item-card.purchased {
  animation: purchase 0.3s ease-out;
}

/* Timer warning animation */
@keyframes timer-warning {
  0%, 100% {
    color: #FF6B6B;
  }
  50% {
    color: #FF0000;
    transform: scale(1.1);
  }
}

.timer.warning {
  animation: timer-warning 1s infinite;
}

/* Pause Popup Styles */
.pause-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.pause-popup {
  background: linear-gradient(135deg, #2E8B57 0%, #3CB371 100%);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: popup-appear 0.3s ease-out;
}

@keyframes popup-appear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pause-popup-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 25px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pause-popup-header h2 {
  margin: 0;
  color: white;
  font-size: 1.5em;
  font-weight: bold;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.pause-popup-content {
  padding: 25px;
  color: white;
}

.pause-popup-content p {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.9);
}

.pause-stats {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.8);
}

.stat-value {
  font-weight: bold;
  color: #FFD700;
  font-size: 1.1em;
}

.pause-popup-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.resume-btn-popup {
  background: linear-gradient(45deg, #00CED1, #008B8B);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 206, 209, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.resume-btn-popup:hover {
  background: linear-gradient(45deg, #008B8B, #006666);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 206, 209, 0.4);
}

/* Responsive design for pause popup */
@media (max-width: 600px) {
  .pause-popup {
    width: 95%;
    margin: 10px;
  }
  
  .pause-popup-header {
    padding: 15px 20px;
  }
  
  .pause-popup-content {
    padding: 20px;
  }
  
  .pause-popup-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .resume-btn-popup {
    width: 100%;
    max-width: 200px;
  }
}

/* Game Over Buttons Styling */
.game-over-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.menu-btn {
  background: linear-gradient(45deg, #32CD32, #228B22);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  min-width: 140px;
}

.menu-btn:hover {
  background: linear-gradient(45deg, #228B22, #006400);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Make sure both game over buttons have consistent styling */
.game-over-buttons .start-btn,
.game-over-buttons .menu-btn {
  min-width: 140px;
  margin: 5px;
}

/* Responsive design for game over buttons */
@media (max-width: 480px) {
  .game-over-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .game-over-buttons .start-btn,
  .game-over-buttons .menu-btn {
    width: 100%;
    max-width: 200px;
  }
}
