/* css/styles.css */
/* Sistema de Diseño y Estilos del Portal Educativo de Francés */
/* Optimizado para pizarras de aula, PCs y Tablets escolares en la Región de Murcia (LOMLOE) */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Outfit:wght@100..900&display=swap');

:root {
  /* Paleta de Colores Curada */
  --color-blue-royal: #1e3a8a;
  --color-blue-medium: #3b82f6;
  --color-blue-light: #e0f2fe;
  
  --color-lavender: #8b5cf6;
  --color-lavender-light: #ede9fe;
  
  --color-murcia-lemon: #eab308;
  --color-murcia-lemon-light: #fef9c3;
  --color-murcia-tomato: #ef4444;
  --color-murcia-tomato-light: #fee2e2;
  
  --color-green: #10b981;
  --color-green-light: #d1fae5;
  --color-orange: #f97316;
  --color-orange-light: #ffedd5;
  
  --color-bg-light: #f8fafc;
  --color-card-bg: rgba(255, 255, 255, 0.75);
  --color-text-dark: #0f172a;
  --color-text-muted: #475569;
  --color-border: rgba(226, 232, 240, 0.8);
  
  /* Fuentes */
  --font-title: 'Fredoka', cursive, sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Sombras y Bordes */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  --border-radius-sm: 10px;
  --border-radius-md: 18px;
  --border-radius-lg: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Oscuro Académico (Opcional - Activado por clase) */
.dark-theme {
  --color-bg-light: #0f172a;
  --color-card-bg: rgba(30, 41, 59, 0.7);
  --color-text-dark: #f8fafc;
  --color-text-muted: #cbd5e1;
  --color-border: rgba(51, 65, 85, 0.6);
  --color-blue-light: #1e293b;
  --color-lavender-light: #2e1065;
}

/* Reset de estilos */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  transition: background-color 0.4s ease;
}

/* -------------------------------------------------------------
   ESTRUCTURA Y SIDEBAR LATERAL (Premium Glassmorphic Layout)
   ------------------------------------------------------------- */
   
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar Estilo Colegio Francés Moderno */
.sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--color-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
}

.dark-theme .sidebar {
  background: rgba(15, 23, 42, 0.85);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px 12px;
  border-bottom: 2px dashed var(--color-border);
}

.logo-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  animation: pulse-slow 3s infinite;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
}

/* Bandera francesa dibujada en CSS */
.fr-flag {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.fr-flag-blue {
  flex: 1;
  background-color: #002395;
}

.fr-flag-white {
  flex: 1;
  background-color: #EDEDED;
}

.fr-flag-red {
  flex: 1;
  background-color: #ED2939;
}


.logo-text {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-blue-royal);
  line-height: 1.2;
}

.dark-theme .logo-text {
  color: #3b82f6;
}

.logo-text span {
  font-size: 0.9rem;
  display: block;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Navegación por Grupos */
.nav-scroll {
  overflow-y: auto;
  flex-grow: 1;
  margin-top: 16px;
  padding-right: 4px;
}

.nav-scroll::-webkit-scrollbar {
  width: 6px;
}
.nav-scroll::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.nav-group-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 16px 12px 8px 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item button {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.nav-item button:hover {
  background-color: var(--color-blue-light);
  transform: translateX(4px);
}

.nav-item.active button {
  background: linear-gradient(135deg, var(--color-blue-medium), var(--color-blue-royal));
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-item.active button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background-color: var(--color-murcia-lemon);
  border-radius: 0 4px 4px 0;
}

/* Específicos para pestañas 5º y 6º */
.nav-item-5.active button {
  background: linear-gradient(135deg, var(--color-green), #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.nav-item-6.active button {
  background: linear-gradient(135deg, var(--color-lavender), #6d28d9);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}
.nav-item-prof.active button {
  background: linear-gradient(135deg, var(--color-orange), #c2410c);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 0 12px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-toggle-btn {
  background: var(--color-blue-light);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  transform: scale(1.15) rotate(20deg);
}

/* -------------------------------------------------------------
   ÁREA DE CONTENIDO PRINCIPAL
   ------------------------------------------------------------- */
   
.main-content {
  flex-grow: 1;
  margin-left: 280px;
  padding: 32px;
  width: calc(100% - 280px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 992px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }
  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .nav-item button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Cabecera del Contenido */
.header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--color-blue-royal) 0%, #1e40af 100%);
  color: white;
  border-radius: var(--border-radius-lg);
  padding: 28px 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.header-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.banner-text h1 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-text p {
  font-size: 1.05rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-badge {
  background: var(--color-murcia-lemon);
  color: #451a03;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(234, 179, 8, 0.3);
  animation: bounce 2s infinite;
}

/* Secciones de Contenido General */
.app-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.app-section.active {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

/* Tarjetas y Paneles Glassmorphic */
.glass-panel {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.2);
}

/* -------------------------------------------------------------
   PÁGINA DE INICIO (Accueil)
   ------------------------------------------------------------- */
   
.welcome-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .welcome-grid {
    grid-template-columns: 1fr;
  }
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), var(--color-blue-light));
  border: 1.5px solid var(--color-blue-medium);
}

.teacher-avatar {
  font-size: 4rem;
  background: white;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--color-blue-royal);
}

.teacher-info h2 {
  font-family: var(--font-title);
  color: var(--color-blue-royal);
  margin-bottom: 6px;
}

.daily-challenge {
  background: linear-gradient(135deg, #fef9c3, #fef08a);
  border: 2px solid var(--color-murcia-lemon);
  border-radius: var(--border-radius-md);
  padding: 24px;
  position: relative;
}

.daily-challenge h3 {
  font-family: var(--font-title);
  color: #854d0e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenge-box {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--color-murcia-lemon);
  margin-bottom: 16px;
  font-weight: 600;
  text-align: center;
  font-size: 1.1rem;
}

/* Selector de Grados Rápido */
.grade-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

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

.grade-card {
  text-align: center;
  padding: 40px 24px;
  cursor: pointer;
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.grade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
}

.grade-card-5 {
  background: linear-gradient(135deg, #ffffff, var(--color-green-light));
  border: 2px solid var(--color-green);
}
.grade-card-5::before { background-color: var(--color-green); }

.grade-card-6 {
  background: linear-gradient(135deg, #ffffff, var(--color-lavender-light));
  border: 2px solid var(--color-lavender);
}
.grade-card-6::before { background-color: var(--color-lavender); }

.grade-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.grade-icon {
  font-size: 3.5rem;
  padding: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.grade-card h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
}

.grade-card-5 h2 { color: #065f46; }
.grade-card-6 h2 { color: #5b21b6; }

.grade-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 240px;
}

.lomloe-seal {
  background: var(--color-blue-royal);
  color: white;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------
   ACTIVIDADES DE 5º DE PRIMARIA
   ------------------------------------------------------------- */
   
.grid-activities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.activity-item-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  background: white;
  transition: var(--transition);
}

.dark-theme .activity-item-card {
  background: #1e293b;
}

.activity-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.activity-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.badge-vocab { background-color: var(--color-orange-light); color: #c2410c; }
.badge-grammar { background-color: var(--color-blue-light); color: #1d4ed8; }
.badge-phonetic { background-color: var(--color-lavender-light); color: #6d28d9; }
.badge-culture { background-color: var(--color-green-light); color: #047857; }

.activity-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-icon-big {
  font-size: 2.2rem;
}

.activity-item-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--color-text-dark);
}

.activity-item-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

.btn-play {
  background: linear-gradient(135deg, var(--color-blue-medium), var(--color-blue-royal));
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: 12px;
}

.btn-play:hover {
  opacity: 0.95;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-play-5 {
  background: linear-gradient(135deg, var(--color-green), #047857);
}
.btn-play-6 {
  background: linear-gradient(135deg, var(--color-lavender), #6d28d9);
}

/* -------------------------------------------------------------
   MODALES Y CONTENEDORES DE JUEGO GENERALES
   ------------------------------------------------------------- */
   
.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.game-modal.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.game-window {
  background: var(--color-bg-light);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--color-blue-royal);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.dark-theme .game-window {
  background: #0f172a;
}

@keyframes modalScaleUp {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.game-header {
  background: linear-gradient(135deg, var(--color-blue-royal), #1e40af);
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.game-header h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-game {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-game:hover {
  background: var(--color-murcia-tomato);
  transform: rotate(90deg);
}

.game-content-scroll {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

/* -------------------------------------------------------------
   JUEGO 1: Mission Castle (Escape Room)
   ------------------------------------------------------------- */
   
.escape-room-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  background: linear-gradient(180deg, #eae5d9, #d0c9b5);
  padding: 24px;
  border-radius: var(--border-radius-md);
  border: 6px double #78350f;
  color: #451a03;
}

.escape-intro {
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}

.castle-chambers {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}

.chamber-indicator {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #94a3b8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 3px solid #64748b;
  position: relative;
}

.chamber-indicator.active {
  background: #d97706;
  border-color: #b45309;
  animation: pulse-slow 1.5s infinite;
}

.chamber-indicator.unlocked {
  background: var(--color-green);
  border-color: #047857;
}

.chamber-indicator.locked::after {
  content: '🔒';
  font-size: 0.8rem;
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.riddle-card {
  background: white;
  border-radius: var(--border-radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #cbd5e1;
  text-align: left;
  margin-top: 16px;
}

.riddle-card h3 {
  font-family: var(--font-title);
  color: #78350f;
  margin-bottom: 12px;
}

.riddle-text {
  font-size: 1.1rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.riddle-input {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  outline: none;
  font-family: var(--font-body);
}

.riddle-input:focus {
  border-color: #b45309;
}

.escape-feedback {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  display: none;
}

.escape-success {
  background-color: #d1fae5;
  color: #065f46;
}

.escape-error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* -------------------------------------------------------------
   JUEGO 2: Café Parisien Simulator
   ------------------------------------------------------------- */
   
.cafe-board {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  height: 600px;
}

@media (max-width: 768px) {
  .cafe-board {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.cafe-menu-panel {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dark-theme .cafe-menu-panel {
  background: #1e293b;
}

.cafe-tabs {
  display: flex;
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}

.dark-theme .cafe-tabs {
  background: #0f172a;
}

.cafe-tab-btn {
  flex-grow: 1;
  background: none;
  border: none;
  padding: 14px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-text-muted);
}

.cafe-tab-btn.active {
  background: white;
  color: var(--color-blue-royal);
  border-bottom: 3px solid var(--color-blue-royal);
}

.dark-theme .cafe-tab-btn.active {
  background: #1e293b;
  color: var(--color-blue-medium);
  border-bottom-color: var(--color-blue-medium);
}

.cafe-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
}

.cafe-item-card {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.cafe-item-card:hover {
  background: var(--color-blue-light);
  transform: translateY(-2px);
}

.cafe-item-emoji {
  font-size: 2.2rem;
}

.cafe-item-details h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
}

.cafe-item-details p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.cafe-item-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-blue-royal);
}

.dark-theme .cafe-item-price {
  color: var(--color-blue-medium);
}

/* Cuenta / Pedido */
.cafe-bill-panel {
  background: #fdfdfd;
  border-radius: var(--border-radius-md);
  border: 2px dashed #94a3b8;
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.dark-theme .cafe-bill-panel {
  background: #1e293b;
  border-color: #475569;
}

.bill-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: #1e3a8a;
  text-align: center;
  border-bottom: 2px dashed #94a3b8;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.bill-items-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bill-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.bill-total-section {
  border-top: 2px dashed #94a3b8;
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
}

/* -------------------------------------------------------------
   JUEGO 3: La Machine à Histoires (Mad Libs)
   ------------------------------------------------------------- */
   
.madlibs-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.madlibs-selector {
  display: flex;
  gap: 12px;
}

.madlibs-btn-select {
  flex-grow: 1;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  font-family: var(--font-title);
  cursor: pointer;
  transition: var(--transition);
}

.madlibs-btn-select.active {
  background: var(--color-blue-royal);
  color: white;
  border-color: var(--color-blue-royal);
}

.madlibs-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-item label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.form-item input {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  outline: none;
  font-family: var(--font-body);
}

.madlibs-story-scroll {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #d97706;
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: none;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.madlibs-story-scroll::before {
  content: '📜';
  font-size: 2rem;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.story-text {
  font-family: var(--font-title);
  font-size: 1.3rem;
  line-height: 1.6;
  color: #78350f;
  margin-bottom: 16px;
}

/* -------------------------------------------------------------
   JUEGO 4: Le Journal de 6ème
   ------------------------------------------------------------- */
   
.journal-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .journal-controls {
    flex-direction: column;
  }
}

.search-bar {
  flex-grow: 1;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
}

.search-bar::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
}

.journal-categories {
  display: flex;
  gap: 8px;
}

.journal-cat-btn {
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.journal-cat-btn.active {
  background: var(--color-blue-royal);
  color: white;
  border-color: var(--color-blue-royal);
}

.journal-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.journal-card {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.dark-theme .journal-card {
  background: #1e293b;
}

.journal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.journal-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.journal-card h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--color-blue-royal);
}

.dark-theme .journal-card h3 {
  color: var(--color-blue-medium);
}

.journal-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.journal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.8rem;
}

.btn-read-article {
  background: none;
  border: none;
  color: var(--color-blue-medium);
  font-weight: 700;
  cursor: pointer;
}

/* -------------------------------------------------------------
   JUEGO 5: Le Monstre des Verbes (Gamificación)
   ------------------------------------------------------------- */
   
.monster-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.monster-canvas-container {
  width: 220px;
  height: 220px;
  background: white;
  border-radius: 50%;
  border: 4px solid var(--color-blue-royal);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dark-theme .monster-canvas-container {
  background: #1e293b;
}

.monster-speech {
  background: #fff;
  border: 2px solid var(--color-border);
  padding: 16px 24px;
  border-radius: var(--border-radius-md);
  font-size: 1.25rem;
  font-weight: 700;
  max-width: 500px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.dark-theme .monster-speech {
  background: #1e293b;
}

.monster-speech::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: var(--color-border) transparent;
}

.monster-input-box {
  display: flex;
  gap: 12px;
  max-width: 400px;
  width: 100%;
}

.monster-input-box input {
  flex-grow: 1;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--color-border);
  outline: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-align: center;
  font-weight: 700;
}

.monster-score-board {
  display: flex;
  gap: 24px;
  font-family: var(--font-title);
  font-size: 1.2rem;
}

.monster-badge-score {
  background: var(--color-blue-light);
  color: var(--color-blue-royal);
  padding: 8px 16px;
  border-radius: 20px;
}

/* -------------------------------------------------------------
   JUEGO 6: La Carte aux Trésors de la Francophonie
   ------------------------------------------------------------- */
   
.map-outer-container {
  position: relative;
  width: 100%;
  background: #e0f2fe;
  border-radius: var(--border-radius-md);
  border: 3px solid var(--color-blue-royal);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
}

/* Pines interactivos */
.map-pin {
  cursor: pointer;
  animation: pulse-pin 2s infinite;
  transition: var(--transition);
}

.map-pin:hover {
  transform: scale(1.3);
}

@keyframes pulse-pin {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0.7)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0.7)); }
}

.country-details-box {
  background: white;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--color-blue-royal);
  padding: 20px;
  margin-top: 16px;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.dark-theme .country-details-box {
  background: #1e293b;
}

.country-details-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 8px;
}

.country-details-header h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--color-blue-royal);
}

.dark-theme .country-details-header h3 {
  color: var(--color-blue-medium);
}

.country-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .country-details-grid {
    grid-template-columns: 1fr;
  }
}

.preposition-rule-card {
  background-color: var(--color-blue-light);
  border-left: 4px solid var(--color-blue-medium);
  padding: 12px;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  grid-column: 1 / -1;
}

/* -------------------------------------------------------------
   JUEGO 7: Le Troc de Recettes
   ------------------------------------------------------------- */
   
.recipes-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.recipe-cards-tabs {
  display: flex;
  gap: 12px;
}

.recipe-card-view {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.dark-theme .recipe-card-view {
  background: #1e293b;
}

.recipe-card-view.active {
  display: block;
}

.recipe-meta {
  display: flex;
  gap: 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 8px 0 16px 0;
}

.recipe-grammar-box {
  background: var(--color-orange-light);
  border-left: 4px solid var(--color-orange);
  padding: 12px 16px;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  margin-bottom: 20px;
  font-weight: 600;
  color: #7c2d12;
}

.recipe-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.recipe-ingredients-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ingredient-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.ingredient-check-item input {
  width: 18px;
  height: 18px;
}

.ingredient-check-item.checked {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.recipe-steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  gap: 12px;
  background: var(--color-bg-light);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

.dark-theme .step-item {
  background: #0f172a;
}

.step-number {
  background: var(--color-blue-royal);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-item.completed {
  opacity: 0.6;
}

.step-item.completed .step-number {
  background: var(--color-green);
}

/* -------------------------------------------------------------
   JUEGO 8: Mon Avatar Francophone (Passport Card)
   ------------------------------------------------------------- */
   
.avatar-creator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .avatar-creator-layout {
    grid-template-columns: 1fr;
  }
}

/* Pasaporte en pantalla */
.passport-card {
  background: radial-gradient(circle, #7f1d1d 0%, #450a0a 100%);
  color: #fef08a;
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  height: 260px;
  box-shadow: var(--shadow-lg);
  border: 4px solid #b91c1c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  font-family: 'Times New Roman', Times, serif;
}

.passport-card::before {
  content: 'RÉPUBLIQUE FRANÇAISE';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: bold;
}

.passport-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  margin-top: 24px;
}

.passport-photo {
  width: 80px;
  height: 100px;
  background: #f8fafc;
  border: 2px solid #fef08a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.passport-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-size: 0.75rem;
}

.passport-details div span {
  color: white;
  font-family: var(--font-body);
}

.passport-footer {
  text-align: right;
  font-size: 0.7rem;
  font-style: italic;
}

.passport-print-area {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* -------------------------------------------------------------
   JUEGO 9: L'Aventurier des Sons (Fonética)
   ------------------------------------------------------------- */
   
.phonetics-soundboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.sound-set-card {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  padding: 20px;
}

.dark-theme .sound-set-card {
  background: #1e293b;
}

.sound-set-card h3 {
  font-family: var(--font-title);
  color: var(--color-blue-royal);
  margin-bottom: 6px;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.sound-btn {
  background: var(--color-blue-light);
  border: 1px solid var(--color-blue-medium);
  padding: 14px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.sound-btn:hover {
  transform: translateY(-2px);
  background: var(--color-blue-medium);
  color: white;
}

.sound-btn-text {
  font-weight: 700;
  font-size: 1.1rem;
}

.sound-btn-trans {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Minijuego de sonidos */
.sound-game-panel {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 2px solid var(--color-lavender);
  border-radius: var(--border-radius-md);
  padding: 24px;
  text-align: center;
}

.sound-game-btn-play {
  font-size: 1.5rem;
  padding: 12px 24px;
  background: var(--color-lavender);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sound-game-options {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

/* -------------------------------------------------------------
   JUEGO 10: Le Grand Quiz
   ------------------------------------------------------------- */
   
.quiz-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.quiz-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.quiz-progress-container {
  flex-grow: 1;
  background: var(--color-border);
  height: 10px;
  border-radius: 5px;
  margin: 0 16px;
  overflow: hidden;
}

.quiz-progress-bar {
  background: var(--color-blue-medium);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-timer-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-blue-royal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.quiz-timer-box.warning {
  background: var(--color-murcia-tomato);
  animation: pulse-slow 0.8s infinite;
}

.quiz-question-box {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dark-theme .quiz-question-box {
  background: #1e293b;
}

.quiz-question-text {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.quiz-options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option-btn {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 14px 20px;
  border-radius: var(--border-radius-sm);
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: var(--transition);
}

.dark-theme .quiz-option-btn {
  background: #0f172a;
}

.quiz-option-btn:hover {
  background-color: var(--color-blue-light);
  transform: translateX(4px);
}

.quiz-option-btn.correct {
  background-color: #d1fae5;
  border-color: var(--color-green);
  color: #065f46;
}

.quiz-option-btn.wrong {
  background-color: #fee2e2;
  border-color: var(--color-murcia-tomato);
  color: #991b1b;
}

.quiz-explanation-box {
  background-color: #fef9c3;
  color: #713f12;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  margin-top: 16px;
  display: none;
}

.quiz-results-screen {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.medal-display {
  font-size: 6rem;
  animation: bounce 2s infinite;
}

.btn-next-q {
  align-self: flex-end;
  background: var(--color-blue-royal);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-weight: 700;
  display: none;
}

/* -------------------------------------------------------------
   ZONA: EL HUERTO MURCIANO (Verger de Murcia)
   ------------------------------------------------------------- */
   
.verger-board {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
}

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

.verger-farm-field {
  background: radial-gradient(circle, #fef08a 0%, #eab308 100%);
  border: 4px dashed #854d0e;
  border-radius: var(--border-radius-md);
  padding: 20px;
  min-height: 280px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 16px;
}

.verger-crop-item {
  font-size: 3rem;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s;
  padding: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
}

.verger-crop-item:active {
  cursor: grabbing;
}

.verger-basket-target {
  background: linear-gradient(180deg, #d97706 0%, #78350f 100%);
  border: 5px solid #451a03;
  border-radius: 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: white;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.verger-basket-target::before {
  content: '🧺';
  font-size: 4rem;
  margin-bottom: 10px;
}

.basket-counter {
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
}

/* -------------------------------------------------------------
   LA RULETA DE SALUDOS
   ------------------------------------------------------------- */
   
.wheel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

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

.wheel-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--color-blue-royal);
  box-shadow: var(--shadow-md);
  transition: transform 4s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid var(--color-murcia-tomato);
  z-index: 10;
}

.wheel-result-card {
  background: white;
  border: 2px solid var(--color-blue-medium);
  border-radius: var(--border-radius-md);
  padding: 20px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dark-theme .wheel-result-card {
  background: #1e293b;
}

/* -------------------------------------------------------------
   ÁRBOL GENEALÓGICO
   ------------------------------------------------------------- */
   
.family-tree-field {
  background: radial-gradient(circle, #e2f1e9 0%, #a7f3d0 100%);
  border: 4px dashed #047857;
  border-radius: var(--border-radius-md);
  padding: 24px;
  min-height: 480px;
  position: relative;
}

.family-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
}

.family-member-node {
  background: white;
  border: 2px solid #059669;
  border-radius: var(--border-radius-sm);
  padding: 12px;
  width: 130px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.node-photo-slot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 2px dashed #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* -------------------------------------------------------------
   EL HORARIO INTERACTIVO (Emploi du Temps)
   ------------------------------------------------------------- */
   
.emploi-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.emploi-pistas-box {
  background: #fffbeb;
  border-left: 4px solid var(--color-murcia-lemon);
  padding: 16px;
  border-radius: var(--border-radius-sm);
}

.emploi-pistas-box ul {
  list-style-type: none;
  padding-left: 10px;
}

.emploi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

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

.emploi-day-column {
  background: white;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.dark-theme .emploi-day-column {
  background: #1e293b;
}

.emploi-day-header {
  background: var(--color-blue-royal);
  color: white;
  padding: 8px;
  text-align: center;
  font-weight: 700;
}

.emploi-slot-target {
  flex-grow: 1;
  padding: 12px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5e1;
  margin: 8px;
  border-radius: var(--border-radius-sm);
}

.subject-tag {
  background: var(--color-blue-light);
  border: 1px solid var(--color-blue-medium);
  padding: 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* -------------------------------------------------------------
   EL RELOJ INTERACTIVO
   ------------------------------------------------------------- */
   
.clock-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.clock-face-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 8px solid var(--color-blue-royal);
  background: white;
  position: relative;
  box-shadow: var(--shadow-md);
}

.clock-center-dot {
  width: 12px;
  height: 12px;
  background: var(--color-murcia-tomato);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.clock-hand-hour {
  width: 4px;
  height: 45px;
  background: var(--color-blue-royal);
  position: absolute;
  bottom: 50%;
  left: calc(50% - 2px);
  transform-origin: bottom center;
  border-radius: 4px;
  transition: transform 0.5s ease;
}

.clock-hand-minute {
  width: 3px;
  height: 65px;
  background: var(--color-text-muted);
  position: absolute;
  bottom: 50%;
  left: calc(50% - 1.5px);
  transform-origin: bottom center;
  border-radius: 3px;
  transition: transform 0.5s ease;
}

/* -------------------------------------------------------------
   RINCÓN DEL PROFESOR
   ------------------------------------------------------------- */
   
.prof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .prof-grid {
    grid-template-columns: 1fr;
  }
}

.progress-students-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.student-progress-row {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.student-bar-bg {
  background: var(--color-border);
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
}

.student-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue-medium), var(--color-green));
  border-radius: 7px;
}

.lomloe-table-container {
  overflow-x: auto;
  margin-top: 16px;
}

.lomloe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.lomloe-table th, .lomloe-table td {
  border: 1px solid var(--color-border);
  padding: 10px;
  text-align: left;
}

.lomloe-table th {
  background-color: var(--color-blue-royal);
  color: white;
}

/* Creador de Fichas Dinámicas */
.card-builder-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dynamic-cards-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.dynamic-card {
  background: white;
  border: 2px solid var(--color-blue-royal);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  width: 140px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  animation: modalScaleUp 0.3s ease-out;
}

.dark-theme .dynamic-card {
  background: #1e293b;
}

.dynamic-card-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.dynamic-card-fr {
  font-weight: 700;
  color: var(--color-blue-royal);
}

.dark-theme .dynamic-card-fr {
  color: var(--color-blue-medium);
}

/* -------------------------------------------------------------
   ANIMACIONES COMUNES
   ------------------------------------------------------------- */
   
@keyframes pulse-slow {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.95; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* -------------------------------------------------------------
   PESTAÑAS DE SECCIÓN SECUNDARIAS (NIVEL 6º)
   ------------------------------------------------------------- */

.sub-tabs-container {
  display: flex;
  gap: 16px;
  margin: 20px 0 28px 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.dark-theme .sub-tabs-container {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

.sub-tab-btn {
  flex-grow: 1;
  background: none;
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dark-theme .sub-tab-btn {
  color: #e2e8f0;
}

.sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.dark-theme .sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sub-tab-btn.active {
  background: var(--color-blue-royal);
  color: white !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.dark-theme .sub-tab-btn.active {
  background: var(--color-blue-medium);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
