/* ==========================================================================
   BILIKIDS SCIENCE LAB - COLOR MAGIC ALCHEMY: 4 DISTINCT EXPERIMENT LEVELS
   Level 1: 🧪 Potion Alchemy Station (Pouring & Stirring)
   Level 2: 🎨 Magic Pastel Painting Studio (Interactive SVG Coloring)
   Level 3: 💎 Optical Prism Chamber (Physics Light Refraction Puzzle)
   Level 4: 🫧 Floating Bubble Symphony (Musical Listening Arcade)
   100% Mobile Responsive (360px - 430px, Tablets & Desktop)
   ========================================================================== */

/* Stage Panels Visibility */
.color-stage-panel {
  animation: fadeInStage 0.28s ease;
}

@keyframes fadeInStage {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   LEVEL 2: 🎨 MAGIC PASTEL PAINTING STUDIO
   ========================================================================== */
.painting-studio-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.palette-jars-card, .painting-canvas-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.25rem;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.painting-progress-pill {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.paint-jars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.paint-jar-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 44px;
}

.paint-jar-btn:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.paint-jar-btn.active {
  border-color: var(--jar-color, #ec4899);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.jar-liquid {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.jar-label {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
}

.active-brush-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 14px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #475569;
}

.brush-swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.painting-tools-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.canvas-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  flex-wrap: wrap;
  gap: 8px;
}

.canvas-svg-wrapper {
  background: #fdfcfe;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interactive-art-svg {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
}

.paintable-zone {
  cursor: pointer;
  transition: fill 0.3s ease, stroke 0.2s ease, transform 0.15s ease;
}

.paintable-zone:hover {
  stroke: #6366f1 !important;
  stroke-width: 4.5px !important;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.35));
}

.paintable-zone.painted {
  stroke-dasharray: none !important;
  stroke: rgba(0, 0, 0, 0.15) !important;
  stroke-width: 2px !important;
}

/* ==========================================================================
   LEVEL 3: 💎 OPTICAL PRISM CHAMBER
   ========================================================================== */
.prism-lab-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.prism-tools-card, .prism-stage-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: 22px;
  padding: 1.25rem;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.prism-target-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.gem-target-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.gem-target-item.energized {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.gem-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px currentColor;
}

.gem-status {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
}

.gem-target-item.energized .gem-status {
  color: #34d399;
}

/* ==========================================================================
   LEVEL 4: 🫧 FLOATING BUBBLE SYMPHONY ARCADE
   ========================================================================== */
.bubbles-arcade-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.bubble-mission-card, .bubbles-arena-card {
  background: #1e1b4b;
  border-radius: 22px;
  padding: 1.25rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(49, 46, 129, 0.35);
}

.target-bubble-visual {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  margin: 10px 0;
}

.target-color-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 20px currentColor;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.1); filter: brightness(1.25); }
}

.arcade-stats-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .painting-studio-layout,
  .prism-lab-layout,
  .bubbles-arcade-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .paint-jars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .canvas-svg-wrapper {
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .paint-jars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .jar-label {
    font-size: 0.75rem;
  }
}
