* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.App {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: white;
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.header h1 {
  font-size: 2.5em;
  color: #ff6b6b;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  animation: rainbow 5s infinite;
}

@keyframes rainbow {
  0% { color: #ff6b6b; }
  25% { color: #ffa500; }
  50% { color: #4caf50; }
  75% { color: #2196f3; }
  100% { color: #ff6b6b; }
}

.subtitle {
  font-size: 1.2em;
  color: #666;
  margin-bottom: 15px;
}

.progress {
  background: #f0f0f0;
  padding: 10px 20px;
  border-radius: 25px;
  display: inline-block;
  font-weight: bold;
  color: #764ba2;
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.stage-container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-height: 500px;
}

.captcha-box {
  text-align: center;
}

.captcha-box h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.8em;
}

.hint {
  color: #999;
  font-size: 0.9em;
  margin: 10px 0;
}

.warning-text {
  color: #ff6b6b;
  font-weight: bold;
  font-size: 1.1em;
  margin: 10px 0;
}

.hint-text {
  color: #4caf50;
  font-weight: bold;
  font-size: 1.1em;
  margin: 15px 0;
  padding: 10px;
  background: #e8f5e9;
  border-radius: 8px;
}

.phase-indicator {
  font-size: 1.2em;
  font-weight: bold;
  color: #667eea;
  margin: 15px 0;
}

.score-display {
  font-size: 1.3em;
  font-weight: bold;
  color: #4caf50;
  margin: 10px 0;
}

.encouragement {
  margin-top: 20px;
  font-style: italic;
  color: #666;
}

/* Traffic Lights */
.traffic-lights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.traffic-light {
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid #333;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.traffic-light.red {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.traffic-light.orange {
  background: linear-gradient(135deg, #ffaa00, #ff8800);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
}

.traffic-light.yellow {
  background: linear-gradient(135deg, #ffff00, #ffdd00);
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.traffic-light.selected {
  transform: scale(0.95);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.traffic-light .light-bulb {
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Triangles */
.triangles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.triangle-box {
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid #ddd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
}

.triangle-box.selected {
  border-color: #667eea;
  background: #e0e7ff;
  transform: scale(0.95);
}

.triangle {
  width: 0;
  height: 0;
  border-style: solid;
  transition: all 0.3s;
}

.triangle.blue {
  filter: hue-rotate(0deg);
}

.triangle.red {
  filter: hue-rotate(180deg);
}

.triangle.direction-sw {
  border-width: 60px 30px 0 30px;
  border-color: #3b82f6 transparent transparent transparent;
  transform: rotate(225deg);
}

.triangle.direction-ne {
  border-width: 60px 30px 0 30px;
  border-color: #3b82f6 transparent transparent transparent;
  transform: rotate(45deg);
}

.triangle.direction-se {
  border-width: 60px 30px 0 30px;
  border-color: #3b82f6 transparent transparent transparent;
  transform: rotate(135deg);
}

.triangle.direction-nw {
  border-width: 60px 30px 0 30px;
  border-color: #3b82f6 transparent transparent transparent;
  transform: rotate(315deg);
}

/* Emojis */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 30px auto;
}

.emoji-box {
  font-size: 4em;
  padding: 20px;
  border: 3px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
}

.emoji-box:hover {
  transform: scale(1.05);
}

.emoji-box.selected {
  border-color: #667eea;
  background: #e0e7ff;
  transform: scale(0.9);
}

/* Fish Grid */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.fish-box {
  font-size: 4em;
  padding: 30px;
  border: 3px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  background: #f0f8ff;
}

.fish-box:hover {
  transform: scale(1.1) rotate(5deg);
}

.fish-box.correct {
  border-color: #4caf50;
  background: #c8e6c9;
  animation: bounce 0.5s;
}

.fish-box.wrong {
  border-color: #f44336;
  background: #ffcdd2;
  animation: shake 0.5s;
}

/* Veggies */
.veggie-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  max-width: 600px;
  margin: 30px auto;
}

.veggie-box {
  font-size: 3em;
  padding: 20px;
  border: 3px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
}

.veggie-box:hover {
  transform: scale(1.05);
}

.veggie-box.selected {
  border-color: #667eea;
  background: #e0e7ff;
  transform: scale(0.9);
}

/* Objects */
.object-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.object-box {
  font-size: 4em;
  padding: 30px;
  border: 3px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
}

.object-box:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.object-box.selected {
  border-color: #667eea;
  background: #e0e7ff;
  animation: wiggle 0.5s;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* Moving Checkbox */
.moving-checkbox-container {
  position: relative;
}

.moving-area {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 3px dashed #ccc;
  border-radius: 15px;
  margin: 30px 0;
  overflow: hidden;
}

.moving-checkbox {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.05s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.moving-checkbox:hover {
  background: #ffe0e0;
  transform: scale(1.05);
}

.moving-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.moving-checkbox label {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-weight: bold;
}

/* Existential */
.existential-text {
  font-size: 1.3em;
  color: #666;
  margin: 30px 0;
  font-style: italic;
}

.checkbox-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 15px;
  margin: 30px auto;
  max-width: 400px;
  border: 2px solid #ddd;
}

.checkbox-large input[type="checkbox"] {
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.checkbox-large label {
  font-size: 1.3em;
  cursor: pointer;
  font-weight: bold;
}

/* Ordered Checkboxes */
.ordered-checkboxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 30px auto;
}

.checkbox-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: #f9f9f9;
  border: 2px solid #ddd;
  border-radius: 10px;
  transition: all 0.3s;
}

.checkbox-item input[type="checkbox"]:checked {
  accent-color: #667eea;
}

.checkbox-item input[type="checkbox"]:checked + label {
  color: #667eea;
  font-weight: bold;
}

.checkbox-item input[type="checkbox"] {
  width: 25px;
  height: 25px;
  cursor: pointer;
}

.checkbox-item label {
  font-size: 0.9em;
  text-align: center;
}

/* Flappy Game */
.flappy-game {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 500px;
  background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 100%);
  margin: 30px auto;
  border: 3px solid #333;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
}

.bird {
  position: absolute;
  left: 80px;
  font-size: 2em;
  transition: top 0.05s;
  z-index: 10;
  animation: flap 0.3s infinite;
}

@keyframes flap {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-10deg); }
}

.obstacle {
  position: absolute;
  width: 50px;
  background: linear-gradient(135deg, #228b22, #1a5c1a);
  border: 2px solid #1a5c1a;
}

.obstacle.top {
  top: 0;
}

.obstacle.bottom {
  bottom: 0;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  z-index: 100;
}

.game-over h3 {
  margin-bottom: 15px;
  font-size: 2em;
}

.game-over button {
  margin-top: 15px;
  padding: 10px 30px;
  font-size: 1em;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.game-over button:hover {
  background: #ff5252;
  transform: scale(1.05);
}

.game-start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px 40px;
  border-radius: 10px;
  font-size: 1.2em;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Circle Canvas */
.circle-canvas {
  border: 3px solid #333;
  border-radius: 15px;
  cursor: crosshair;
  background: white;
  margin: 30px auto;
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.circle-scores {
  margin-top: 20px;
}

.circle-scores p {
  margin: 5px 0;
  font-weight: bold;
}

/* Pixel Grid */
.pixel-grid {
  display: inline-block;
  border: 2px solid #333;
  margin: 30px auto;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pixel-row {
  display: flex;
  height: 10px;
}

.pixel {
  width: 10px;
  height: 10px;
  cursor: pointer;
  transition: all 0.1s;
  border: 0.5px solid transparent;
}

.pixel:hover {
  transform: scale(2);
  z-index: 10;
  position: relative;
  border: 1px solid #000;
}

/* Math Equation */
.math-equation {
  font-size: 2.5em;
  font-weight: bold;
  color: #333;
  margin: 40px 0;
  padding: 30px;
  background: #f0f0f0;
  border-radius: 15px;
  font-family: 'Courier New', monospace;
}

.math-input {
  width: 100%;
  max-width: 400px;
  padding: 15px;
  font-size: 1.2em;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
}

.math-input:focus {
  outline: none;
  border-color: #667eea;
}

/* Sound Button */
.sound-btn {
  padding: 20px 40px;
  font-size: 1.5em;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  margin: 30px 0;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sound-btn:hover:not(:disabled) {
  background: #5568d3;
  transform: scale(1.05);
}

.sound-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sound-input {
  width: 100%;
  max-width: 400px;
  padding: 15px;
  font-size: 1.2em;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
}

/* Timer */
.timer-display {
  font-size: 3em;
  font-weight: bold;
  color: #667eea;
  margin: 40px 0;
  font-family: 'Courier New', monospace;
}

/* Memory */
.question-text {
  font-size: 1.4em;
  color: #333;
  margin: 30px 0;
  font-weight: bold;
}

.memory-input {
  width: 100%;
  max-width: 400px;
  padding: 15px;
  font-size: 1.2em;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
}

/* Color Grid */
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.color-box {
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.color-box:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.color-box.selected {
  border-color: #333;
  border-width: 5px;
}

/* Backwards Input */
.phrase-display {
  font-size: 2em;
  font-weight: bold;
  color: #333;
  margin: 30px 0;
  padding: 20px;
  background: #f0f0f0;
  border-radius: 10px;
}

.backwards-input {
  width: 100%;
  max-width: 500px;
  padding: 15px;
  font-size: 1.3em;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
  direction: rtl;
}

.target-text {
  color: #999;
  font-size: 0.9em;
  margin-top: 10px;
}

/* Buttons */
.submit-btn,
.reset-btn {
  padding: 15px 40px;
  font-size: 1.2em;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  margin: 20px 10px 0;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover,
.reset-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.reset-btn {
  background: #ff6b6b;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.reset-btn:hover {
  background: #ff5252;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* Messages */
.error {
  color: #f44336;
  font-weight: bold;
  margin-top: 15px;
  font-size: 1.1em;
  animation: shake 0.5s;
}

.success {
  color: #4caf50;
  font-weight: bold;
  margin-top: 15px;
  font-size: 1.1em;
  animation: bounce 0.5s;
}

/* Recipe */
.recipe-container {
  max-width: 800px;
  margin: 50px auto;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.confetti {
  font-size: 3em;
  letter-spacing: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.recipe-container h1 {
  color: #ff6b6b;
  font-size: 3em;
  margin: 20px 0;
  animation: rainbow 5s infinite;
}

.recipe-container h2 {
  color: #667eea;
  font-size: 1.8em;
  margin-bottom: 30px;
}

.recipe-content {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.achievement {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  margin-bottom: 30px;
}

.achievement h3 {
  font-size: 2em;
  margin-bottom: 15px;
}

.achievement p {
  font-size: 1.2em;
  margin: 10px 0;
}

.recipe-section {
  margin: 30px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  border-left: 5px solid #667eea;
}

.recipe-section h4 {
  color: #667eea;
  font-size: 1.5em;
  margin-bottom: 15px;
}

.recipe-section ul,
.recipe-section ol {
  margin-left: 30px;
  line-height: 2;
  font-size: 1.1em;
}

.recipe-section li {
  margin: 10px 0;
}

.finale {
  text-align: center;
  margin-top: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  border-radius: 15px;
}

.finale h4 {
  color: #333;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.finale p {
  font-size: 1.1em;
  margin: 15px 0;
  line-height: 1.8;
}

.big-text {
  font-size: 2em !important;
  font-weight: bold;
  color: #ff6b6b;
  margin: 30px 0 !important;
}

.small-text {
  font-size: 0.9em !important;
  font-style: italic;
  color: #666;
}

/* Animations */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8em;
  }
  
  .stage-container {
    padding: 20px;
  }
  
  .traffic-lights-grid,
  .triangles-grid,
  .fish-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .emoji-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ordered-checkboxes {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .flappy-game {
    max-width: 100%;
  }
  
  .recipe-container {
    padding: 20px;
  }
  
  .recipe-container h1 {
    font-size: 2em;
  }
  
  .math-equation {
    font-size: 1.5em;
  }
  
  .timer-display {
    font-size: 2em;
  }
}
