/* Base styles and reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f5f5f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: background-color 0.3s ease;
}

/* Typography */
h1 {
  color: #333;
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
  color: #555;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  padding: 0.75rem 1.5rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

h2 b {
  color: #d95980;
  font-weight: 700;
}

/* Game container */
.box-container {
  background-color: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  width: 100%;
}

.first_line, .second_line {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

/* Button styling */
.btnbox {
  height: 180px;
  width: 180px;
  border-radius: 24px;
  border: none;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.btnbox:hover {
  transform: translateY(-5px);
  box-shadow: 0 13px 0 rgba(0, 0, 0, 0.2);
}

.btnbox:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

/* Button colors with improved palette */
.red {
  background-color: #ff5252;
}

.yellow {
  background-color: #ffca28;
}

.green {
  background-color: #4caf50;
}

.purple {
  background-color: #7c4dff;
}

/* Button effects */
.flash {
  background-color: white !important;
  box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.7);
}

.userflash {
  background-color: #00c853 !important;
  box-shadow: 0 0 20px 10px rgba(0, 200, 83, 0.4);
}

/* Button inner glow effect */
.btnbox::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  pointer-events: none;
}

/* Game over state */
body.game-over {
  background-color: #ff5252;
}

/* Responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }
  
  .box-container {
    padding: 1.5rem;
  }
  
  .btnbox {
    height: 140px;
    width: 140px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .box-container {
    padding: 1rem;
  }
  
  .first_line, .second_line {
    gap: 0.8rem;
  }
  
  .btnbox {
    height: 100px;
    width: 100px;
    border-radius: 16px;
  }
}

/* Add a subtle animation for level change */
@keyframes levelUp {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.level-up {
  animation: levelUp 0.5s ease;
}

/* Add Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');
