/* ==========================================================================
   Pre-K 10 Brand New Creative Game Design Studios
   ========================================================================== */

.studio-hub {
  padding: 10px 0 30px;
}
.studio-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}
.studio-hub-header h1 {
  font: 700 32px var(--display, system-ui);
  color: #174844;
  margin: 6px 0 0;
}
.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.studio-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 3px solid #d3e5e0;
  border-bottom: 7px solid var(--studio-color, #1b7a6d);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.studio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: var(--studio-color, #1b7a6d);
}
.studio-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--studio-bg, #e8f5f2);
  color: var(--studio-color, #1b7a6d);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.studio-card-icon svg {
  width: 36px;
  height: 36px;
}
.studio-card h2 {
  font: 700 22px/1.3 var(--display, system-ui);
  color: #1a3c38;
  margin: 0 0 8px;
}
.studio-card p {
  font-size: 14px;
  color: #5c746e;
  line-height: 1.45;
  margin: 0 0 18px;
  flex-grow: 1;
}
.studio-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--studio-color, #1b7a6d);
}

/* Common Studio Player Shell */
.studio-player {
  max-width: 920px;
  margin: 0 auto 40px;
  background: #ffffff;
  border: 3px solid #d5e5e0;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(27,122,109,0.08);
  overflow: hidden;
}
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #f7faf9;
  border-bottom: 2px solid #e1ece9;
}
.studio-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.studio-title-box h1 {
  font: 700 24px var(--display, system-ui);
  color: #173f3a;
  margin: 0;
}
.studio-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1a6d62;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: #eaf4f1;
}
.studio-stage-box {
  min-height: 480px;
  position: relative;
  background: #fdfefe;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}
.studio-hud-status {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffffdd;
  backdrop-filter: blur(4px);
  padding: 8px 20px;
  border-radius: 30px;
  font: 700 16px var(--display, system-ui);
  color: #1c524c;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 1. Bubble Pop */
.bubble-arena {
  width: 100%;
  height: 440px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #dff2fa 0%, #edf8fc 100%);
  border-radius: 14px;
}
.bubble-item {
  position: absolute;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: inset -6px -6px 12px rgba(255,255,255,0.7), inset 6px 6px 14px rgba(255,255,255,0.9), 0 8px 16px rgba(0,0,0,0.08);
  border: 2px solid rgba(255,255,255,0.85);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, rgba(186,233,250,0.65) 60%, rgba(120,205,240,0.5) 100%);
  user-select: none;
  touch-action: manipulation;
  transition: transform .1s ease;
  animation: bubble-float 6s ease-in-out infinite alternate;
}
.bubble-item:active {
  transform: scale(0.92);
}
.bubble-pop-anim {
  animation: bubble-burst .25s ease-out forwards !important;
}
@keyframes bubble-burst {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.8; filter: blur(2px); }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes bubble-float {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-30px) rotate(2deg); }
}

/* 2. 3D Card Memory */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 580px;
  width: 100%;
  perspective: 1000px;
}
.memory-card-3d {
  aspect-ratio: 1;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.memory-card-3d.flipped, .memory-card-3d.matched {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
.card-front {
  background: linear-gradient(135deg, #f2994a, #f2c94c);
  border: 4px solid #ffffff;
  color: #ffffff;
  font-size: 32px;
}
.card-back {
  background: #ffffff;
  border: 4px solid #48bb78;
  transform: rotateY(180deg);
}
.card-back svg {
  width: 52px;
  height: 52px;
}
.memory-card-3d.matched .card-back {
  background: #f0fff4;
  border-color: #38a169;
  box-shadow: 0 0 16px #48bb78;
}

/* 3. Drawing & Tracing Easel */
.easel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.easel-canvas-wrap {
  position: relative;
  background: #ffffff;
  border: 6px solid #e2ece8;
  border-radius: 16px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
  touch-action: none;
}
#easel-canvas {
  display: block;
  border-radius: 10px;
  cursor: crosshair;
}
.easel-guide-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font: 700 180px var(--display, system-ui);
  color: #00000010;
  user-select: none;
}
.easel-palette {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.palette-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform .15s ease;
}
.palette-btn.active {
  transform: scale(1.22);
  outline: 3px solid #2b776c;
}

/* 4. Little Maestro Piano Synthesizer */
.piano-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.piano-keys {
  display: flex;
  gap: 8px;
  justify-content: center;
  background: #202b33;
  padding: 16px 20px 24px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.2);
}
.piano-key {
  width: 60px;
  height: 220px;
  border-radius: 0 0 12px 12px;
  border: none;
  background: var(--key-color, #ffffff);
  color: #ffffff;
  font: 700 20px var(--display, system-ui);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 18px;
  cursor: pointer;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.2), 0 6px 10px rgba(0,0,0,0.15);
  transition: transform .08s ease, filter .08s ease;
}
.piano-key:active, .piano-key.pressed {
  transform: translateY(6px);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3);
  filter: brightness(1.15);
}
.piano-pad-row {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}
.animal-pad {
  padding: 12px 20px;
  border-radius: 30px;
  border: 2px solid #d5e5e0;
  background: #ffffff;
  font: 600 15px var(--display, system-ui);
  color: #29554f;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform .1s;
}
.animal-pad:active {
  transform: scale(0.95);
  background: #e8f5f1;
}

/* 5. Snack Monster Feeding */
.snack-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.monster-avatar {
  width: 180px;
  height: 180px;
  position: relative;
  margin-bottom: 25px;
  transition: transform .2s ease;
}
.monster-avatar.eating {
  animation: monster-chomp .4s ease infinite alternate;
}
@keyframes monster-chomp {
  0% { transform: scale(1); }
  100% { transform: scale(1.1) rotate(3deg); }
}
.food-tray {
  display: flex;
  gap: 16px;
  background: #fbf5e6;
  border: 4px dashed #e4cf9b;
  border-radius: 18px;
  padding: 16px 24px;
}
.food-item {
  width: 75px;
  height: 75px;
  background: #ffffff;
  border: 3px solid #e6d3a8;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform .15s ease;
}
.food-item:hover {
  transform: scale(1.12);
}

/* 6. Shadow Silhouette Matcher */
.shadow-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}
.shadow-slots {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.shadow-slot {
  width: 110px;
  height: 110px;
  border-radius: 18px;
  background: #2c3a38;
  border: 3px dashed #546a67;
  display: grid;
  place-items: center;
  position: relative;
}
.shadow-slot svg {
  width: 65px;
  height: 65px;
  color: #172220;
  opacity: 0.95;
}
.shadow-slot.snapped {
  background: #e6f9ed;
  border-color: #48bb78;
  border-style: solid;
}
.shadow-slot.snapped svg {
  color: inherit;
  opacity: 1;
}
.shadow-pieces {
  display: flex;
  gap: 16px;
  padding: 14px 22px;
  background: #f0f7f5;
  border-radius: 16px;
}

/* 7. Animal Habitat Panorama */
.habitat-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.habitat-diorama {
  width: 100%;
  max-width: 680px;
  height: 300px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border: 4px solid #ffffff;
}
.habitat-ocean { background: linear-gradient(180deg, #6dd5ed, #2193b0); }
.habitat-forest { background: linear-gradient(180deg, #a8ff78, #78ffd6); }
.habitat-sky { background: linear-gradient(180deg, #2b5876, #4e4376); }
.habitat-sticker-drawer {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.habitat-sticker-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #e1ece9;
  background: #fcfefe;
  font: 600 15px var(--display, system-ui);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 8. Water Cascade Lab */
.water-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.water-pipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  gap: 14px;
  background: #eef8fb;
  padding: 22px;
  border-radius: 20px;
  border: 4px solid #bce1ec;
}
.pipe-cell {
  width: 100px;
  height: 100px;
  background: #ffffff;
  border: 3px solid #89c7db;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .25s ease;
}
.pipe-cell svg {
  width: 50px;
  height: 50px;
  color: #2b7da8;
}

/* 9. Rocket Launch Countdown Pad */
.rocket-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 420px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0f2027, #203a43, #2c5364);
  border-radius: 18px;
  color: #ffffff;
  padding: 20px;
}
.rocket-ship {
  width: 100px;
  height: 160px;
  position: absolute;
  bottom: 60px;
  transition: transform 2.5s cubic-bezier(0.5, 0, 0.75, 0);
}
.rocket-ship.launching {
  transform: translateY(-500px) scale(0.6);
}
.rocket-thruster-fire {
  width: 30px;
  height: 45px;
  background: linear-gradient(180deg, #ff9900, #ff0000);
  border-radius: 0 0 50% 50%;
  margin: 0 auto;
  opacity: 0;
}
.rocket-ship.launching .rocket-thruster-fire {
  opacity: 1;
  animation: thruster-pulse .15s infinite alternate;
}
@keyframes thruster-pulse {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(1.3); }
}
.launch-countdown-num {
  font: 800 64px var(--display, system-ui);
  color: #ffd15c;
  margin-top: 40px;
  text-shadow: 0 0 20px rgba(255,209,92,0.6);
}

/* 10. Weather Wardrobe Studio */
.dressup-stage {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}
.character-window {
  width: 240px;
  height: 340px;
  border-radius: 20px;
  border: 4px solid #e1ece9;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 24px;
  background-size: cover;
}
.char-body {
  width: 130px;
  height: 180px;
  position: relative;
}
.wardrobe-rack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wardrobe-item-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 2px solid #cce2dc;
  background: #ffffff;
  font: 600 15px var(--display, system-ui);
  color: #265952;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform .15s;
}
.wardrobe-item-btn:hover {
  transform: translateX(4px);
  border-color: #1b7a6d;
}

@media (max-width: 600px) {
  .studio-grid { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); }
  .piano-key { width: 38px; height: 160px; font-size: 15px; }
  .piano-keys { padding: 10px; gap: 4px; }
  .water-pipes-grid { grid-template-columns: repeat(3, 75px); }
  .pipe-cell { width: 75px; height: 75px; }
}
