body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  background-color: #f0f4f8;
  color: #333;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-align: center;
}

#score-display {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #e74c3c;
}

#difficulty-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap; /* Wrap buttons on small screens */
  justify-content: center;
}

.difficulty-btn {
  cursor: pointer;
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border-radius: 8px;
  transition: background-color 0.2s, transform 0.2s;
  user-select: none;
  font-size: 1rem;
}

.difficulty-btn:hover {
  background-color: #2980b9;
  transform: scale(1.1);
}

#game-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 500px;
}

.color-box {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.color-box:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 500px) {
  h1 {
    font-size: 2rem;
  }

  #score-display {
    font-size: 1.2rem;
  }

  .difficulty-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  #game-container {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
  }

  .color-box {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 350px) {
  h1 {
    font-size: 1.5rem;
  }

  #score-display {
    font-size: 1rem;
  }

  .difficulty-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  #game-container {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
  }

  .color-box {
    width: 50px;
    height: 50px;
  }
}
