* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: #1e293b;
  padding-bottom: 80px;
}

/* Pantalla de Carga */
.splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0052cc, #002e8a);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.hidden { opacity: 0; visibility: hidden; }

.splash-content {
  text-align: center;
  color: #ffffff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 16px;
  animation: pulseLogo 1.8s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.splash-title { font-size: 2.2rem; font-weight: 800; }
.splash-subtitle { font-size: 0.95rem; opacity: 0.85; margin-top: 4px; margin-bottom: 24px; }

.loader-bar {
  width: 180px;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  overflow: hidden;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: #38bdf8;
  border-radius: 10px;
  animation: fillProgress 2.2s ease-in-out forwards;
}

@keyframes fillProgress {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0052cc, #003399);
  color: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}

.header-logo { display: flex; align-items: center; gap: 8px; }
.logo-img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.app-header h1 { font-size: 1.2rem; font-weight: 800; }

.user-stats { display: flex; gap: 6px; font-size: 0.78rem; font-weight: 700; }
.badge-streak, .badge-level, .badge-points {
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 8px;
  border-radius: 16px;
}

/* Mascota */
.mascot-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.mascot-avatar { width: 50px; height: 50px; object-fit: contain; flex-shrink: 0; }
.speech-bubble {
  background: #f0f7ff;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #0369a1;
  line-height: 1.35;
}

/* Vistas */
.app-view { display: none; padding: 16px; animation: fadeIn 0.25s ease-in-out; }
.app-view.active { display: block; }

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

/* Dashboard Cards */
.daily-goal-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.goal-bar { width: 100%; height: 10px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.goal-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, #0052cc); border-radius: 10px; transition: width 0.4s ease; }

.banner-challenge {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
  cursor: pointer;
}

.challenge-tag { font-size: 0.7rem; font-weight: 800; color: #c2410c; text-transform: uppercase; margin-bottom: 4px; }
.banner-challenge h3 { font-size: 0.98rem; color: #7c2d12; margin-bottom: 2px; }
.banner-challenge p { font-size: 0.78rem; color: #9a3412; }

.section-title { margin-bottom: 14px; }
.section-title h2 { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.section-title .subtitle { font-size: 0.82rem; color: #64748b; }

.category-grid { display: flex; flex-direction: column; gap: 12px; }

.module-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.module-card:active { transform: scale(0.98); }

.card-icon {
  font-size: 1.8rem;
  background: #f1f5f9;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-right: 12px;
  flex-shrink: 0;
}

.card-info { flex: 1; }
.card-tag { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; margin-bottom: 4px; }

.tag-lit { background: #e0f2fe; color: #0369a1; }
.tag-geo { background: #dcfce7; color: #15803d; }
.tag-historia { background: #fef3c7; color: #b45309; }
.tag-cultura { background: #f3e8ff; color: #6b21a8; }
.tag-gastro { background: #ffe4e6; color: #be123c; }

.card-info h3 { font-size: 0.95rem; font-weight: 700; color: #1e293b; }
.card-info p { font-size: 0.75rem; color: #64748b; }
.card-arrow { font-size: 1.1rem; color: #94a3b8; margin-left: 8px; }

/* Lección Teórica */
.lesson-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.btn-back {
  background: #e2e8f0;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.mode-pills { display: flex; gap: 6px; }
.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #64748b;
}

.pill.active { background: #0052cc; color: #ffffff; }

.study-article {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.study-article h2 { font-size: 1.25rem; color: #0f172a; margin-bottom: 12px; }
.study-article p { font-size: 0.92rem; color: #334155; line-height: 1.6; margin-bottom: 14px; }
.study-article ul { margin-left: 18px; margin-bottom: 14px; }
.study-article li { font-size: 0.88rem; color: #334155; margin-bottom: 6px; }

.fact-box {
  background: #eff6ff;
  border-left: 4px solid #0052cc;
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  font-size: 0.85rem;
  color: #1e40af;
  margin: 16px 0;
}

.fact-box strong { display: block; margin-bottom: 2px; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: #0052cc;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

/* Serie de Cuestionarios (Multi-preguntas) */
.quiz-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.quiz-header-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
}

.quiz-pts-tag { color: #0052cc; }

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.quiz-progress-fill {
  height: 100%;
  background: #0052cc;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.quiz-question-text {
  font-size: 1.05rem;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 16px;
}

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

.btn-option {
  width: 100%;
  padding: 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-option.correct {
  background-color: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.btn-option.wrong {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* Pantalla de Resumen Final del Quiz */
.summary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 20px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.summary-icon { font-size: 3rem; margin-bottom: 10px; }
.summary-card h2 { font-size: 1.3rem; color: #0f172a; margin-bottom: 6px; }
.summary-card p { font-size: 0.9rem; color: #64748b; margin-bottom: 20px; }

.summary-score-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-score-box span { font-size: 0.8rem; font-weight: 700; color: #1d4ed8; text-transform: uppercase; }
.summary-score-box strong { font-size: 1.6rem; color: #1e40af; }

/* Mapa y Logros */
.map-container { display: flex; flex-direction: column; gap: 10px; }
.location-card { display: flex; align-items: center; background: #ffffff; padding: 12px; border-radius: 14px; border: 1px solid #e2e8f0; cursor: pointer; }
.location-icon { font-size: 1.6rem; margin-right: 12px; }
.location-details { flex: 1; }
.location-details h4 { font-size: 0.92rem; color: #0f172a; }
.location-details p { font-size: 0.75rem; color: #64748b; }
.badge-discover { font-size: 0.72rem; font-weight: 700; color: #0052cc; background: #eff6ff; padding: 4px 10px; border-radius: 12px; }

.achievements-grid { display: flex; flex-direction: column; gap: 10px; }
.achievement-card { display: flex; align-items: center; background: #ffffff; padding: 12px 16px; border-radius: 14px; border: 1px solid #e2e8f0; opacity: 0.55; }
.achievement-card.unlocked { opacity: 1; border-color: #fde047; background: #fefce8; }
.achievement-icon { font-size: 1.8rem; margin-right: 12px; }
.achievement-info h4 { font-size: 0.9rem; color: #1e293b; }
.achievement-info p { font-size: 0.75rem; color: #64748b; }

/* Navegación Inferior */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: #ffffff;
  display: flex;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
  z-index: 100;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  gap: 2px;
  cursor: pointer;
}

.nav-icon { font-size: 1.2rem; }
.nav-btn.active { color: #0052cc; }

.notification-banner {
  position: fixed;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  max-width: 90%;
  text-align: center;
}

.notification-banner.show { top: 16px; }
