/* ========== BASE STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", cursive, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
  background: white;
  border-radius: 30px;
  padding: 40px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  color: #5a67d8;
  margin-bottom: 30px;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========== COLOR SELECTION AREA ========== */
.color-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.color-button {
  width: 120px;
  height: 120px;
  border: 5px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.2em;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.color-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.color-button.selected {
  border-color: #ffd700;
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.color-button.red {
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.color-button.yellow {
  background: linear-gradient(135deg, #ffd93d, #f9ca24);
}

.color-button.blue {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.key-hint {
  font-size: 0.8em;
  opacity: 0.9;
}

/* ========== SELECTED COLORS DISPLAY ========== */
.selected-colors {
  text-align: center;
  margin-bottom: 20px;
  min-height: 30px;
  font-size: 1.2em;
  color: #4a5568;
  font-weight: 600;
}

/* ========== MIX BUTTON ========== */
.mix-button {
  display: block;
  margin: 0 auto 30px;
  padding: 15px 50px;
  font-size: 1.5em;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mix-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mix-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== RESULT AREA ========== */
.result-area {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ========== MIXING ANIMATION ========== */
.mixing-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.mixing-blob {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.7;
  animation: swirl 2s ease-in-out infinite;
}

.blob1 {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.blob2 {
  top: 0;
  right: 0;
  animation-delay: 0.3s;
}

.blob3 {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 0.6s;
}

@keyframes swirl {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.3) rotate(180deg);
  }
}

.mixing-text {
  margin-top: 220px;
  font-size: 1.8em;
  color: #5a67d8;
  font-weight: bold;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ========== EGG AND ANIMAL DISPLAY ========== */
.reveal-container {
  text-align: center;
}

.reveal-image {
  max-width: 300px;
  height: auto;
  animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal-title {
  font-size: 2em;
  color: #5a67d8;
  margin-top: 20px;
  font-weight: bold;
}

.reveal-subtitle {
  font-size: 1.3em;
  color: #718096;
  margin-top: 10px;
}

/* ========== RESET BUTTON ========== */
.reset-button {
  display: block;
  margin: 20px auto 0;
  padding: 10px 30px;
  font-size: 1.2em;
  color: white;
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-weight: bold;
}

.reset-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ========== HIDDEN STATE ========== */
.hidden {
  display: none !important;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 600px) {
  .game-container {
    padding: 20px;
  }

  h1 {
    font-size: 1.8em;
  }

  .color-button {
    width: 90px;
    height: 90px;
    font-size: 1em;
  }

  .mix-button {
    font-size: 1.2em;
    padding: 12px 40px;
  }

  .reveal-image {
    max-width: 250px;
  }
}
