* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  color: #2d3748;
  padding: 1.5rem;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ============================= */
/* HEADER MODERNIZADO */
/* ============================= */

.header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: white;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Efecto de fondo animado sutil */
.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  animation: pulseGlow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(10%, 10%) scale(1.1);
    opacity: 0.3;
  }
}

.flag-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* Banderas modernas con emojis y efectos */
.union-jack {
  font-size: 4rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  animation: floatFlag 3s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.union-jack:hover {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 12px 24px rgba(59, 130, 246, 0.4));
}

/* Animación flotante para las banderas */
@keyframes floatFlag {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Título principal - CORREGIDO para mostrar banderas */
h1 {
  font-size: 2.75rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -1px;
  color: #ffffff;
  position: relative;
  z-index: 1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.subtitle {
  position: relative;
  display: inline-block;
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 400;
  color: #cbd5e1;
  z-index: 1;
  letter-spacing: 0.3px;
}

/* Barra animada con ancho proporcional al texto */
.subtitle::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1.2rem;
  transform: translateX(-50%);
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, #10b981 30%, #10b981 70%, transparent);
  box-shadow:
    0 0 8px rgba(16, 185, 129, 0.6),
    0 0 20px rgba(16, 185, 129, 0.4),
    0 0 40px rgba(16, 185, 129, 0.2);
  animation: introSweep 1s ease-out forwards, glowBar 4s 1s ease-in-out infinite;
}

/* Efecto inicial al cargar */
@keyframes introSweep {
  0% {
    transform: translateX(-50%) scaleX(1.3);
    opacity: 0;
    box-shadow:
      0 0 18px rgba(16,185,129,.9),
      0 0 36px rgba(16,185,129,.7),
      0 0 60px rgba(16,185,129,.5);
    filter: blur(1px);
  }
  60% { opacity: 1; }
  100% {
    transform: translateX(-50%) scaleX(1);
    filter: blur(0);
  }
}

/* Respiración suave */
@keyframes glowBar {
  0%, 100% {
    transform: translateX(-50%) scaleX(1);
    opacity: .9;
    box-shadow:
      0 0 8px rgba(16,185,129,.6),
      0 0 20px rgba(16,185,129,.4),
      0 0 40px rgba(16,185,129,.2);
  }
  50% {
    transform: translateX(-50%) scaleX(1.1);
    opacity: 1;
    box-shadow:
      0 0 12px rgba(16,185,129,.8),
      0 0 28px rgba(16,185,129,.6),
      0 0 50px rgba(16,185,129,.4);
  }
}

/* Respeto a "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
  .subtitle::after { animation: none; }
}

.flag-icon {
  width: 72px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  cursor: pointer;
  filter: brightness(1.05) saturate(1.15);
}

.flag-icon:hover {
  transform: scale(1.15) rotate(3deg);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  filter: brightness(1.15) saturate(1.2);
}

/* Pequeña animación de flotación continua */
@keyframes flagFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.flag-icon {
  animation: flagFloat 4s ease-in-out infinite;
}

/* ============================================ */
/* PANEL DE PROGRESO Y LOGROS */
/* ============================================ */

.progress-dashboard {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.dashboard-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-buttons {
  display: flex;
  gap: 0.75rem;
}

.info-btn,
.export-btn,
.import-btn,
.reset-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.info-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.info-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.reset-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.reset-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.export-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.export-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.import-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.import-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

/* Grid de Estadísticas */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/* PROGRESO CIRCULAR - TEORÍA Y PRÁCTICA */
/* ============================================ */

.progress-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 100%;
}

.progress-card .card-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.circular-progress {
  position: relative;
  width: 180px;
  height: 180px;
}

.circular-progress svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circular-progress circle {
  fill: none;
  stroke-width: 8;
}

.progress-bg {
  stroke: #e2e8f0;
}

.progress-fill {
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.progress-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  text-transform: capitalize;
}


/* Estadísticas Rápidas */
.stats-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  transform: translateX(4px);
}

.stat-icon {
  font-size: 2rem;
  line-height: 1;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Logros */
.achievements-card {
  grid-column: span 2;
}

.achievements-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-radius: 10px;
  border: 2px solid #fbbf24;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-item.locked {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  opacity: 0.6;
}

.achievement-item:not(.locked):hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 8px 16px rgba(251, 191, 36, 0.3);
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  filter: grayscale(0);
}

.achievement-item.locked .achievement-icon {
  filter: grayscale(1);
}

.achievement-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.achievement-desc {
  font-size: 0.625rem;
  color: #64748b;
  line-height: 1.2;
}

/* Animación de desbloqueo */
@keyframes unlockAnimation {
  0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.achievement-item.just-unlocked {
  animation: unlockAnimation 0.6s ease;
}

/* Racha de Estudio */
.streak-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border: 2px solid #fb923c;
}

.streak-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: flickerFlame 2s infinite;
}

@keyframes flickerFlame {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.2); }
}

.streak-content {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.streak-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ea580c;
  line-height: 1;
}

.streak-label {
  font-size: 0.875rem;
  color: #92400e;
  font-weight: 600;
}

.streak-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(234, 88, 12, 0.2);
}

.streak-footer small {
  font-size: 0.75rem;
  color: #92400e;
  opacity: 0.8;
}

/* Indicadores Visuales en Botones */
.completed-indicator {
  display: inline-block;
  margin-right: 0.25rem;
  font-size: 0.875rem;
}

.btn-completado {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  font-weight: 600 !important;
  position: relative;
  overflow: hidden;
}

.btn-completado::after {
  content: '✓';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 1. PROGRESO SEMANAL */
.weekly-progress-card {
  display: flex;
  flex-direction: column;
}

.weekly-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.week-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.week-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.week-bar-label {
  color: #64748b;
  font-weight: 500;
}

.week-bar-percent {
  color: #1e293b;
  font-weight: 600;
  font-size: 0.875rem;
}

.week-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.week-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 4px;
  transition: width 0.8s ease;
  position: relative;
}

.week-bar-fill.empty {
  background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

.week-bar-item:hover .week-bar-fill {
  filter: brightness(1.1);
}

/* 2. ÚLTIMAS ACTIVIDADES */
.recent-activity-card {
  display: flex;
  flex-direction: column;
}

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  transition: all 0.3s ease;
}

.activity-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.activity-icon {
  font-size: 1.5rem;
  line-height: 1;
  min-width: 24px;
  text-align: center;
}

.activity-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.activity-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.activity-time {
  font-size: 0.75rem;
  color: #64748b;
}

.activity-item.teoria {
  border-left-color: #3b82f6;
}

.activity-item.ejercicio {
  border-left-color: #10b981;
}

.activity-item.examen {
  border-left-color: #f59e0b;
}

.activity-item.logro {
  border-left-color: #eab308;
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
}

.activities-list.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* 3. PRÓXIMO OBJETIVO */
.next-goal-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
}

.goal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.goal-icon {
  font-size: 3rem;
  filter: grayscale(0.3);
  animation: pulseGoal 2s infinite;
}

@keyframes pulseGoal {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.goal-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
  text-align: center;
}

.goal-progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.goal-progress-bar {
  width: 100%;
  height: 12px;
  background: #e0e7ff;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1e40af 100%);
  border-radius: 6px;
  transition: width 0.8s ease;
  position: relative;
}

.goal-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.goal-current {
  color: #1e40af;
  font-weight: 700;
}

.goal-target {
  color: #64748b;
  font-weight: 600;
}

.goal-message {
  text-align: center;
  color: #1e40af;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.goal-content.completed {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.goal-content.completed .goal-name {
  color: #047857;
}

.goal-content.completed .goal-message {
  color: #047857;
}

.course-info {
  padding: 2rem 1.5rem;
  background: linear-gradient(to bottom, #eff6ff 0%, #dbeafe 100%);
  border-bottom: 1px solid #e2e8f0;
}

.info-text {
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-block;
  width: 100%;
}

.info-text:hover {
  transform: scale(1.05);
  color: #1a2332;
  font-weight: 600;
}

.themes-accordion {
  padding: 1.5rem;
  background: #fafbfc;
}

.theme-section {
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.theme-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.theme-toggle {
  width: 100%;
  padding: 1.4rem 1.25rem;
  background: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a2332;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: linear-gradient(to right, #f8fafb 0%, #f1f5f9 100%);
}

.theme-toggle.active {
  background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
  color: white;
}

.theme-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.theme-number {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.theme-toggle.active .theme-number {
  background: white;
  color: #1a2332;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 1.3rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.theme-toggle.active .arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.weeks-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.weeks-content.open {
  max-height: 1000px;
}

.weeks-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem;
}

.weeks-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.weeks-table thead {
  background: linear-gradient(to bottom, #f8fafb 0%, #f1f5f9 100%);
}

.weeks-table th {
  padding: 1.1rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #1a2332;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.9rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.weeks-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.weeks-table tbody tr {
  transition: background 0.2s ease;
}

.weeks-table tbody tr:hover {
  background: #f8fafb;
}

.week-name {
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
}

.table-link {
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Teoría - Azul elegante */
.teoria-btn {
  background: #eff6ff;
  color: #1e40af;
  border: 1.5px solid #3b82f6;
}

.teoria-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Ejercicios - Morado moderno */
.ejercicios-btn {
  background: #faf5ff;
  color: #7c3aed;
  border: 1.5px solid #8b5cf6;
}

.ejercicios-btn:hover {
  background: #8b5cf6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Exámenes - Naranja cálido */
.examenes-btn {
  background: #fff7ed;
  color: #ea580c;
  border: 1.5px solid #f97316;
}

.examenes-btn:hover {
  background: #f97316;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Extras - Rosa profesional */
.extras-btn {
  background: #fdf2f8;
  color: #be185d;
  border: 1.5px solid #ec4899;
}

.extras-btn:hover {
  background: #ec4899;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Contenido - Verde menta */
.contenido-btn {
  background: #f0fdf4;
  color: #059669;
  border: 1.5px solid #10b981;
}

.contenido-btn:hover {
  background: #10b981;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ============================= */
/* Estilos para la Modal */
/* ============================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(26, 35, 50, 0.65);
  backdrop-filter: blur(6px);
}

.modal-content {
  background: #ffffff;
  margin: 8% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 680px;
  max-height: 80vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid #e2e8f0;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2.5rem 1rem 2.5rem;
  flex-shrink: 0;
}

.modal-content h2#modal-title {
  margin: 0;
  padding: 0 0 1rem 0;
  font-size: 1.6rem;
  color: #1a2332;
  border-bottom: 3px solid #10b981;
  font-weight: 700;
  flex: 1;
}

.close {
  font-size: 1.8rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  margin: 0 0 0 1rem;
  background: none;
  border: none;
  flex-shrink: 0;
}

.close:hover {
  color: #1a2332;
  transform: scale(1.1) rotate(90deg);
}

#modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 2.5rem 2.5rem 2.5rem;
  flex: 1;
}

#modal-body ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

#modal-body li {
  background: #f8fafb;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: #2d3748;
  line-height: 1.6;
  transition: all 0.2s ease;
}

#modal-body li:hover {
  background: #f1f5f9;
  border-left-color: #059669;
  transform: translateX(4px);
}

#modal-body::-webkit-scrollbar {
  width: 8px;
}

#modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb {
  background: #10b981;
  border-radius: 10px;
  transition: background 0.3s ease;
}

#modal-body::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

#modal-body {
  scrollbar-width: thin;
  scrollbar-color: #10b981 #f1f5f9;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================ */
/* FOOTER */
/* ============================================ */

.footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem 1.5rem;
  margin: 3rem 2rem 2rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
  font-weight: 500;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border-color: currentColor;
}

.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-link.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #ffffff;
}

.social-link.github:hover {
  background: #333;
  border-color: #333;
  color: #ffffff;
}

.social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  border-color: #e1306c;
  color: #ffffff;
}

.social-link.tiktok:hover {
  background: #000000;
  border-color: #fe2c55;
  color: #ffffff;
}

.social-link.youtube:hover {
  background: #ff0000;
  border-color: #ff0000;
  color: #ffffff;
}

.social-link.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
}

.footer-copyright {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

/* ============================================ */
/* MODAL DE INFORMACIÓN */
/* ============================================ */

.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.info-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.info-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.info-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.info-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.info-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.info-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.info-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
}

.info-section.warning {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.info-section.tip {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.info-section h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.info-section p {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
}

.info-section ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.8;
}

.info-section ul li {
  margin-bottom: 0.5rem;
}

.info-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.info-modal-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-modal-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }
  
  .union-jack {
    font-size: 3rem;
    display: flex;
    align-items: center;
  }
  
  .header {
    padding: 2.5rem 1.5rem;
  }
  
  .theme-toggle {
    padding: 1.2rem 1rem;
    font-size: 0.95rem;
  }
  
  .weeks-table th,
  .weeks-table td {
    padding: 0.9rem 0.7rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .achievements-card {
    grid-column: span 1;
  }
  
  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .header-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .info-btn,
  .reset-btn {
    width: 100%;
    justify-content: center;
  }
  
  .info-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .info-modal-header {
    padding: 1rem;
  }
  
  .info-modal-body {
    padding: 1rem;
  }
  
  .footer {
    padding: 2rem 1.5rem 1rem;
    border-radius: 15px;
    margin: 2rem 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .social-links {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }
  
  h1 {
    font-size: 1.65rem;
  }
  
  .subtitle {
    font-size: 0.95rem;
  }
  
  .union-jack {
    font-size: 2.5rem;
  }
  
  .flag-container {
    gap: 1.5rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 15% auto;
  }
  
  #modal-body li {
    font-size: 0.92rem;
    padding: 0.75rem 0.85rem;
  }
  
  .footer {
    padding: 1.5rem 1rem;
    border-radius: 12px;
  }
  
  .social-links {
    grid-template-columns: 1fr;
  }
  
  .social-link span {
    display: block;
  }
}

/* Animaciones para notificaciones */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* Círculos diferenciados por color */
.progress-fill-teoria {
  stroke: #3b82f6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease;
}

.progress-fill-practica {
  stroke: #10b981;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease;
}

/* Botón de completar teoría */
.complete-theory-container {
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  border: 2px solid #3b82f6;
  max-width: 700px;
}

.complete-theory-btn {
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.complete-theory-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.complete-theory-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.complete-theory-message {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  color: #059669;
  font-weight: 600;
  font-size: 1rem;
}

/* ============================================ */
/* CÍRCULOS DIFERENCIADOS - TEORÍA Y PRÁCTICA */
/* ============================================ */

.progress-fill-teoria {
  stroke: #3b82f6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease;
}

.progress-fill-practica {
  stroke: #10b981;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease;
}

/* ============================================ */
/* CALENDARIO DE ACTIVIDAD */
/* ============================================ */

.activity-calendar-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Navegación del calendario */
.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  gap: 0.5rem;
}

.calendar-nav-btn {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #3b82f6;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.calendar-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: #94a3b8;
}

.calendar-date-range {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
}

/* Grid del calendario */
.activity-calendar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  padding: 0 0.4rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  padding: 0.4rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.3rem;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
}

.calendar-day:hover {
  opacity: 0.8;
}

.calendar-day.active {
  background: #dcfce7;
}

.calendar-day.inactive {
  background: #f1f5f9;
}

.calendar-day.today {
  background: #dbeafe;
  font-weight: 700;
  color: #1e40af;
}

/* Estadísticas del calendario */
.calendar-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid #e2e8f0;
}

.calendar-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #92400e;
}

.calendar-stat-item .stat-icon {
  font-size: 1.2rem;
}

/* ============================================ */
/* RESUMEN SEMANAL MOTIVACIONAL */
/* ============================================ */

.weekly-summary-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weekly-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  transition: all 0.3s ease;
}

.summary-item:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.summary-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
}

.summary-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.motivational-message {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 8px;
  text-align: center;
  border: 2px dashed #f59e0b;
}

.motivational-message p {
  margin: 0.25rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #92400e;
}

.motivational-message p:first-child {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
