/* Fuente recomendada */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary: #4A6FA5;
  --secondary: #166088;
  --accent: #4FC3F7;
  --dark: #1A2639;
  --light: #F0F4F8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  display: flex;
  min-height: 100vh;
  background-color: var(--light);
}

aside {
  width: 280px;
  background-color: white;
  padding: 20px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.user-profile {
  text-align: center;
  margin-bottom: 30px;
}

.user-profile img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

nav a {
  padding: 12px 15px;
  text-decoration: none;
  color: var(--dark);
  border-radius: 8px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

nav a:hover,
nav a.active {
  background-color: var(--light);
  color: var(--primary);
}


nav a.active,
nav a:hover {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 600;
}

main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.deshboard {
  display: grid;
  gap: 20px;
}

.calendar {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.metrics {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.metric-box {
  background: white;
  flex: 1;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.esstatisticas {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.circle-graph {
  /* Circle graph- para editar el circulo */
  width: 100%;
  max-width: 4600px;
  margin: 0 auto;
  padding: 20px 0;
}

.circle-graph canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.leyenda {
  list-style: none;
  padding: 0;
  text-align: center;
}

.leyenda li {
  margin: 5px 0;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}

.no-vistas {
  background: #26c6da;
}

.en-aprendizaje {
  background: #f9e2af;
}

.dominadas {
  background: #f4b400;
}

.total {
  background: #999;
}

.racha {
  background: linear-gradient(45deg, #4fc3f7, #1976d2);
  color: white;
  padding: 20px;
  text-align: center;
  border-radius: 10px;
}

.streak-box {
  font-size: 48px;
  font-weight: bold;
}

.circle-graph canvas {
  display: block;
  margin: 0 auto;
  max-width: 300px;
}

#calendario-heatmap {
  display: grid;
  grid-template-columns: repeat(23, 12px);
  grid-auto-rows: 12px;
  gap: 3px;
  margin-top: 10px;
}

.nivel {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
}

.nivel-0 {
  background-color: #eee;
}

.nivel-1 {
  background-color: #b3e5fc;
}

.nivel-2 {
  background-color: #4fc3f7;
}

.nivel-3 {
  background-color: #0288d1;
}

.gantt-semanal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);
}

.fila-dia {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-left: 90px;
}

.fila-dia::before {
  content: attr(data-label);
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--dark);
  width: 80px;
}

.barra {
  height: 12px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 6px;
  width: 0%;
  transition: width 0.8s ease;
  flex-shrink: 0;
}

.cantidad {
  font-size: 13px;
  color: #444;
}

.semana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.dia-box {
  background: #f4f6f9;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 0 0 1px #e0e0e0;
  transition: transform 0.3s ease;
}

.dia-box:hover {
  transform: translateY(-2px);
}

.dia-box strong {
  font-size: 14px;
  color: #333;
}

.barra-progreso {
  height: 6px;
  border-radius: 4px;
  background: #e0e0e0;
  overflow: hidden;
}

.barra-interna {
  height: 100%;
  background: linear-gradient(to right, var(--accent), var(--primary));
  width: 0%;
  transition: width 0.5s ease;
}

.barra-semanal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  background: white;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06);
}

.fila-barra {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fila-barra span:first-child {
  width: 90px;
  font-weight: 600;
  color: var(--dark);
}

.barra-horizontal {
  flex: 1;
  height: 10px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.relleno-barra {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  width: 0;
  transition: width 0.6s ease;
}

.etiqueta-num {
  font-size: 13px;
  min-width: 70px;
  text-align: right;
  color: #444;
}


/* Opcional: Cursor parpadeante al final de la tabla */
.ascii-tabla::after {
  content: "_";
  animation: blink 1s steps(2, start) infinite;
  margin-left: 5px;
  color: var(--dark);
}

@keyframes blink {
  0% { visibility: visible; }
  50% { visibility: hidden; }
  100% { visibility: visible; }
}
.dia-box {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease-out forwards;
}

.dia-box:nth-child(1) { animation-delay: 0.1s; }
.dia-box:nth-child(2) { animation-delay: 0.2s; }
.dia-box:nth-child(3) { animation-delay: 0.3s; }
.dia-box:nth-child(4) { animation-delay: 0.4s; }
.dia-box:nth-child(5) { animation-delay: 0.5s; }
.dia-box:nth-child(6) { animation-delay: 0.6s; }
.dia-box:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ✅ Agrupación visual de flashcards por nivel */
.flashcard-list {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin-top: 20px;
}

.level-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
}

.flashcard-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.flashcard-box {
  background-color: white;
  border: 1px solid #ddd;
  border-left: 6px solid;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.05);
  transition: transform 0.25s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flashcard-box:hover {
  transform: translateY(-6px);
}

.flashcard-box p {
  margin: 0;
  line-height: 1.4;
  color: #444;
  font-size: 15px;
}

.easy-group .flashcard-box { border-left-color: #43A047; }
.medium-group .flashcard-box { border-left-color: #FB8C00; }
.hard-group .flashcard-box { border-left-color: #E53935; }

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  aside {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    gap: 15px;
  }

  .search-bar {
    width: 100%;
  }

  .difficulty-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.contenedor-centrado {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--light); /* opcional: para que no esté sobre fondo blanco puro */
}

.lanzamiento-unidades {
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.lanzamiento-unidades h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.lanzamiento-unidades p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
