/* ==========================================================================
   BILIKIDS KIDS CLUB - UNIT 4: EVERYDAY LIFE (7 A 10 AÑOS)
   Tema: Daily Routines, Days of the Week, Simple Present (He/She/They), Time
   Nuevas Actividades: Reloj & Timeline 24H, Weekly Mission Planner,
   La Balanza de Verbos (-S Balance Scale), My Morning Vlog Studio
   ========================================================================== */

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

  --unit4-primary: #f59e0b;
  --unit4-primary-dark: #d97706;
  --unit4-secondary: #f97316;
  --unit4-accent: #0ea5e9;
  --unit4-success: #10b981;
  --unit4-danger: #ef4444;

  --card-bg: #ffffff;
  --border-subtle: #fef3c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-card: 0 10px 30px rgba(245, 158, 11, 0.08);
}

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

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #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 #fde68a;
  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: #fffbeb;
  color: #b45309;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #fde68a;
  transition: all 0.2s;
}

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

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

.unit-tag-pill {
  background: #fef3c7;
  color: #b45309;
  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: #fef3c7;
  color: #92400e;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #fde68a;
}

/* 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 #fde68a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 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: #fffbeb;
  color: #b45309;
}

.tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 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: RELOJ & TIMELINE 24H (ROUTINE CLOCK)
   -------------------------------------------------------------------------- */
.clock-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid #fde68a;
}

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

.timeline-track-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 6px;
  margin-bottom: 24px;
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
}

.timeline-slot-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 90px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-slot-btn:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
}

.timeline-slot-btn.active {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.clock-stage-card {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 2px solid #fde68a;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}

@media (max-width: 768px) {
  .clock-stage-card { flex-direction: column; text-align: center; }
}

.dial-visual {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #f59e0b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.dial-time {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.dial-icon {
  font-size: 1.8rem;
}

.clock-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .clock-options-grid { grid-template-columns: 1fr; }
}

.routine-choice-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.routine-choice-btn:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  transform: translateY(-2px);
}

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

.routine-choice-btn.wrong {
  border-color: #ef4444;
  background: #fef2f2;
  animation: shakeBtn 0.3s;
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 2: WEEKLY MISSION PLANNER (CALENDARIO DE 7 DÍAS)
   -------------------------------------------------------------------------- */
.planner-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid #fde68a;
}

.days-board-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 20px 0;
}

@media (max-width: 900px) {
  .days-board-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 540px) {
  .days-board-grid { grid-template-columns: repeat(2, 1fr); }
}

.day-column-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 8px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
  cursor: pointer;
}

.day-column-card:hover {
  border-color: #f59e0b;
  background: #ffffff;
}

.day-column-card.target-day {
  border-color: #f59e0b;
  background: #fffbeb;
}

.day-column-card.filled {
  border-color: #10b981;
  background: #ecfdf5;
}

.day-name-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.day-activity-slot {
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.habits-pool-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px;
  background: #fffbeb;
  border-radius: 16px;
  border: 1px solid #fde68a;
  margin-top: 16px;
}

.habit-sticker {
  background: #ffffff;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #92400e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: all 0.15s;
}

.habit-sticker:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.habit-sticker.selected {
  background: #f59e0b;
  color: #ffffff;
}

.habit-sticker.placed {
  opacity: 0.35;
  pointer-events: none;
  border-style: dashed;
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 3: LA BALANZA DE VERBOS (-S BALANCE SCALE)
   -------------------------------------------------------------------------- */
.scale-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid #fde68a;
  text-align: center;
}

.scale-balance-graphic {
  max-width: 620px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

@media (max-width: 600px) {
  .scale-balance-graphic { flex-direction: column; }
}

.scale-pan {
  flex: 1;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: all 0.2s;
}

.scale-pan.pan-singular {
  border-color: #f59e0b;
  background: #fffbeb;
}

.scale-pan.pan-plural {
  border-color: #0ea5e9;
  background: #f0f9ff;
}

.scale-pan-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pan-singular .scale-pan-title { color: #b45309; }
.pan-plural .scale-pan-title { color: #0284c7; }

.scale-pan-rule {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
}

.scale-target-sentence {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #0f172a;
  margin: 18px 0 6px;
}

.scale-verb-buttons-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

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

.btn-scale-verb:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

/* --------------------------------------------------------------------------
   ACTIVIDAD 4: MY MORNING VLOG (SIMULADOR DE VLOG EN VIVO)
   -------------------------------------------------------------------------- */
.vlog-container {
  background: #0f172a;
  color: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
  position: relative;
  overflow: hidden;
}

.vlog-viewfinder {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.vlog-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #94a3b8;
}

.vlog-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rec-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseRec 1s infinite;
}

@keyframes pulseRec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.3); }
}

.vlog-prompt-center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
}

.vlog-scene-tag {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.vlog-phrase-target {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.vlog-phrase-es {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 24px;
}

.vlog-mic-action {
  text-align: center;
  margin: 20px 0;
}

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

.btn-vlog-mic:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.5);
}

.btn-vlog-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); }
}

.vlog-stats-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #94a3b8;
}
