:root {
    /* Dark Mode Colors (Current) */
    --bg-color-dark: #0a0a0a;
    --bg-color-medium: #111111;
    --bg-color-light: #1a1a1a;
    --accent-color: #ffcc00; /* Amarillo vibrante para acentos */
    --text-color-light: #fff;
    --text-color-medium: #ccc;
    --text-color-dark: #e0e0e0;
    --border-color: #333;
    --whatsapp-color: #25D366;
    --whatsapp-hover-color: #1DA851;
    --primary-color: #ffb700; /* Morado para elementos principales */
    --primary-dark-color: #ffae00; /* Morado más oscuro para hover */
    --secondary-color: #00bcd4; /* Cian para elementos secundarios */
    --secondary-dark-color: #0097a7; /* Cian más oscuro para hover */
    --card-background-color: #1e1e1e; /* Fondo para tarjetas/secciones internas */
    --heading-color: var(--accent-color); /* Color por defecto para títulos */
    --code-bg-color: #3e3e3e; /* Fondo para bloques de código */
    --table-header-bg: #0f0f0f; /* Fondo de cabecera de tabla */
}

/* Light Mode Colors */
html.light-mode {
    --bg-color-dark: #f0f0f0;
    --bg-color-medium: #ffffff;
    --bg-color-light: #e0e0e0;
    --accent-color: #ff8c00; /* Un acento ligeramente diferente para modo claro */
    --text-color-light: #333;
    --text-color-medium: #555;
    --text-color-dark: #222;
    --border-color: #bbb;
    --whatsapp-color: #128C7E; /* Verde WhatsApp más oscuro para contraste */
    --whatsapp-hover-color: #075E54;
    --primary-color: #ff8000; /* Morado claro para light mode */
    --primary-dark-color: #ffa600; /* Morado más oscuro para hover */
    --secondary-color: #00838F; /* Cian más oscuro para light mode */
    --secondary-dark-color: #005f6b; /* Cian oscuro para hover */
    --card-background-color: #f7f7f7;
    --heading-color: var(--accent-color);
    --code-bg-color: #f0f0f0;
    --table-header-bg: #e9e9e9;
}

html { scroll-behavior: smooth; }

/* Global styles for improved readability */
body {
    background: linear-gradient(145deg, var(--bg-color-dark), var(--bg-color-medium));
    color: var(--text-color-medium);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0 20px 50px;
    line-height: 1.6;
    padding-left: 280px; /* Ajuste inicial para la navegación fija en desktop */
    box-sizing: border-box; /* Asegura que el padding no añada ancho total */
    transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease; /* Transición para padding-left */
    overflow-x: hidden; /* Evita el scroll horizontal en todas las situaciones */
}

h1, h2, h3, h4 {
    margin-top: 1.5em; /* Más espacio encima de los encabezados */
    margin-bottom: 0.8em; /* Más espacio debajo de los encabezados */
    line-height: 1.2; /* Interlineado más ajustado para encabezados */
}

p {
    margin-bottom: 1em; /* Espaciado consistente entre párrafos */
}

ul, ol {
    margin-bottom: 1em; /* Espacio después de las listas */
    padding-left: 20px; /* Sangría ligera para las listas */
}

li {
    margin-bottom: 0.5em; /* Espaciado entre elementos de lista */
}

/* Table readability */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.95em;
    border-radius: 8px;
    overflow: hidden; /* Asegura que los bordes redondeados se apliquen */
}

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

table th {
    background-color: var(--table-header-bg);
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

table td {
    background-color: var(--bg-color-light); /* Fondo de celda */
}
html.light-mode table td {
    background-color: #e9e9e9; /* Fondo más claro en modo claro */
}

/* Footer alignment fix */
footer {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los elementos horizontalmente */
    text-align: center; /* Fallback para navegadores antiguos o contenido específico */
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-color-medium); /* Texto más claro para el pie de página */
    font-size: 14px;
}

/* Particles container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Envía al fondo */
    pointer-events: none; /* Permite la interacción con los elementos de abajo */
}

h1, h2, h3 {
    scroll-margin-top: 120px; /* Ajusta el desplazamiento al hacer clic en un enlace de ancla */
    color: var(--accent-color);
}

h1 {
    text-align: center;
    font-size: 2.8em;
    margin-top: 40px;
    line-height: 1.2;
}

h2 {
    margin-top: 60px; /* Mayor separación */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 2em;
}

h3 {
    color: var(--text-color-dark);
    margin-top: 35px; /* Mayor separación */
    font-size: 1.5em;
}

p {
    margin-bottom: 1em;
}

ul, ol {
    padding-left: 25px;
    margin-bottom: 25px;
}

li {
    margin-bottom: 0.5em;
}

pre {
    background-color: var(--code-bg-color); /* Fondo para código */
    border-left: 4px solid var(--accent-color); /* Borde de acento */
    padding: 15px;
    margin-bottom: 1.5em;
    overflow-x: auto; /* Habilita el desplazamiento horizontal para líneas largas */
    font-family: 'Fira Code', 'Courier New', monospace; /* Fuente monoespaciada para código */
    font-size: 0.9em; /* Fuente ligeramente más pequeña para código */
    line-height: 1.4;
    white-space: pre-wrap; /* Envuelve líneas largas */
    word-wrap: break-word; /* Rompe palabras si son demasiado largas */
    color: var(--text-color-dark); /* Color de texto más oscuro para mejor legibilidad */
    border-radius: 5px; /* Ligeros bordes redondeados */
}

pre b {
    color: var(--accent-color);
}

/* Sidebar Navigation */
#sidebar {
    position: fixed;
    left: -100%; /* Oculta por defecto en móvil */
    top: 0;
    bottom: 0;
    width: 250px; /* Ancho del sidebar */
    background: var(--bg-color-medium); /* Consistente con el tema */
    transition: left 0.3s ease;
    z-index: 1001; /* Z-index más alto que el overlay */
    padding: 30px 20px;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

#sidebar h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#sidebar a {
    color: var(--text-color-medium);
    display: block;
    margin: 10px 0;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
    padding: 5px 0; /* Espacio para hacer clic */
}

#sidebar a:hover {
    color: var(--text-color-light);
}

/* 🔒 Ocultar botón hamburguesa por defecto (PC y todo) */
#toggle-menu {
  display: none;
}

/* 🎯 Overlay general (usado en mobile para cerrar el menú) */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: none; /* Oculto por defecto */
  transition: opacity 0.3s ease;
}
#overlay.active {
  display: block;
  opacity: 1;
}

/* 💻 Solo en DESKTOP (> 768px) */
@media (min-width: 769px) {
  #overlay {
    display: none !important;
  }

  #toggle-menu {
    display: none !important;
  }

  #sidebar {
    left: 0 !important;
    position: fixed;
    width: 240px;
    transition: none;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

  body {
    padding-left: 280px;
  }
}
/* Header */
header {
    background: #000;
    text-align: center;
    padding: 50px 0;
    border-bottom: 3px solid var(--accent-color);
    position: relative; /* Para el theme toggle */
    border-radius: 8px; /* Bordes redondeados */
    margin-bottom: 40px;
}
html.light-mode header {
    background: #fff;
}

header img {
    width: 100%;
    max-width: 700px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.4));
}
html.light-mode header img {
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.4));
}

header h1 {
    color: var(--accent-color);
    font-size: 2.8em;
    margin: 0;
    padding: 0 20px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}
html.light-mode header h1 {
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

/* Call to Action Button */
.call-to-action-button {
    display: inline-block;
    background-color: var(--whatsapp-color);
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    margin-top: 40px;
    font-size: 1.1em;
    text-align: center;
}

.call-to-action-button:hover {
    background-color: var(--whatsapp-hover-color);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
}

/* Styles for narration panel */
#panelNarracion {
    position: fixed;
    right: 20px;
    /* top: auto;  Comentado porque JS lo ajustará */
    bottom: 70px; /* Ajustado para estar encima del botón de narración */
    background: var(--bg-color-medium);
    color: var(--text-color-light);
    padding: 15px;
    border-radius: 8px;
    z-index: 998; /* Menor que el botón, mayor que whatsapp */
    width: 300px;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    opacity: 0; /* Oculto por opacidad para transición */
    visibility: hidden; /* Oculto por visibilidad para transición */
    transform: translateY(10px); /* Ligeramente desplazado */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

#panelNarracion.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#panelNarracion label {
    color: var(--text-color-light);
    font-size: 0.9em;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    margin-bottom: 5px;
    display: block; /* Para que cada label ocupe su propia línea */
}
#panelNarracion select {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 0.9em;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 10px; /* Espacio debajo del select */
}
#panelNarracion button {
    background-color: var(--accent-color);
    color: var(--bg-color-dark);
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    flex-grow: 1; /* Hace que los botones tomen el mismo espacio */
    margin: 0 2px; /* Pequeño espacio entre botones */
}
#panelNarracion button:first-child { margin-left: 0; }
#panelNarracion button:last-child { margin-right: 0; }

#panelNarracion button:hover {
    background-color: #e6b800;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
    transform: translateY(-1px);
}

/* Narration Toggle Button */
#toggleNarrationButton {
    position: fixed;
    bottom: 20px;
    right: 20px; /* JS lo ajustará dinámicamente */
    z-index: 999; /* Sobre el botón de whatsapp, bajo el panel cuando está abierto */
    background-color: var(--primary-color); /* Usando el color primary */
    color: white;
    padding: 10px 15px;
    border-radius: 50px; /* Ovalado */
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 15px rgb(255, 183, 0); /* Sombra morada */
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease, right 0.3s ease; /* Transición para 'right' */
    display: flex;
    align-items: center;
    gap: 8px;
}
#toggleNarrationButton:hover {
    background-color: var(--primary-dark-color); /* Morado oscuro en hover */
    box-shadow: 0 0 20px rgb(255, 196, 0);
    transform: translateY(-2px);
}
/* Estilo para el botón de narración cuando el panel está activo */
#toggleNarrationButton.active {
    background-color: #dc3545; /* Rojo para indicar que está activo */
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.6);
}


/* Main content padding and background */
main {
    padding-left: clamp(24px, 4vw, 50px);
    padding-right: clamp(24px, 4vw, 50px);
    background-color: rgba(17, 17, 17, 0.9); /* Fondo semi-transparente para contenido principal */
    border-radius: 8px;
    margin-top: 20px;
    padding-top: 40px;
    padding-bottom: 40px;
}
html.light-mode main {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 1001;
}
.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}
.theme-switch input {
    display: none;
}
.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}
.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}
input:checked + .slider {
    background-color: var(--accent-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* === RESPONSIVE CORRECTIONS === */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  * {
    box-sizing: border-box;
  }

  #intro {
    margin-top: 20px !important;
  }

  p {
    font-size: 1rem !important;
    margin-top: 10px !important;
    word-break: break-word;
  }

  select, input, button {
    max-width: 100% !important;
  }

  #panelNarracion {
    width: 95% !important;
    right: 2.5% !important;
  }

  div[style*="display:flex"] {
    flex-wrap: wrap !important;
  }
}
@media (max-width: 767px) {
  h2 {
    font-size: 1.5em !important;
  }

  h3 {
    font-size: 1.2em !important;
  }

    h2, h3, h4 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }

  .card, .recuadro, .box, .panel {
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 1rem;
    box-sizing: border-box;
  }

  .card h2, .recuadro h2, .panel h2 {
    font-size: 1.1em;
  }

  .card h3, .recuadro h3, .panel h3 {
    font-size: 1em;
  }
  h1 {
    font-size: 2em !important;
    line-height: 1.3 !important;
    padding: 0 10px;
  }
  .call-to-action-button,
  #toggleNarrationButton,
  #whatsapp-support-button {
    font-size: 0.85em !important;
    padding: 10px 14px !important;
  }
}

/* Estilos para las palabras que serán resaltadas por el narrador */
.tts-word-highlight {
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0 2px;
    border-radius: 3px;
    line-height: 1.5;
    display: inline-block;
}

/* Estilo para la palabra que se está leyendo ACTIVAMENTE */
.tts-highlight-current {
    background-color: var(--accent-color); /* Color de acento para el resaltado */
    color: var(--bg-color-dark); /* Texto oscuro para contraste */
    font-weight: bold;
    box-shadow: 0 0 5px rgba(255, 255, 0, 0.5); /* Sutil sombra */
}

/* Estilo opcional para la siguiente palabra a leer (si quieres un efecto de "pre-resaltado") */
.tts-highlight-next {
    background-color: rgba(var(--accent-color-rgb, 255, 204, 0), 0.3); /* Un color de acento más transparente */
    color: inherit;
}

/* Estilos adicionales para los nuevos módulos y glosario */
.action-plan {
    background-color: var(--card-background-color);
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.action-plan h5 {
    color: var(--accent-color);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.action-plan ul {
    list-style-type: none;
    padding-left: 0;
}
.action-plan ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.action-plan ul li::before {
    content: '👉'; /* Icono de flecha para el plan de acción */
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Eliminar iconos si no se usan más */
.module-icon,
.exercises-section h4 .module-icon,
.action-plan h5 .module-icon,
.glossary-section p .module-icon {
    display: none;
}

.glossary-term {
    font-weight: bold;
    color: var(--accent-color);
}
.glossary-definition {
    margin-left: 20px;
    margin-bottom: 10px;
}

/* Estilos específicos para la nueva sección de plataformas de monetización */
.monetization-platform {
    background-color: var(--card-background-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.monetization-platform h4 {
    color: var(--heading-color);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.monetization-platform p {
    margin-bottom: 10px;
}
.monetization-platform ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}
.monetization-platform a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}
.monetization-platform a:hover {
    text-decoration: underline;
}

/* CSS para Modales */
.modal {
  position: fixed;
  background: rgba(0,0,0,0.9);
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* Alto z-index para que esté por encima de todo */
}
.modal.oculto {
  display: none;
}
.modal-contenido {
  background: var(--bg-color-medium);
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  color: var(--text-color-light);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  position: relative;
}
.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8em;
  cursor: pointer;
  color: var(--text-color-medium);
  transition: color 0.2s ease;
}
.cerrar-modal:hover {
  color: var(--accent-color);
}
.modal-contenido h3 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}
.modal-contenido p {
  text-align: center;
  margin-bottom: 20px;
}
.modal-contenido button {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: background-color 0.3s ease;
}
.modal-contenido button:hover {
  background-color: var(--primary-dark-color);
}

/* Estilos para el botón de solicitud de verificación dentro de los desafíos */
.upload-challenge-proof-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.upload-challenge-proof-button:hover {
    background-color: var(--primary-dark-color);
}

#tsparticles canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
  }
/* Estilo general para secciones premium */
.seccion-premium {
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-top: 40px;
  border-radius: 10px;
  background-color: var(--bg-color-light);
  color: var(--text-color-light);
  transition: opacity 0.5s ease, filter 0.5s ease;
}
.seccion-premium h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  margin-top: 0;
  border-bottom: none;
}
.seccion-premium p {
  margin-bottom: 10px;
}
.seccion-premium button {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.seccion-premium button:hover {
  background-color: var(--secondary-dark-color);
}

/* Estados por defecto */
.seccion-premium .bloqueado {
  display: block;
  background-color: var(--bg-color-medium);
  border: 1px dashed var(--accent-color);
  padding: 10px;
  text-align: center;
  border-radius: 5px;
}
.seccion-premium .desbloqueado {
  display: none;
  background-color: var(--bg-color-medium);
  border: 1px dashed var(--accent-color);
  padding: 10px;
  text-align: center;
  border-radius: 5px;
}

/* Estado cuando tiene permiso */
.seccion-premium.activa .bloqueado {
  display: none !important;
}
.seccion-premium.activa .desbloqueado {
  display: block !important;
}

#premiumSidebarLinks {
  display: block;
  list-style: none;
  padding: 0;
  margin-top: 10px;
}
#premiumSidebarLinks li {
  padding-left: 15px;
}

 /* Oculto por defecto */
  .hidden { display: none !important; }

 /* ============================= */
/* ESTILOS PARA BOTONES DE CTA  */
/* ============================= */

/* Botón de subir ejercicio */
.submission-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-color);
  color: var(--bg-color-dark);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.submission-open-btn:hover {
  background: var(--primary-dark-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.submission-open-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* --------------------------
   Modal Submission Estilos
   -------------------------- */
.submission-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.submission-modal.hidden {
  display: none;
}
.submission-modal__content {
  background: var(--bg-color-medium);
  padding: 32px;
  border-radius: 10px;
  max-width: 480px;
  width: 90%;
  position: relative;
}
.submission-modal__close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color-light);
  cursor: pointer;
}

/* Textarea y Inputs */
#submission-description,
#submission-link {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color-light);
  color: var(--text-color-dark);
}
#submission-description { resize: vertical; }

/* Botón Submit */
#submission-submit {
  width: 100%;
  padding: 14px;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
#submission-submit:hover:not(:disabled) {
  background: var(--secondary-dark-color);
}

/* Drop-Area */
#drop-area {
  position: relative;
  border: 2px dashed var(--secondary-color);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: var(--bg-color-light);
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#drop-area.dragover {
  background: rgba(0,188,212,0.1);
  border-color: var(--secondary-dark-color);
}
.drop-area__inner svg {
  color: var(--secondary-color);
  margin-bottom: 8px;
}
.drop-area__inner p {
  margin: 0;
  color: var(--text-color-medium);
  line-height: 1.4;
}
#submission-files {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Lista de archivos */
#file-list {
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
  max-height: 120px;
  overflow-y: auto;
}
#file-list li {
  background: var(--card-background-color);
  color: var(--text-color-light);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 0.9em;
}


@media (max-width: 768px) {
  /* ================== TÍTULOS RESPONSIVE ================== */
  .action-plan h5,
  .titulo-dinamico,
  h5 {
    font-size: 1em !important;
    text-align: center;
    word-break: break-word;
    white-space: normal !important;
  }

  .action-plan h5 span,
  .action-plan h5 span.tts-word-highlight {
    display: inline !important;
    font-size: inherit !important;
    word-break: normal !important;
    white-space: normal !important;
  }

  /* ================== TABLAS OPTIMIZADAS ================== */
  table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    border-collapse: collapse;
    -webkit-overflow-scrolling: touch;
  }

  table thead,
  table tbody,
  table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  table td,
  table th {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal !important;
    font-size: 0.85em !important;
    line-height: 1.4 !important;
    padding: 6px 5px;
    text-align: left;
  }

  /* ✅ Refuerzo visual para la columna de resultado */
  td:nth-child(3),
  th:nth-child(3) {
    word-break: break-word !important;
    white-space: normal !important;
  }

  /* ================== BLOQUES PREMIUM ================== */
  .contenido-premium.bloqueado {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center;
    gap: 12px;
  }

  .contenido-premium.bloqueado > * {
    width: 100% !important;
  }

  /* ================== AJUSTES GLOBALES ================== */
  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .tts-word-highlight {
    max-width: 100%;
    display: inline-block;
    word-break: break-word;
  }

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  body {
    padding-left: clamp(10px, 4vw, 10px);
    padding-right: clamp(10px, 4vw, 10px);
    padding-top: 60px;
  }

  #main-content {
    margin-top: 20px;
  }

  .call-to-action-button {
    font-size: 0.8em !important;
    padding: 8px 12px !important;
  }

  .fila-flexible,
  .row,
  .flexible-container {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

/* === MEJORAS APLICADAS === */

/* === MEJORAS DE TÍTULOS === */
h1 {
  color: var(--accent-color);
  font-size: 2.8em;
  margin-top: 50px;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.25);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

h2 {
  color: var(--primary-color);
  font-size: 2em;
  margin-top: 60px;
  margin-bottom: 25px;
  border-left: 5px solid var(--primary-dark-color);
  padding-left: 15px;
  background-color: rgba(255, 183, 0, 0.05);
  border-radius: 5px;
}

h3 {
  color: var(--secondary-color);
  font-size: 1.6em;
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 4px solid var(--secondary-dark-color);
  padding-left: 12px;
  background-color: rgba(0, 188, 212, 0.05);
  border-radius: 5px;
}

h4 {
  color: var(--text-color-dark);
  font-size: 1.2em;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
  border-bottom: 1px dashed var(--border-color);
}

/* === LISTAS MEJORADAS === */
ul, ol {
  padding-left: 28px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 0.6em;
  color: var(--text-color-medium);
  line-height: 1.6;
}

li::marker {
  color: var(--accent-color);
}

/* === BLOQUES VISUALES PARA GUÍAS DE HERRAMIENTAS === */
.tool-guide-section {
  background-color: var(--card-background-color);
  padding: 25px;
  border-left: 6px solid var(--accent-color);
  border-radius: 10px;
  margin-top: 50px;
  margin-bottom: 50px;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
}

.tool-guide-section h3 {
  margin-top: 0;
  font-size: 1.8em;
  color: var(--accent-color);
}

.tool-guide-section h4 {
  color: var(--primary-color);
  margin-top: 25px;
}

/* WebKit (Chrome, Safari, Edge) */
#sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-track {
  background: var(--bg-color-medium);
  border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 4px;
  border: 2px solid var(--bg-color-medium);
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-color);
}

/* Firefox */
#sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--bg-color-medium);
}

/* estilo para el botón de cerrar sesión */
#logout-btn {
  background: var(--accent-color);
  color: var(--bg-color-dark);
  border: none;
  padding: .5em 3em;
  border-radius: .5em;
  cursor: pointer;
  font-weight: bold;
  transition: background .2s;
  margin-bottom: 50px;
}
#logout-btn:hover {
  background: var(--primary-dark-color);
}
.tts-start-button {
  margin-top: 6px;
  background-color: #222;
  color: #fff;
  font-size: 0.8em;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}