/* ==========================================================================
   BILIKIDS KIDS CLUB - UNIT 5: FREE TIME (7 A 10 AÑOS)
   Tema: Hobbies, Sports, Instruments, Like/Love + -ING, Can/Can't, Frequency
   Actividades con Máxima Personalidad e Interactividad:
   1. 🎒 The Hobby Gear Locker (Casillero de Equipamiento de Hobbies & Deportes)
   2. 🎚️ Tactile Frequency DJ Mixer (Mesa de DJ con Fader Deslizante & Scratch)
   3. 🧪 Verb-ING Magnet Fusion Lab (Laboratorio Ortográfico -ING)
   4. 🏆 Talent Show Audition ("Yes, I can!" Talent Stage & Golden Buzzer)
   ========================================================================== */

:root {
  --font-display: 'Fredoka', cursive, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --unit5-primary: #10b981;
  --unit5-primary-dark: #059669;
  --unit5-secondary: #06b6d4;
  --unit5-accent: #8b5cf6;
  --unit5-warning: #f59e0b;
  --unit5-danger: #ef4444;

  --card-bg: #ffffff;
  --border-subtle: #d1fae5;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-card: 0 10px 30px rgba(16, 185, 129, 0.08);
}

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

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 50%, #f8fafc 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation */
.unit-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #a7f3d0;
  padding: 10px 20px;
}

.unit-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn-back-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  transition: all 0.2s;
}

.btn-back-map:hover {
  background: #d1fae5;
  transform: translateX(-2px);
}

.unit-title-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unit-tag-pill {
  background: #d1fae5;
  color: #047857;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.unit-name-head {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #0f172a;
}

.unit-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d1fae5;
  color: #065f46;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  transition: transform 0.2s;
}

.unit-score-pill.pulse-star {
  transform: scale(1.15);
  background: #fef08a;
  color: #854d0e;
}

/* Tabs Bar */
.activity-tabs-bar {
  max-width: 1100px;
  margin: 18px auto 8px;
  padding: 0 20px;
  width: 100%;
}

.tabs-track {
  display: flex;
  gap: 8px;
  background: #ffffff;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #a7f3d0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  min-width: 140px;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tab-btn:hover {
  background: #ecfdf5;
  color: #047857;
}

.tab-btn.active {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Main Workspace */
.unit-workspace {
  max-width: 1100px;
  margin: 12px auto 40px;
  padding: 0 20px;
  width: 100%;
}

.activity-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.activity-view.active-view {
  display: block;
}

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

/* --------------------------------------------------------------------------
   ACTIVIDAD 1: THE HOBBY GEAR LOCKER (CASILLERO DE EQUIPAMIENTO)
   -------------------------------------------------------------------------- */
.locker-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 2px solid #a7f3d0;
}

.locker-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.locker-profile-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 2px solid #6ee7b7;
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.locker-slots-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: #0f172a;
  border: 3px solid #334155;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.4);
}

@media (max-width: 650px) {
  .locker-slots-tray { grid-template-columns: 1fr; }
}

.locker-slot-box {
  background: #1e293b;
  border: 2px dashed #475569;
  border-radius: 16px;
  padding: 16px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.locker-slot-box.filled {
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #ffffff;
}

.gear-pool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .gear-pool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .gear-pool-grid { grid-template-columns: repeat(2, 1fr); }
}

.gear-item-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.gear-item-card:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.gear-item-card.packed {
  opacity: 0.35;
  pointer-events: none;
  border-style: dashed;
}

.gear-item-card.wrong {
  animation: shakeBtn 0.35s;
  border-color: #ef4444;
  background: #fef2f2;
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 2: TACTILE FREQUENCY DJ MIXER (CONSOLA DE DJ & CROSSFADER)
   -------------------------------------------------------------------------- */
.dj-console-container {
  background: #0f172a;
  color: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
  border: 2px solid #334155;
}

.dj-console-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.dj-deck-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  border: 2px solid #38bdf8;
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.12);
}

@media (max-width: 768px) {
  .dj-deck-layout { grid-template-columns: 1fr; text-align: center; }
}

/* Vinyl Turntable */
.vinyl-turntable-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vinyl-disc {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #0f172a 18%, #1e293b 22%, #0f172a 45%, #334155 48%, #0f172a 75%, #1e293b 80%, #020617 100%);
  border: 6px solid #475569;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 0 10px rgba(255,255,255,0.1);
  position: relative;
  cursor: grab;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-disc.spinning {
  animation: spinVinyl 3s linear infinite;
}

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

.vinyl-center-label {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Master Crossfader Area */
.crossfader-console {
  background: #1e293b;
  border: 2px solid #475569;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
}

.vu-meters-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0;
}

.vu-led-bar {
  width: 28px;
  height: 12px;
  border-radius: 4px;
  background: #334155;
  transition: all 0.15s ease;
}

.vu-led-bar.active-led-1 { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.vu-led-bar.active-led-2 { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.vu-led-bar.active-led-3 { background: #10b981; box-shadow: 0 0 8px #10b981; }
.vu-led-bar.active-led-4 { background: #06b6d4; box-shadow: 0 0 8px #06b6d4; }
.vu-led-bar.active-led-5 { background: #a855f7; box-shadow: 0 0 8px #a855f7; }

.crossfader-slider-wrap {
  position: relative;
  margin: 20px 10px;
}

.crossfader-input {
  width: 100%;
  -webkit-appearance: none;
  height: 12px;
  border-radius: 6px;
  background: #0f172a;
  outline: none;
  border: 1px solid #475569;
}

.crossfader-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
  transition: transform 0.1s;
}

.crossfader-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.crossfader-stops-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
}

.btn-drop-beat {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-drop-beat:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 3: VERB-ING MAGNET FUSION LAB
   -------------------------------------------------------------------------- */
.magnet-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid #a7f3d0;
}

.magnet-lab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.magnet-chamber {
  background: linear-gradient(135deg, #faf5ff 0%, #f0fdf4 100%);
  border: 2px dashed #8b5cf6;
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 22px;
  text-align: center;
  position: relative;
}

.magnet-sentence-display {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #0f172a;
  margin: 12px 0 6px;
}

.magnet-blank-pill {
  display: inline-block;
  min-width: 90px;
  padding: 2px 14px;
  background: #f3e8ff;
  border-bottom: 3px solid #8b5cf6;
  border-radius: 8px;
  color: #6b21a8;
  font-weight: 700;
}

.magnet-rule-clue {
  display: inline-block;
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 8px;
}

.magnet-options-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-magnet-option {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-magnet-option:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #8b5cf6;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.btn-magnet-option.correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.btn-magnet-option.wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
  animation: shakeBtn 0.3s;
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 4: TALENT SHOW AUDITION ("YES, I CAN!" TALENT STAGE)
   -------------------------------------------------------------------------- */
.talent-container {
  background: #0f172a;
  color: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
  border: 2px solid #f59e0b;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.talent-stage-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6, #ef4444);
  background-size: 200% 100%;
  animation: rainbowBorder 4s linear infinite;
}

@keyframes rainbowBorder {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.talent-judges-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}

.judge-buzzer-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.judge-buzzer-card.buzzer-gold {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.talent-target-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  max-width: 650px;
  margin: 0 auto 20px;
}

.talent-judge-question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #38bdf8;
  margin-bottom: 6px;
}

.talent-candidate-answer {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #ffffff;
  margin: 10px 0 6px;
  line-height: 1.3;
}

.btn-talent-mic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-talent-mic:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.btn-talent-mic.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

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