body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden; /* Prevents scrollbars from gradient animation */
  background: linear-gradient(
    135deg,
    #1a2a6c,
    #b21f1f,
    #fdbb2d,
    #20bf55,
    #8e44ad
  ); /* Added more colors to gradient */
  background-size: 600% 600%; /* Increased size for smoother transition with more colors */
  animation: gradientBG 35s ease infinite; /* Slightly longer animation */
  text-align: center;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.game-container {
  background-color: rgba(
    0,
    0,
    0,
    0.65
  ); /* Slightly more opaque for better readability */
  padding: 30px 40px;
  border-radius: 20px; /* Softer radius */
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 650px; /* Slightly wider for controls */
}

.game-header h1 {
  margin-top: 0;
  font-size: 2.8em; /* A bit larger */
  color: #ffda33; /* Bright yellow accent */
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.7);
}

.game-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  font-size: 1.3em; /* Larger score/level text */
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 20px; /* Space between buttons */
  margin-bottom: 25px;
}

#start-button,
#mute-button {
  background-color: #ffda33;
  color: #333;
  border: none;
  padding: 12px 25px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#start-button:hover,
#mute-button:hover {
  background-color: #ffe066; /* Lighter yellow */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

#start-button:active,
#mute-button:active {
  transform: translateY(1px);
}

#mute-button.muted {
  background-color: #aaa; /* Grey out when muted */
  color: #555;
}

.palette {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px; /* Slightly increased gap */
  margin-bottom: 30px; /* More space below palette */
  perspective: 1000px;
}

.color-swatch {
  width: 85px; /* Slightly larger swatches */
  height: 85px;
  border-radius: 20px; /* Softer radius for swatches */
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.15); /* Subtler border */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.color-swatch:hover {
  transform: scale(1.1) rotateY(8deg); /* Slightly less rotation */
  box-shadow: 0 10px 28px rgba(230, 230, 230, 0.3);
}

.color-swatch.active,
.color-swatch.lit {
  transform: scale(1.18) !important; /* More pop */
  box-shadow: 0 0 30px 8px currentColor, 0 10px 30px rgba(255, 255, 255, 0.45);
  opacity: 1 !important;
  border-color: rgba(255, 255, 255, 0.8); /* Brighter border when active */
}

/* Special care for Yellow swatch's "lit" state if needed, but currentColor should work fine */
.color-swatch[data-color="#FFFF57"].lit {
  /* box-shadow: 0 0 30px 8px #E0C800, 0 10px 30px rgba(0,0,0,0.3); /* Example: darker glow for yellow */
}

.color-swatch.disabled {
  cursor: not-allowed;
  opacity: 0.6; /* More noticeable when disabled */
}

.message-area {
  font-size: 1.4em; /* Larger messages */
  font-weight: bold;
  min-height: 35px;
  margin-top: 20px;
  transition: color 0.3s ease, transform 0.2s ease;
}

.message-area.success {
  color: #57ff73; /* Using one of our palette greens */
  transform: scale(1.05);
}

.message-area.error {
  color: #ff5757; /* Using one of our palette reds */
  transform: scale(1.05);
}
