/* ==========================================================================
   LIFE SCIENCE (BIOLOGY) 10-GAME CSS SUITE
   Rich Glassmorphism, Micro-Animations, Tactile Controls, and Neon Glows
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared Game Containers & Header Badges
   -------------------------------------------------------------------------- */
.bio-game-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, #064E3B 0%, #0F172A 100%);
  color: #F8FAFC;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

.bio-workspace {
  display: flex;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  gap: 20px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .bio-workspace {
    flex-direction: column;
  }
}

.bio-arena {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bio-sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 900px) {
  .bio-sidebar {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   GAME 1: BUILD-A-CELL MODEL
   -------------------------------------------------------------------------- */
.cell-model-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 380px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, #065F46 0%, #042F2E 60%, #0F172A 100%);
  border: 4px solid #10B981;
  border-radius: 50% / 45%;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.35), inset 0 0 40px rgba(5, 150, 105, 0.4);
  overflow: hidden;
}

.anim-cell-energized {
  animation: cellGlowPulse 1.8s ease-in-out infinite alternate;
}

@keyframes cellGlowPulse {
  0% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.4), inset 0 0 30px rgba(5, 150, 105, 0.3); }
  100% { box-shadow: 0 0 55px rgba(52, 211, 153, 0.8), inset 0 0 60px rgba(16, 185, 129, 0.6); }
}

.cell-drop-slot {
  position: absolute;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cell-drop-slot:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.slot-target-ring {
  position: absolute;
  inset: 0;
  border: 2px dashed #34D399;
  border-radius: 50%;
  animation: rotateTargetRing 10s linear infinite;
}

@keyframes rotateTargetRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.slot-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #FEF08A;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin-top: 50px;
  pointer-events: none;
  white-space: nowrap;
}

.organelle-tray-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  width: 100%;
}

.organelle-card {
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.organelle-card:hover {
  border-color: #38BDF8;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.25);
}

.organelle-card.selected {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.4);
}

.organelle-card.placed {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.8);
}

.organelle-svg {
  width: 48px;
  height: 48px;
}

.organelle-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: #F1F5F9;
}

.organelle-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   GAME 2: PLANT LIFE CYCLE WHEEL
   -------------------------------------------------------------------------- */
.plant-wheel-arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 768px) {
  .plant-wheel-arena-grid {
    grid-template-columns: 1fr;
  }
}

.plant-wheel-dial-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
}

.plant-wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #F59E0B;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: conic-gradient(
    #D97706 0deg 90deg,
    #059669 90deg 180deg,
    #10B981 180deg 270deg,
    #FBBF24 270deg 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.plant-wheel-center-hub {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #0F172A;
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.plant-growth-stage-box {
  width: 100%;
  height: 280px;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(52, 211, 153, 0.4);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.anim-sunflower-bloom {
  animation: bloomPulse 2.5s ease-in-out infinite alternate;
}

@keyframes bloomPulse {
  0% { transform: translate(100px, 50px) scale(0.92); }
  100% { transform: translate(100px, 50px) scale(1.06); }
}

.anim-water-droplet {
  position: absolute;
  width: 12px;
  height: 18px;
  background: #38BDF8;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  top: 10px;
  animation: dropRain 0.8s ease-in forwards;
}

@keyframes dropRain {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(140px); opacity: 0; }
}

.stage-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #FFFFFF;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   GAME 3: BACKYARD BUG CATCHER & KEY
   -------------------------------------------------------------------------- */
.bug-catcher-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .bug-catcher-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.bug-magnifying-lens-box {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  border: 8px solid #F59E0B;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.25), rgba(15, 23, 42, 0.85));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bug-magnifying-lens-box svg {
  width: 140px;
  height: 140px;
  animation: bugFloat 3s ease-in-out infinite alternate;
}

@keyframes bugFloat {
  0% { transform: translateY(-4px) scale(0.98); }
  100% { transform: translateY(4px) scale(1.02); }
}

.dichotomous-step-card {
  background: rgba(30, 41, 59, 0.75);
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.key-opt-btn {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.95rem;
  background: #1E293B;
  border-color: #38BDF8;
  color: #F8FAFC;
  transition: all 0.2s ease;
}

.key-opt-btn:hover {
  background: #0284C7;
  border-color: #7DD3FC;
  transform: translateX(4px);
}

.discovered-bug-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10B981;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #A7F3D0;
}

/* --------------------------------------------------------------------------
   GAME 4: FOOD WEB YARN MAZE
   -------------------------------------------------------------------------- */
.food-web-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  width: 100%;
}

.food-web-node {
  background: rgba(30, 41, 59, 0.85);
  border: 3px solid #475569;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.food-web-node:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.food-web-node.connected {
  border-color: #FBBF24 !important;
  background: rgba(251, 191, 36, 0.2);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.node-emoji {
  font-size: 2.2rem;
}

.node-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.node-role {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  color: #FFFFFF;
}

.crumb-step {
  font-weight: 700;
  color: #FDE047;
  padding: 2px 8px;
  background: rgba(253, 224, 71, 0.2);
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   GAME 5: LEAF TEXTURE RUBBING ALBUM
   -------------------------------------------------------------------------- */
.leaf-rubbing-stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 300px;
  margin: 0 auto;
  background: #FDFBF7;
  border: 3px solid #D97706;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  cursor: crosshair;
  overflow: hidden;
  user-select: none;
}

.leaf-texture-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.crayon-swatches-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0;
}

.crayon-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.crayon-swatch.active {
  transform: scale(1.25);
  box-shadow: 0 0 12px currentColor;
}

.album-stamp-card {
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px dashed #10B981;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px;
}

/* --------------------------------------------------------------------------
   GAME 6: SKELETAL PASTA MATCH
   -------------------------------------------------------------------------- */
.skeleton-silhouette-bg {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 380px;
  margin: 0 auto;
  background: #020617;
  border: 3px solid #475569;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.anim-skeleton-dance {
  animation: skeletonWiggle 0.6s ease-in-out infinite alternate;
}

@keyframes skeletonWiggle {
  0% { transform: rotate(-3deg) scale(0.98); }
  100% { transform: rotate(3deg) scale(1.02); }
}

.bone-slot-box {
  width: 90%;
  padding: 8px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 2px dashed #94A3B8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bone-slot-box:hover {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.15);
}

.pasta-shapes-tray {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}

.pasta-shape-card {
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid #F59E0B;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pasta-shape-card.selected {
  box-shadow: 0 0 16px #F59E0B;
  background: rgba(245, 158, 11, 0.25);
}

.pasta-shape-card.placed {
  opacity: 0.3;
  pointer-events: none;
}

.pasta-emoji {
  font-size: 1.8rem;
}

.pasta-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FEF3C7;
}

.pasta-anatomy {
  font-size: 0.68rem;
  color: #94A3B8;
}

/* --------------------------------------------------------------------------
   GAME 7: HABITATS DIORAMA BOX
   -------------------------------------------------------------------------- */
.biome-tabs-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.biome-tab-btn {
  padding: 8px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  background: #1E293B;
  border: 2px solid #475569;
  color: #F8FAFC;
  cursor: pointer;
  transition: all 0.2s ease;
}

.biome-tab-btn.active {
  border-color: #10B981;
  background: #065F46;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.diorama-stage {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 280px;
  margin: 0 auto;
  border-radius: 18px;
  border: 4px solid #334155;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  box-sizing: border-box;
}

.diorama-stage.biome-desert {
  background: linear-gradient(180deg, #FDE047 0%, #D97706 60%, #92400E 100%);
}

.diorama-stage.biome-ocean {
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 50%, #0C4A6E 100%);
}

.diorama-stage.biome-arctic {
  background: linear-gradient(180deg, #E0E7FF 0%, #38BDF8 40%, #0F172A 100%);
}

.biome-placed-layer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 2;
}

.placed-diorama-sticker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid #FFFFFF;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.diorama-drop-target {
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed #FFFFFF;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
}

.diorama-sticker-tray {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
}

.diorama-sticker-card {
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid #475569;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diorama-sticker-card.selected {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.diorama-sticker-card.placed {
  opacity: 0.35;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   GAME 8: SEED SPROUT RACE
   -------------------------------------------------------------------------- */
.seed-sprout-simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 768px) {
  .seed-sprout-simulator-grid {
    grid-template-columns: 1fr;
  }
}

.glass-jar-body {
  position: relative;
  width: 220px;
  height: 300px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 4px solid rgba(186, 230, 253, 0.7);
  border-radius: 20px 20px 30px 30px;
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.2), 0 12px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.jar-soil-layer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 140px;
  background: #451A03;
  border-top: 3px solid #78350F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jar-stem-layer {
  position: absolute;
  bottom: 130px;
  left: 0;
  width: 100%;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: bottom center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-control-group {
  background: rgba(30, 41, 59, 0.75);
  border: 2px solid #475569;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.bio-range-slider {
  width: 100%;
  accent-color: #10B981;
}

/* --------------------------------------------------------------------------
   GAME 9: DNA PIPE CLEANER LADDER
   -------------------------------------------------------------------------- */
.dna-ladder-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  height: 320px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.75);
  border: 3px solid #8B5CF6;
  border-radius: 20px;
  padding: 16px;
  box-sizing: border-box;
  perspective: 800px;
}

.dna-rungs-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.dna-rung-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1E293B;
  border: 2px solid #475569;
  border-radius: 10px;
  padding: 6px 12px;
}

.base-half {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #FFFFFF;
}

.twisted-3d-helix {
  animation: rotateHelix3D 4s linear infinite;
}

@keyframes rotateHelix3D {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

.nuc-brick-btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.nuc-brick-btn:hover {
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   GAME 10: CAMOUFLAGE HUNT
   -------------------------------------------------------------------------- */
.camo-nature-scene-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 340px;
  margin: 0 auto;
  border: 4px solid #15803D;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.camo-forest-backdrop {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, #166534 0%, #14532D 60%, #052E16 100%);
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.15) 0, rgba(0,0,0,0.15) 10px, transparent 10px, transparent 20px);
}

.camo-target-spot {
  position: absolute;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.camo-target-spot:hover {
  opacity: 0.6;
}

.camo-target-spot.revealed {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.3);
  filter: drop-shadow(0 0 12px #FDE047);
}

.camo-spot-emoji {
  font-size: 2rem;
}

.camo-spot-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: #FBBF24;
  color: #0F172A;
  padding: 2px 6px;
  border-radius: 8px;
  margin-top: 4px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Animations & Pop-ins
   -------------------------------------------------------------------------- */
.anim-placed-snap {
  animation: snapBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes snapBounce {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.anim-pop-in {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
