/* ==========================================================================
   CODIKA - HOJA DE ESTILOS COMPARTIDA (style.css)
   Alineada con los colores institucionales: Rojo, Blanco, Negro, Azul y Celeste.
   ========================================================================== */

/* --- 1. Variables Globales (Colores del Colegio) --- */
:root {
  --primary-color: #1e40af;       /* Azul institucional */
  --secondary-color: #0ea5e9;     /* Celeste brillante */
  --accent-red: #dc2626;          /* Rojo destacado */
  --accent-black: #111827;        /* Negro para títulos y textos de contraste */
  --bg-color: #f1f5f9;            /* Fondo grisáceo/celeste muy suave */
  --card-bg: #ffffff;             /* Blanco */
  --text-dark: #1e293b;           /* Texto oscuro */
  --text-muted: #64748b;          /* Texto secundario */
  --border-color: #e2e8f0;        /* Bordes suaves */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --font-title: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Reseteos Básicos --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--bg-color);
  font-family: var(--font-body);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.5;
}

/* --- 3. Barra de Navegación Superior (Navbar) --- */
.header-nav {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--card-bg);
  border-bottom: 3px solid var(--primary-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo "Inicio" */
.nav-logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botón de Logo Oficial CODIKA Desplegable */
.brand-logo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.brand-logo-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand-logo-text {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.red-letter, .highlight-letter {
  color: var(--accent-red) !important;
}

/* --- Banner Marquesina Animado (Navbar) --- */
.header-banner-marquee {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: transparent;
  margin-left: 30px;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-ltr 26s linear infinite;
  will-change: transform;
}

.header-banner-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding-right: 550px;
}

.banner-text-primary {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.banner-spacer {
  display: inline-block;
  width: 550px;
}

.banner-text-secondary {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--accent-red);
  letter-spacing: 0.5px;
}

@keyframes marquee-ltr {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0%);
  }
}

@media (max-width: 768px) {
  .header-banner-marquee {
    margin-left: 15px;
  }

  .banner-text-primary,
  .banner-text-secondary {
    font-size: 1.05rem;
  }

  .banner-spacer {
    width: 250px;
  }

  .marquee-item {
    padding-right: 250px;
  }
}

.menu-dropdown-arrow {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--primary-color);
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.brand-logo-btn.active .menu-dropdown-arrow {
  transform: rotate(90deg);
  color: var(--accent-red);
}

/* Menú de Enlaces Horizontales - Emerge fluido desde el icono ▶ hacia la derecha */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  opacity: 0;
  max-width: 0;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  transition: transform 0.42s cubic-bezier(0.25, 1, 0.4, 1),
              max-width 0.48s cubic-bezier(0.25, 1, 0.4, 1),
              opacity 0.35s ease-out;
}

/* Estado Desplegado al hacer clic en el Logo */
.nav-menu.expanded {
  opacity: 1;
  max-width: 1200px;
  transform: scaleX(1);
  pointer-events: auto;
}

.nav-item {
  transition: opacity 0.3s ease;
}

.nav-item a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 50px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-item a:hover,
.nav-item.active a {
  color: white;
  background-color: var(--primary-color);
}

/* Menú Hamburguesa para Móviles */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--accent-black);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* --- 4. Contenedor Principal (Grid del Sistema) --- */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 70px);
}

/* --- 5. Título Lateral / Branding Vertical (Desactivado) --- */
.sidebar-branding {
  display: none !important;
}

.vertical-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: 0.2em;
  user-select: none;
}

.vertical-title span {
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.vertical-title span.highlight-letter {
  color: var(--accent-red);
}

.vertical-title span:hover {
  transform: scale(1.15) translateX(3px);
  color: var(--accent-black);
}

/* --- 6. Área de Contenido General --- */
.content-container {
  display: flex;
  flex-direction: column;
  padding: 40px;
  gap: 30px;
}

/* Eslogan */
.slogan-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.slogan-text {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  color: var(--primary-color);
  background: linear-gradient(135deg, var(--accent-black), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 6px 16px;
  border-right: 4px solid var(--accent-red);
  letter-spacing: 0.5px;
}

/* --- 7. Animaciones --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- 8. Adaptabilidad Básica (Media Queries) --- */
@media (max-width: 992px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar-branding {
    display: none;
  }
  .navbar-brand-mobile {
    display: block;
  }
  .slogan-wrapper {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    align-items: stretch;
  }
  .nav-menu.active {
    display: flex;
    animation: fadeInUp 0.3s ease-out;
  }
  .nav-item {
    text-align: center;
  }
  .nav-item a {
    display: block;
    padding: 12px;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .content-container {
    padding: 24px 16px;
  }
}

/* ==========================================================================
   --- 9. Estilos Específicos para Secuencias Didácticas (Grado 10° y 11°) ---
   ========================================================================== */

.page-header-title {
  margin-bottom: 20px;
}

.page-header-title h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-black);
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* Grilla Principal de Secuencias Didácticas (2 Columnas) */
.secuencias-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 10px;
}

/* Tarjeta Principal de Grado */
.grade-section-card {
  background-color: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease-out;
}

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

/* Grado 10° (Tema Azul) */
.grade-section-card.grade-10 {
  border: 3px solid var(--primary-color);
}

.grade-section-card.grade-10 .grade-header {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08) 0%, rgba(14, 165, 233, 0.12) 100%);
  border-bottom: 2px dashed rgba(30, 64, 175, 0.2);
}

.grade-section-card.grade-10 .grade-title {
  color: var(--primary-color);
}

.grade-section-card.grade-10 .btn-ver-contenido {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.grade-section-card.grade-10 .btn-ver-contenido:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 6px 15px rgba(30, 64, 175, 0.3);
}

/* Grado 11° (Tema Rojo) */
.grade-section-card.grade-11 {
  border: 3px solid var(--accent-red);
}

.grade-section-card.grade-11 .grade-header {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(249, 115, 22, 0.12) 100%);
  border-bottom: 2px dashed rgba(220, 38, 38, 0.2);
}

.grade-section-card.grade-11 .grade-title {
  color: var(--accent-red);
}

.grade-section-card.grade-11 .btn-ver-contenido {
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
}

.grade-section-card.grade-11 .btn-ver-contenido:hover {
  background-color: var(--accent-red);
  color: white;
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
}

/* Encabezado Superior de la Tarjeta de Grado */
.grade-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.grade-header-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grade-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  line-height: 1;
}

.grade-illustration {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.illustration-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.btn-ver-contenido {
  background-color: transparent;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  width: fit-content;
}

/* Cuerpo con Subcategorías (Cuadros de Recursos) */
.grade-body {
  padding: 25px 24px;
  flex-grow: 1;
  background-color: #ffffff;
}

.subcategories-grid {
  display: grid;
  gap: 16px;
}

.subcategories-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.subcategories-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Tarjetas Individuales de Recursos (Guías, Videos, Actividades, Lecturas) */
.subcategory-card {
  background-color: #f8fafc;
  border-radius: 16px;
  padding: 18px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--border-color);
  text-decoration: none;
}

.grade-10 .subcategory-card:hover {
  border-color: var(--primary-color);
  background-color: rgba(30, 64, 175, 0.04);
  transform: translateY(-3px);
}

.grade-11 .subcategory-card:hover {
  border-color: var(--accent-red);
  background-color: rgba(220, 38, 38, 0.04);
  transform: translateY(-3px);
}

.category-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.grade-10 .category-icon-box {
  background-color: rgba(30, 64, 175, 0.1);
  color: var(--primary-color);
}

.grade-11 .category-icon-box {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
}

.subcategory-card:hover .category-icon-box {
  transform: scale(1.1);
}

.category-name {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-black);
  line-height: 1.25;
}

/* Modal Detalle de Recursos */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2500;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeInUp 0.3s ease-out;
}

.modal-card {
  background-color: #ffffff;
  width: 100%;
  max-width: 680px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--accent-black);
}

.modal-card-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--accent-black), var(--primary-color));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-card-header.red-theme {
  background: linear-gradient(135deg, var(--accent-black), var(--accent-red));
}

.modal-card-header h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-card-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background-color: var(--bg-color);
  border-radius: 12px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.resource-item.red-border {
  border-left-color: var(--accent-red);
}

.resource-item:hover {
  background-color: #e2e8f0;
}

.resource-info {
  display: flex;
  flex-direction: column;
}

.resource-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-black);
}

.resource-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-download-resource {
  background-color: var(--accent-black);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-download-resource:hover {
  background-color: var(--primary-color);
}

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

@media (max-width: 640px) {
  .subcategories-grid.cols-4,
  .subcategories-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grade-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   --- 10. Estilos Específicos para Banco de Preguntas ---
   ========================================================================== */

.banco-subtitle {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Barra de Filtros (Grado, Tema, Periodo, Buscar) */
.banco-filters-panel {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 18px;
  padding: 22px 28px;
  box-shadow: var(--shadow-sm);
  margin-top: 15px;
  margin-bottom: 25px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-black);
}

.select-filter {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background-color: #f8fafc;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-filter:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.btn-filter-search {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-black));
  color: white;
  border: none;
  padding: 9px 26px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.2);
}

.btn-filter-search:hover {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-black));
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.25);
}

/* Grilla de Tarjetas de Categorías según el Boceto */
.banco-cards-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.banco-row-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.banco-row-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

.banco-row-center .banco-category-card {
  max-width: 520px;
  width: 100%;
}

/* Estilo Tarjeta Individual (Cajas Azules Institucionales) */
.banco-category-card {
  background-color: var(--card-bg);
  border: 3px solid var(--primary-color);
  border-radius: 20px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  min-height: 140px;
}

.banco-category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
  background: linear-gradient(180deg, #ffffff 0%, rgba(14, 165, 233, 0.04) 100%);
}

.category-card-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-black);
  line-height: 1.4;
}

.questions-tag-badge {
  background-color: rgba(30, 64, 175, 0.08);
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.banco-category-card:hover .questions-tag-badge {
  background-color: var(--primary-color);
  color: white;
}

/* Botón Grande Inferior "Ver todas las Preguntas" */
.banco-bottom-action {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.btn-ver-todas-preguntas {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--accent-black);
  border: 3px solid var(--primary-color);
  padding: 16px 45px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  letter-spacing: 0.5px;
}

.btn-ver-todas-preguntas:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-black) 100%);
  color: white;
  border-color: var(--accent-black);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 992px) {
  .banco-row-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .banco-row-top {
    grid-template-columns: 1fr;
  }
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-ver-todas-preguntas {
    font-size: 1.1rem;
    padding: 12px 30px;
  }
}

/* ==========================================================================
   MÓDULO GENERADOR DE EVALUACIONES (BOCETO CODIKA)
   ========================================================================== */

.text-center-header {
  text-align: center;
  margin-bottom: 25px;
}

.eval-main-heading {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.eval-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Tarjeta Principal del Generador */
.eval-generator-card {
  background: var(--card-bg);
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  transition: var(--transition);
}

.eval-generator-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* Grid de 2 Columnas */
.eval-grid-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 35px;
  align-items: start;
}

/* Columna Izquierda: Temas y Grado */
.eval-col-left {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.eval-left-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.eval-section-label {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-black);
}

/* Selector Grado Pill (10 y 11 elegibles) */
.eval-grado-pill-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  padding: 8px 36px 8px 18px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.eval-grado-pill-select:hover, .eval-grado-pill-select:focus {
  border-color: var(--accent-red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

/* Controles rápidos */
.eval-quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition);
}

.btn-text-action:hover {
  color: var(--accent-red);
}

/* Lista de Checkboxes de Temas */
.eval-topics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
}

.eval-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}

.eval-topic-item:hover {
  border-color: var(--secondary-color);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.eval-topic-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
  margin-top: 2px;
  cursor: pointer;
}

.eval-topic-item label {
  font-size: 0.98rem;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

/* Columna Derecha: Configuración */
.eval-col-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eval-config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eval-config-label {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-black);
}

/* Selectores Pill estilo Boceto */
.eval-select-pill {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  padding: 12px 42px 12px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.eval-select-pill:hover, .eval-select-pill:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* Widget Resumen en Tiempo Real */
.eval-live-summary {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 10px;
}

.eval-live-summary h4 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eval-live-summary ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.93rem;
}

.eval-live-summary li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-dificultad {
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-dificultad.facil {
  background-color: #dcfce7;
  color: #15803d;
}

.badge-dificultad.media {
  background-color: #fef9c3;
  color: #a16207;
}

.badge-dificultad.dificil {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Botón Generar Evaluación (Exacto como Boceto) */
.eval-bottom-action {
  display: flex;
  justify-content: center;
  margin-top: 35px;
}

.btn-generar-evaluacion {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--primary-color);
  border: 3px solid var(--primary-color);
  padding: 14px 45px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.45rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-generar-evaluacion:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn-generar-evaluacion svg {
  transition: transform 0.3s ease;
}

.btn-generar-evaluacion:hover svg {
  transform: rotate(90deg);
}

/* ==========================================================================
   RESULTADO DE LA EVALUACIÓN GENERADA
   ========================================================================== */

.eval-resultado-container {
  margin-top: 30px;
  margin-bottom: 60px;
  animation: fadeIn 0.5s ease-out;
}

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

.eval-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-black);
  color: white;
  padding: 16px 25px;
  border-radius: 16px 16px 0 0;
  flex-wrap: wrap;
  gap: 15px;
}

.eval-toolbar-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.badge-eval-status {
  background-color: #22c55e;
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.eval-toolbar-btns {
  display: flex;
  gap: 12px;
}

.btn-eval-tool {
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-eval-tool.primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-eval-tool.primary:hover {
  background-color: #0284c7;
}

.btn-eval-tool.secondary {
  background-color: #334155;
  color: white;
}

.btn-eval-tool.secondary:hover {
  background-color: #475569;
}

/* Hoja Impresa de Evaluación */
.eval-paper-sheet {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 16px 16px;
  padding: 40px 50px;
  box-shadow: var(--shadow-lg);
}

.eval-paper-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 25px;
  margin-bottom: 30px;
}

.eval-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.eval-header-brand h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 900;
}

.eval-header-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.eval-header-badges {
  display: flex;
  gap: 10px;
}

.paper-badge {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.eval-student-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  margin-bottom: 20px;
}

.field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.field-label {
  font-weight: 700;
  color: var(--accent-black);
}

.field-line {
  color: #94a3b8;
  letter-spacing: -1px;
}

.field-line-bold {
  font-weight: 700;
  color: var(--primary-color);
}

.field-box {
  border: 2px solid var(--primary-color);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 800;
}

.eval-instructions-box {
  background-color: #fffbebf8;
  border-left: 4px solid #f59e0b;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #78350f;
  border-radius: 4px;
}

/* Preguntas */
.eval-questions-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.eval-q-card {
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 20px;
}

.eval-q-header {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-black);
  margin-bottom: 8px;
}

.q-number {
  color: var(--primary-color);
}

.q-topic-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}

.eval-q-text {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.eval-q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
}

.eval-opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.eval-opt-row:hover {
  background-color: #f0f9ff;
  border-color: var(--secondary-color);
}

.eval-opt-row input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.eval-opt-row.highlight-correct {
  background-color: #dcfce7 !important;
  border-color: #22c55e !important;
  font-weight: 700;
}

.eval-paper-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* MEDIA QUERIES RESPONSIVE */
@media (max-width: 992px) {
  .eval-grid-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .eval-paper-sheet {
    padding: 20px 18px;
  }
  .eval-header-top {
    flex-direction: column;
    gap: 10px;
  }
  .btn-generar-evaluacion {
    font-size: 1.15rem;
    padding: 12px 28px;
    width: 100%;
    justify-content: center;
  }
}

/* ESTILOS DE IMPRESIÓN (PRINT) */
@media print {
  .header-nav, .sidebar-branding, .slogan-wrapper, .eval-generator-card, .eval-toolbar, .page-header-title, .sticky-eval-toolbar, .eval-bottom-submit-area {
    display: none !important;
  }
  .main-wrapper {
    display: block !important;
    padding: 0 !important;
  }
  .content-container {
    padding: 0 !important;
  }
  .eval-resultado-container {
    margin: 0 !important;
  }
  .eval-paper-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   ESTILOS DE LA PÁGINA DE REALIZACIÓN DE EVALUACIÓN (CRONÓMETRO DIGITAL)
   ========================================================================== */

.eval-execution-body {
  background-color: #f1f5f9;
  padding-top: 75px; /* Espacio para la barra fija superior */
}

/* BARRA FIJA SUPERIOR DE CONTROL (STICKY EVAL TOOLBAR) */
.sticky-eval-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 75px;
  background-color: var(--accent-black);
  color: white;
  z-index: 2000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.timer-progress-track {
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.15);
}

.timer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color), #22c55e);
  transition: width 1s linear;
}

.toolbar-content-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toolbar-left-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-back-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #1e293b;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid #334155;
  transition: var(--transition);
}

.btn-back-link:hover {
  color: white;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.eval-title-badge-group {
  display: flex;
  flex-direction: column;
}

.badge-brand-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.badge-eval-meta {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* CAJA DEL CRONÓMETRO DIGITAL CENTRAL */
.timer-display-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  padding: 6px 20px;
  border-radius: 50px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.timer-icon-pulse {
  font-size: 1.4rem;
}

.timer-time-digits {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  font-weight: 700;
}

.timer-clock {
  font-family: 'Fira Code', monospace;
  font-size: 1.45rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1.5px;
}

/* ESTADOS DEL CRONÓMETRO */
.timer-display-box.warning-alert {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border-color: #f59e0b;
}

.timer-display-box.warning-alert .timer-clock {
  color: #fbbf24;
}

.timer-display-box.danger-alert {
  background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
  border-color: #ef4444;
}

.timer-display-box.danger-alert .timer-clock {
  color: #fca5a5;
}

.pulse-anim {
  animation: timerPulse 1s infinite alternate;
}

@keyframes timerPulse {
  0% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 0 18px rgba(239, 68, 68, 0.8); }
}

/* ACCIONES DERECHAS */
.toolbar-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-eval-control {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-eval-control.secondary {
  background-color: #334155;
  color: white;
}

.btn-eval-control.secondary:hover {
  background-color: #475569;
}

.btn-eval-control.secondary.is-paused {
  background-color: #f59e0b;
  color: white;
}

.btn-eval-control.primary.submit-btn {
  background-color: #22c55e;
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.btn-eval-control.primary.submit-btn:hover {
  background-color: #16a34a;
  transform: translateY(-1px);
}

/* CAMPOS DEL ESTUDIANTE EN LA HOJA */
.student-name-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--primary-color);
  background: transparent;
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  outline: none;
  transition: var(--transition);
}

.student-name-input:focus {
  border-bottom-color: var(--accent-red);
}

.field-item.full-width {
  grid-column: 1 / -1;
}

.eval-progress-tracker {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 10px 18px;
  border-radius: 10px;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.progress-bar-small {
  flex-grow: 1;
  height: 8px;
  background-color: #e0f2fe;
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill-small {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.eval-bottom-submit-area {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed #cbd5e1;
}

/* MODAL OVERLAY DE RESULTADOS */
.eval-results-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.4s ease-out;
}

.eval-results-modal-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 35px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--primary-color);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.eval-results-modal-card h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 800;
}

.modal-student-name {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 600;
}

.score-display-box {
  display: inline-flex;
  align-items: baseline;
  background: #f8fafc;
  border: 2px solid var(--primary-color);
  padding: 10px 28px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.score-number {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
}

.score-max {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 4px;
}

.performance-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 25px;
}

.performance-badge.superior { background-color: #dcfce7; color: #15803d; }
.performance-badge.alto { background-color: #e0f2fe; color: #0369a1; }
.performance-badge.basico { background-color: #fef9c3; color: #a16207; }
.performance-badge.bajo { background-color: #fee2e2; color: #b91c1c; }

.modal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.metric-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-black);
}

.metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-modal-action {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-modal-action.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-modal-action.primary:hover {
  background-color: var(--accent-black);
}

.btn-modal-action.secondary {
  background-color: #e2e8f0;
  color: var(--text-dark);
}

.btn-modal-action.secondary:hover {
  background-color: #cbd5e1;
}

/* RESPONSIVE TIMING TOOLBAR */
@media (max-width: 992px) {
  .sticky-eval-toolbar {
    height: auto;
  }
  .toolbar-content-container {
    flex-direction: column;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }
  .eval-execution-body {
    padding-top: 130px;
  }
}

/* ==========================================================================
   ESTILOS DE LA PÁGINA COMPARTIR EVALUACIÓN (BOCETO URL Y CÓDIGO)
   ========================================================================== */

.share-header-section {
  margin-bottom: 25px;
}

.share-main-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.share-subtitle {
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* Tarjeta Principal */
.share-main-card {
  background: var(--card-bg);
  border: 2px solid #cbd5e1;
  border-radius: 24px;
  padding: 35px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  transition: var(--transition);
}

.share-grid-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

/* Columna Izquierda */
.share-col-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.share-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-label-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-black);
}

/* URL Input con botón copiar */
.url-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  padding: 4px 6px 4px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.url-input-wrapper:focus-within {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.share-url-field {
  width: 100%;
  border: none;
  background: transparent;
  font-family: 'Fira Code', monospace;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--primary-color);
  outline: none;
}

.btn-copy-url {
  background-color: #f0f9ff;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-copy-url:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* Código de acceso campo */
.code-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 50px;
  padding: 4px 12px 4px 20px;
  transition: var(--transition);
}

.code-input-wrapper:focus-within {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.share-code-field {
  width: 100%;
  border: none;
  background: transparent;
  font-family: 'Fira Code', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-black);
  outline: none;
  letter-spacing: 2px;
}

.btn-toggle-code {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.btn-toggle-code:hover {
  opacity: 1;
}

.code-help-row {
  margin-top: 4px;
}

.toggle-switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}

.toggle-switch-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* Fila de Estado y Botón Ver Resultado */
.share-status-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px dashed var(--border-color);
}

.status-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-label-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-black);
}

.badge-status-pill {
  padding: 6px 20px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  display: inline-block;
}

.badge-status-pill.activo {
  background-color: #dcfce7;
  color: #15803d;
  border: 2px solid #22c55e;
}

.badge-status-pill.inactivo {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 2px solid #ef4444;
}

.btn-toggle-status {
  background: none;
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-toggle-status:hover {
  background-color: #f1f5f9;
}

.share-buttons-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botón Ver Resultado (Pill exacta del boceto) */
.btn-ver-resultado-pill {
  background-color: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  padding: 10px 28px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-ver-resultado-pill:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-iniciar-eval-pill {
  background-color: var(--secondary-color);
  color: white;
  border: 2px solid var(--secondary-color);
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-iniciar-eval-pill:hover {
  background-color: #0284c7;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Toast de notificación */
.toast-notification {
  background-color: var(--accent-black);
  color: #22c55e;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease-out;
}

/* COLUMNA DERECHA: ILUSTRACIONES DEL BOCETO */
.sketch-illustration-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

.globe-link-wrapper {
  width: 200px;
  height: 200px;
  animation: floatSlow 4s ease-in-out infinite alternate;
}

.sketch-globe-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 15px rgba(30, 64, 175, 0.12));
}

.laptop-sketch-wrapper {
  width: 280px;
  height: 190px;
  transition: transform 0.3s ease;
}

.laptop-sketch-wrapper:hover {
  transform: scale(1.03);
}

.sketch-laptop-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

@keyframes floatSlow {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* PANEL DEL DOCENTE DE RESULTADOS */
.teacher-results-panel {
  background-color: #ffffff;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-top: 30px;
  animation: fadeIn 0.4s ease-out;
}

.results-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.results-panel-header h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--primary-color);
  font-weight: 800;
}

.badge-eval-id {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 50px;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  font-size: 0.88rem;
}

.results-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-mini-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-color);
}

.stat-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.empty-results-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  padding: 20px 0;
}

/* RESPONSIVE SHARE PAGE */
@media (max-width: 992px) {
  .share-grid-container {
    grid-template-columns: 1fr;
  }
  .sketch-illustration-container {
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  .share-status-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .share-buttons-group {
    flex-direction: column;
  }
  .btn-ver-resultado-pill, .btn-iniciar-eval-pill {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   ESTILOS DE LA PÁGINA DE ACTIVIDADES - RULETA AL AZAR (BOCETO)
   ========================================================================== */

.ruleta-header-section {
  margin-bottom: 25px;
  text-align: center;
}

.ruleta-main-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

/* Tarjeta Principal de la Ruleta */
.ruleta-app-card {
  background: var(--card-bg);
  border: 2px solid #cbd5e1;
  border-radius: 24px;
  padding: 35px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.ruleta-grid-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 45px;
  align-items: start;
}

/* Columna Izquierda: Escenario de la Ruleta */
.ruleta-col-wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-stage-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

/* Flecha / Indicador Superior de Selección */
.wheel-pointer-arrow {
  position: absolute;
  top: -12px;
  z-index: 100;
  font-size: 2.5rem;
  color: var(--primary-color);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  line-height: 1;
}

.canvas-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#rouletteCanvas {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: transform 0.1s linear;
}

/* Nota Instructiva y Botón GIRAR */
.wheel-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 460px;
  gap: 20px;
  margin-top: 15px;
}

.ruleta-note-box {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  font-size: 0.92rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.35;
}

.curved-arrow-icon {
  font-size: 2rem;
  color: var(--primary-color);
  transform: rotate(-30deg);
  line-height: 1;
}

/* Botón GIRAR (Pill exacto del Boceto con borde azul) */
.btn-girar-ruleta {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--primary-color);
  border: 3px solid var(--primary-color);
  border-radius: 50px;
  padding: 12px 35px;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  user-select: none;
}

.btn-girar-ruleta:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

.btn-girar-ruleta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Columna Derecha: Recuadro Textarea de Nombres */
.ruleta-col-input {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.input-panel-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-black);
}

.badge-student-count {
  background-color: #e0f2fe;
  color: var(--primary-color);
  border: 1px solid #bae6fd;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.input-panel-instruction {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.textarea-wrapper {
  width: 100%;
}

/* Recuadro editable de nombres (un nombre por línea con Enter) */
.names-textarea {
  width: 100%;
  border: 2px solid var(--primary-color);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-black);
  background-color: #ffffff;
  resize: vertical;
  line-height: 1.6;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.names-textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* Botones Rápidos de Herramientas */
.input-panel-actions {
  display: flex;
  gap: 10px;
}

.btn-input-tool {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-input-tool:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Opciones Adicionales */
.ruleta-options-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.toggle-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
}

.toggle-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* MODAL DE CELEBRACIÓN DE GANADOR */
.winner-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.4s ease-out;
}

.winner-modal-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 450px;
  width: 100%;
  padding: 35px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--primary-color);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.winner-confetti-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.winner-modal-card h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--primary-color);
  font-weight: 800;
}

.winner-name-display {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--accent-black);
  background: #f0f9ff;
  border: 2px solid var(--secondary-color);
  padding: 14px 20px;
  border-radius: 16px;
  margin: 18px 0;
  word-break: break-word;
}

.winner-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.winner-modal-btns {
  display: flex;
  gap: 12px;
}

.btn-winner-action {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-winner-action.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-winner-action.primary:hover {
  background-color: var(--accent-black);
}

.btn-winner-action.secondary {
  background-color: #fee2e2;
  color: #b91c1c;
}

.btn-winner-action.secondary:hover {
  background-color: #fca5a5;
}

/* RESPONSIVE RULETA */
@media (max-width: 992px) {
  .ruleta-grid-container {
    grid-template-columns: 1fr;
  }
  .wheel-actions-bar {
    flex-direction: column;
    text-align: center;
  }
}
