/* =========================================
   SINGLE VOCABULARIO (single-vocabulario.php)
   ========================================= */
.navegacion-palabras {
    display: flex;
    justify-content: space-between;
    margin: 50px 0;
    padding: 20px 0;
    border-top: 2px dashed var(--color-borde);
    font-family: var(--font-cuerpo);
}

.navegacion-palabras a {
    text-decoration: none;
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.navegacion-palabras a:hover {
    border: 2px solid var(--color-principal);
    border-radius: 15px 5px 15px 5px; /* Estilo irregular */
    color: var(--color-principal);
}

.label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-texto-claro);
    letter-spacing: 1px;
}

.titulo-nav {
    font-family: var(--font-titulos);
    font-size: 1.4rem;
}

.nav-siguiente {
    text-align: right;
}

.nav-siguiente, .nav-anterior {
    display: inline;
    font-family: var(--font-titulos);
    font-size: 1em;
}

.nav-anterior {
    margin-right: 10px;
}

.nav-siguiente a:hover, .nav-anterior a:hover {
    text-decoration: none;
    font-style: italic;
    font-weight: bold;
}

/* --- DEFINICIONES --- */
.def-es, .def-en {
    white-space: normal;
    word-break: normal;
    hyphens: none;
    overflow-wrap: break-word;
}

/* --- METADATOS --- */
.vocabulario-meta {
    font-size: 0.9em;
    color: #666;
}

.vocabulario-meta .meta-label {
    font-weight: bold;
}

.vocabulario-meta .meta-separator {
    margin: 0 5px;
}

.ficha-vocabulario .fuente-credito {
    margin-top: 15px;
    font-size: 0.9em;
    padding-top: 10px;
}

hr {
    border-top: 2px dashed var(--color-borde);
    border-bottom: 0;
}

.genero-tag {
    font-size: 0.8em;
    opacity: 0.7;
    margin-right: 5px;
}


/* =========================================
   LISTA DE EJEMPLOS (Estilo Chat)
   ========================================= */

.ejemplos-ul {
    list-style: none !important;
    padding: 0;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- BURBUJA BASE (Izquierda / Otros) --- */
.burbuja-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 85%;
    align-self: flex-start;
}

/* --- BURBUJA MIA (Derecha / Yo) --- */
.burbuja-container.es-mio {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* AVATAR */
.burbuja-avatar img {
    width: 48px; height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 3px solid var(--color-borde);
}

/* CUERPO DE LA BURBUJA */
.burbuja-cuerpo {
    padding: 12px 18px;
    border-radius: 0 15px 15px 15px;
    background: #ffffff;
    border: 1px solid #eef2f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    position: relative;
    font-size: 1rem;
    color: #444;
}

/* ESTILO ESPECÍFICO PARA MIS MENSAJES */
.es-mio .burbuja-cuerpo {
    background: var(--color-morado-claro);
    border-color: var(--color-morado-claro);
    border-radius: 15px 0 15px 15px;
}

/* Triángulo Izquierda */
.burbuja-cuerpo::before {
    content: ''; position: absolute;
    top: 0; left: -8px;
    width: 0; height: 0;
    border-top: 12px solid #ffffff;
    border-left: 12px solid transparent;
}

/* Triángulo Derecha */
.es-mio .burbuja-cuerpo::before {
    left: auto; right: -8px;
    border-top: 12px solid var(--color-morado-claro);
    border-left: none;
    border-right: 12px solid transparent;
}

/* Meta datos */
.burbuja-meta {
    margin-top: 5px;
    font-size: 0.75rem;
    text-align: right;
    opacity: 0.7;
}

.es-mio .burbuja-meta {
    text-align: left;
}


/* =========================================
   SECCIÓN "SIGUIENTES PASOS" (Footer Nav)
   ========================================= */

.siguientes-pasos-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.titulo-seccion-final {
    font-size: 1.5rem;
    color: var(--color-texto);
    margin-bottom: 30px;
}

/* --- GRID DE NAVEGACIÓN --- */
.grid-navegacion {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.card-nav {
    flex: 1;
    background: #fff;
    border: 1px solid var(--color-borde-clarito);
    border-radius: 15px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    min-width: 0;
}

.card-nav:hover {
    transform: translateY(-5px);
    border-color: var(--color-verde-claro);
    box-shadow: 0 8px 25px rgba(111, 160, 212, 0.15);
}

.card-nav.empty {
    border: none;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.label-nav {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.titulo-nav {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-texto);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-nav.prev { text-align: left; }
.card-nav.next { text-align: right; }

.fa-rocket-launch {
    color: var(--color-principal);
}

/* --- CTA DEL TEMA (Consolidado) --- */
.cta-tema-container {
    background: linear-gradient(135deg, var(--color-verde-claro) 0%, var(--color-verde-medio) 100%);
    border: 1px solid var(--color-verde-medio);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(164, 182, 135, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-icono {
    font-size: 2.5rem;
    color: var(--color-verde);
    background: white;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cta-texto p {
    color: #4a5e3a;
    font-weight: 500;
    margin: 0;
    font-size: 1.1rem;
}

.boton-tema {
    background: var(--color-principal);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
    display: inline-block;
}

.boton-tema:hover {
    background: var(--color-principal-hover);
    color: white;
    transform: translateY(-2px);
}

/* Responsive para CTA y Grid */
@media (max-width: 600px) {
    .cta-tema-container {
        flex-direction: column;
        text-align: center;
    }
    .grid-navegacion {
        flex-direction: column;
    }
    .card-nav { text-align: center !important; }
}


/* =========================================
   WIDGET HABLAR / TARJETA INTERACTIVA
   (Versión Final Mejorada)
   ========================================= */

.tarjeta-interactiva {
    background: #ffffff;
    /* border: 2px solid #e0e6ed; */
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06)
}

.widget-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
    border-bottom: 2px dashed #eee;
    padding-bottom: 15px;
}

.widget-header h4, #reply-title {
    margin: 0;
    color: var(--color-principal);
    font-size: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* --- CONTROLES (Flechas y Selector) --- */
.carrusel-controles {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

@media (min-width: 600px) {
    .carrusel-controles { width: auto; }
}

.btn-nav-arrow {
    background: #fff;
    border: 2px solid #eee;
    color: #666;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.btn-nav-arrow:hover {
    background: var(--color-azul);
    color: white;
    border-color: var(--color-azul);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.selector-wrapper {
    flex-grow: 1;
    min-width: 0;
    position: relative;
}

/* FIX PARA ANDROID/iOS y estilos generales del select */
#selector-ejemplo {
    height: 48px;
    border: 2px solid #eee;
    border-radius: 25px;
    padding: 0 20px;
    font-size: 1rem;
    font-family: inherit;
    color: #555;
    background: #fff;
    cursor: pointer;
    outline: none;
    width: 100%;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    text-align: center;
    text-align-last: center;
    font-weight: 500;
}

#selector-ejemplo:focus {
    border-color: var(--color-azul);
}

/* --- ZONA DE PRÁCTICA --- */
.area-practica { text-align: center; margin-top: 20px; }

.frase-gigante {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

#frase-objetivo {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em;
    font-size: 1.6rem; color: #444; margin: 10px 0 20px 0; line-height: 1.4;
}

.meta-autor { font-size: 0.85rem; color: #999; font-style: italic; margin-bottom: 25px; }

.resultado-feedback {
    font-size: 1rem; color: #888; font-style: italic; min-height: 1.5em; margin-bottom: 20px;
    display: inline-block;
    padding-left: 20px; padding-right: 20px;
}

/* Botón Micrófono */
.boton-micro-widget {
    width: 70px; height: 70px;
    border-radius: 50%; border: none;
    background: var(--color-azul-mas-oscuro); color: white;
    font-size: 1.8rem;
    cursor: pointer; transition: 0.3s;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
}

.boton-micro-widget:hover { transform: scale(1.05) translateY(-2px); }

.boton-micro-widget.escuchando {
    background: var(--color-frambuesa);
    animation: pulse-red 1.5s infinite;
}

.mensaje-flotante { margin-top: 15px; min-height: 24px; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* --- SECCIÓN CONJUGACIONES --- */
.seccion-conjugaciones {
    background: #fff;
    border: 2px solid #eef2f5;
    border-radius: 15px;
    margin: 30px 0;
    overflow: hidden;
    transition: all 0.3s ease;

    .fa-shapes, .fa-eye, .fa-eye-slash {
        color: var(--color-principal-claro);
    }
}

/* Header Clickable */
.conjugaciones-header {
    padding: 20px 25px;
    background: #f8fbf8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.conjugaciones-header:hover {
    background: var(--color-verde-sutil); /* Un verde muuuuy clarito */
}

.titulo-con-icono {
    display: flex;
    align-items: center;
    gap: 10px;
}
.titulo-con-icono h3 { margin: 0; font-size: 1.2rem; color: #444; }

.btn-ver-conjugaciones {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}

.icono-rotar { transition: transform 0.3s ease; }

/* Estado Abierto (Clase que pondremos con JS) */
.seccion-conjugaciones.abierto {
    border-color: var(--color-verde); /* Borde verde al abrir */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.seccion-conjugaciones.abierto .icono-rotar {
    transform: rotate(180deg); /* Flecha gira */
}
.seccion-conjugaciones.abierto .conjugaciones-header {
    border-bottom: 1px solid #eee;
}

/* Body (Contenido) */
.conjugaciones-body {
    padding: 25px;
    background: #fff;
    animation: fadeIn 0.5s ease;
}

/* Formas No Personales (Chips) */
.formas-no-personales {
    display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap;
}
.chip-forma {
    background: var(--color-morado-claro); /* o #f3f0f5 */
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #555;
}
.chip-forma .label { font-weight: bold; color: var(--color-morado); margin-right: 5px; }

/* Grid de Tarjetas */
.grid-tiempos-verbales {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.modo-bloque.full-width {
    grid-column: 1 / -1; /* Ocupa todo el ancho */
    margin-top: 10px;
    margin-bottom: 5px;
    border-bottom: 2px solid #eee;
}
.modo-titulo {
    color: var(--color-principal);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin: 0 0 5px 0;
}

/* Tarjeta individual de tiempo */
.tarjeta-tiempo {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    background: #fff;
}
.tarjeta-tiempo:hover {
    border-color: var(--color-verde-claro);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.tiempo-titulo {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #333;
    text-align: center;
    font-weight: 700;
}

/* Tablas */
.tabla-verbos { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tabla-verbos td { padding: 4px 0; border-bottom: 1px dashed #f5f5f5; }
.tabla-verbos tr:last-child td { border-bottom: none; }

.col-pronombre { color: #999; font-size: 0.8rem; width: 40%; }
.col-verbo { color: #333; font-weight: 500; text-align: right; }

/* Animación simple */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }



/* =========================================
   ESTILO "HANDWRITTEN NOTEBOOK" (Michi Style)
   ========================================= */

/* 1. EL CONTENEDOR (La hoja de papel) */
.michi-widget-entrenamiento {
    background-color: #f8fbf8; /* Crema muy suave */
    border: 2px dashed var(--color-borde-clarito, #dce0e3); /* Borde punteado */
    border-radius: 20px; /* Bordes suaves pero no redondos */
    padding: 30px;
    position: relative;
    margin-top: 30px;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.03); /* Sombra dura sutil */

    #btn-comenzar {
        background: var(--color-morado) !important;
    }
}

/* Decoración: Cinta adhesiva (Washi Tape) */
.widget-decoracion-cinta {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 24px;
    background-color: var(--color-principal, #A4B687);
    opacity: 0.7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.widget-header h3 {
    font-family: var(--font-header, cursive); /* Tu fuente manuscrita */
    color: var(--color-morado, #AC8FC2);
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    text-align: center;
}

.widget-header p {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    font-family: var(--font-cuerpo);
    margin-bottom: 25px;
}

/* 2. CONFIGURACIÓN (Píldoras) */
.config-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-item label {
    display: block;
    font-family: var(--font-header, cursive);
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.pildoras-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Botones de configuración estilo "Boceto" */
.btn-pildora {
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; /* Forma irregular */
    padding: 6px 14px;
    color: #777;
    cursor: pointer;
    font-family: var(--font-cuerpo);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-pildora:hover {
    border-color: var(--color-principal);
    color: var(--color-principal);
    transform: rotate(-1deg);
}

.btn-pildora.active {
    background: var(--color-principal, #A4B687);
    border-color: var(--color-principal, #A4B687);
    color: white;
    transform: rotate(-2deg);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* Botón Dificultad Difícil */
#selector-dificultad .btn-pildora[data-valor="dificil"].active {
    background: var(--color-frambuesa, #C98696);
    border-color: var(--color-frambuesa, #C98696);
}

/* Botón Jugar */
.btn-jugar-notebook {
    background: var(--color-morado, #AC8FC2) !important;
    color: white;
    border: none;
    font-family: var(--font-header);
    font-size: 1.3rem;
    padding: 10px 35px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.btn-jugar-notebook:hover { transform: scale(1.05); }
.btn-jugar-notebook.peq { font-size: 1rem; padding: 8px 20px; margin-top: 15px; }


/* 3. JUEGO ACTIVO */

/* Barra de Progreso */
.progreso-notebook { margin-bottom: 25px; }
.info-texto {
    display: flex; justify-content: space-between;
    font-size: 0.9rem; color: #888; margin-bottom: 5px; font-weight: bold;
}
.track-dibujado {
    height: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    background: white;
    overflow: hidden;
}
.fill-rayado {
    height: 100%;
    width: 0%;
    background: var(--color-morado-medio);
    /* Patrón de rayitas */
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
    transition: width 0.4s ease;
}

/* Pregunta */
.pista-contexto { font-style: italic; color: #999; font-size: 0.9rem; margin-bottom: 5px; }
.frase-mano {
    font-family: var(--font-header, cursive);
    font-size: 1.8rem;
    color: #444;
    line-height: 1.4;
    margin-bottom: 20px;
}
.hueco-activo {
    color: var(--color-morado);
    border-bottom: 2px dashed var(--color-morado);
    padding: 0 5px;
}

/* Grid de Opciones */
.grid-notebook {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Estos botones se generan vía JS con la clase .btn-opcion (si no cambiaste el JS)
   o los estilizamos aquí asumiendo que el JS pone una clase genérica */
.ficha-vocabulario #grid-opciones button, .btn-opcion {
    background: white;
    border: 2px solid #eee;
    padding: 15px;
    border-radius: 12px;
    font-family: var(--font-cuerpo);
    font-size: 1.1rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.ficha-vocabulario #grid-opciones button:hover, .btn-opcion:hover {
    border-color: var(--color-principal);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);

/* Feedback */
}

.ficha-vocabulario #grid-opciones {
    .btn-opcion.correcto {
        background: var(--color-principal-clarito);
        border-color: var(--color-principal-claro);
        color: #155724;
    }
    .btn-opcion.incorrecto {
        background: var(--color-rosa-claro);
        border-color: var(--color-rosa);
        color: #721c24;
        opacity: 0.5;
    }
}

.feedback-area { margin-top: 20px; text-align: center; }
.btn-siguiente-notebook {
    background: var(--color-teal);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-header);
    margin-top: 10px;
}

/* Resultados */
.resultado-icono { font-size: 3rem; color: var(--color-principal-claro); margin-bottom: 10px; }
.titulo-resultado { font-family: var(--font-header); color: var(--color-morado); }

/* Responsive */
@media (max-width: 600px) {
    .grid-notebook { grid-template-columns: 1fr; }
}