/* =============================================================================
   ESTILOS CSS PARA LA INTERFAZ WEB
   ============================================================================= */

/* Reset básico para márgenes y padding */
* {
    box-sizing: border-box;
}

/* Estilos generales del cuerpo */
body { 
    font-family: Arial, sans-serif; 
    margin: 0 1em; 
    background: #ddd; 
    font-size: 16px;
    line-height: 1.5;
}

/* Todas las imágenes son botones, por tanto, convertir el puntero en un cursor-selector al pasar sobre ellas. */
img {
  cursor: pointer;
  float: right;
  margin: 0 0 0 10px;
}

/* Encabezado principal */
h1 {
    font-family: "DM Serif Text", serif;
    font-weight: 800;
    font-style: normal;
    font-size: 36px;
    line-height: 1;
    text-align: center;
    margin: 16px 0 14px;
    width: 100%;
}

/* Encabezado secundario */
h2 {
    font-family: "DM Serif Text", serif;
    font-weight: 800;
    font-style: normal;
    font-size: 30px;
    line-height: 1;
    text-align: center;
    margin: 12px 0 24px 0;
    padding: 0;
}

/* Encabezado terciario */
h3 {
    font-family: "DM Serif Text", serif;
    font-weight: 800;
    font-style: italic;
    font-size: 24px;
    line-height: 1.1;
    text-align: left;
    margin: 24px 0 0 0;
    padding: 5px 0 0 0;
}

h4 {
    font-family: 'DM Serif Text', serif;
    font-weight: 800;
    font-style: normal;
    font-size: 19px;
    line-height: 1;
    text-align: left;
    margin: 0 0 12px 0;
    padding: 0;
}

.contenedorDeEjemplos {
    background-color: #e0e0e0;
    padding: 16px;
    border-radius: 8px;
}

.contenedorDeEjemplos > *:last-child {
    margin-bottom: 0;
}

/* Contenedor del formulario */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.contenedor-cabecera {
    width:100%;
}

/* Campo de entrada de texto */
input { 
    width: 100%; 
    height: 50px; 
    font-size: 1em;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 2px 2px 5px #ccc;
}

/* Contenedor de botones */
.botones-container {
    display: flex;
    gap: 1em;
    width: 100%;
    }

/* Estilos base para botones */
button { 
    border: none;
    border-radius: 8px;
    padding: 14px 0;
    font-size: 1em;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.08, 0.52, 0.52, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    flex: 1;
}

.simboloEspecial { 
    font-size: 1.4em;
    font-weight: 400;
    font-family: "Noto Sans Symbols 2";
    border: 0;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Botón de analizar - Estilos específicos */
.btn-analizar {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    color: white;
}

/* Botón de ejemplo - Estilos específicos */
.btn-ejemplo {
    background: linear-gradient(135deg, #1877F2 0%, #166FE5 100%);
    color: white;
}

/* Botón de borrar - Estilos específicos */
.btn-borrar {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    color: white;
}

/* Botón de aprender - Estilos específicos */
.btn-aprender {
    background: linear-gradient(135deg, #444444 0%, #222222 100%);
    color: white;
}

/* Efectos hover para botones */
.btn-analizar:hover {
    background: linear-gradient(135deg, #219653 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10), 1px 3px 5px rgba(0, 0, 0, 0.2);
}

.btn-ejemplo:hover {
    background: linear-gradient(135deg, #166FE5 0%, #1461C8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10), 1px 3px 5px rgba(0, 0, 0, 0.2);
}

.btn-borrar:hover {
    background: linear-gradient(135deg, #C0392B 0%, #A93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10), 1px 3px 5px rgba(0, 0, 0, 0.2);
}

.btn-aprender:hover {
    background: linear-gradient(135deg, #222222 0%, #000000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10), 1px 3px 5px rgba(0, 0, 0, 0.2);
}

/* Efectos active para botones */
.btn-analizar:active {
    background: linear-gradient(135deg, #1e8449 0%, #196f3d 100%);
    transform: translateY(0);
}

.btn-ejemplo:active {
    background: linear-gradient(135deg, #1461C8 0%, #1257B4 100%);
    transform: translateY(0);
}

.btn-borrar:active {
    background: linear-gradient(135deg, #A93226 0%, #922B21 100%);
    transform: translateY(0);
}

.btn-aprender:active {
    background: linear-gradient(135deg, #111111 0%, #000000 100%);
    transform: translateY(0);
}

.imagenDeCabecera {
    text-align: center;
    margin: 0 0 12px 0;
    padding: 0;
    width: 100%;
    border-radius: 12px;
    border: solid black 1px;
    pointer-events: none;
}

.separador {
    float: none !important;
    margin: 0 auto;
    padding: 0;
    width: 200px;
    pointer-events: none;
}

/* Información de proceso */
.proceso {
    color: #393939;
    background: #f5f5f5; 
    border-radius: 12px; 
    margin-top: 1em; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    box-shadow: inset 8px 0 0 0 #000000, inset 0 0 0 1px #808080, 0 0 5px #ccc;
    padding: 16px 12px 16px 20px;
}

.proceso p {
    margin: 0;
    line-height: 1.4;
    padding: 0;
}

/* Área de resultados */
.resultado {
    color: #264c36;
    background: #e9f6ef; 
    border-radius: 12px; 
    margin-top: 1em; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    box-shadow: inset 8px 0 0 0 #219653, inset 0 0 0 1px #90cba9, 0 0 5px #ccc;
    padding: 12px 12px 12px 20px;
}

/* Panel informativo */
.panel {
    color: #393939;
    background: #f5f5f5; 
    border-radius: 12px; 
    margin-top: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    box-shadow: inset 8px 0 0 0 #000000, inset 0 0 0 1px #808080, 0 0 5px #ccc;
    padding: 12px 12px 12px 20px;
}

/* Panel informativo */
.mit { 
    color: #393939;
    background: #f5f5f5; 
    border-radius: 12px; 
    margin-top: 1em; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    box-shadow: inset 8px 0 0 0 #000000, inset 0 0 0 1px #808080, 0 0 5px #ccc;
    padding: 12px 12px 12px 20px;
}

/* Pie de página */
.footer {
    line-height: 1.4;
    padding: 0 0 1em 0;
    margin-top: 10px;
    text-align: center;
    color: #444;
    font-weight: normal;
    font-size: small;
}

.justificado {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto; /* para compatibilidad con Chrome/Safari */
    -ms-hyphens: auto;      /* para navegadores antiguos de Microsoft */
    text-justify: inter-word;
}

.centrado {
    text-align: center;
}

.ejemplos {
    text-align: center;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    margin-block-start: unset;
    margin-block-end: unset;
    margin: 1px 0 2px 0;
}

.espaciadoVerticalParaLosEjemplos {
    margin: 16px 0 0 0 !important;
}

.grisaceo {
    color: gray;
}

.pequeno {
    font-size: 90%;
}

.boton-control {
    position: absolute;
    bottom: 3px;
    right: 6px;
    z-index: 9999;          /* IMPORTANTE: asegurar que quede por encima */
    background-color: rgba(0,0,0,0);
    border: none;
    padding: 0 0;
    cursor: pointer;
    transition: none !important;
    box-shadow: none !important;
    /* asegurar que el botón reciba eventos */
    pointer-events: auto;
}

.boton-control:focus img {
    filter: none !important;
}

.boton-control:hover img {
    filter: brightness(1.5);
}

  /* Espacio de presentación entre sílabas */
.gap {
    color: #888;
    margin: 0 2px;
}

/* Manejo de márgenes en el área de Licencia MIT */
.mit > *:first-child {
    margin-top: 0;
}

/* Manejo de márgenes en el área de resultados */
.resultado > *:first-child {
    margin-top: 0;
}

.resultado > *:last-child {
    margin-bottom: 0;
}

/* Etiquetas destacadas */
.etiqueta { 
    font-weight: bold; 
}

/* Texto monoespaciado para silabeos */
.monoespaciado { 
    font-family: "SFMono-Regular", Menlo, Consolas, monospace; 
    display: inline;
    max-width: 100%;
    overflow-x: auto;
}

/* Línea separadora */
hr {
    border: none;
    border-top: 1px dotted #888;
}

/* Marcar palabras sin con pronunciación desconocida */
.not-found {
    color: #b00;
    background: rgba(255, 200, 200, 0.3);
    padding: 0 .15em;
    border-radius: 3px;
    font-weight: 600;
}

.izquierda {
    text-align: left;
    margin-left: 24px;
}

/* =============================================================================
   MEDIA QUERIES PARA DISPOSITIVOS DE ESCRITORIO
   ============================================================================= */
@media (min-width: 768px) {
    body {
        margin: 0;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .izquierda {
        margin-left: 33%;
    }

    .contenedor-cabecera {
        width: 400px;
        margin: 0 auto;
    }
    
    .form-container {
        flex-direction: row;
        align-items: center;
        flex-direction: column;
        gap: 1em;
    }
    
    .salto {
        width: 400px;    
    }
    
    input {
        height: 40px;
        font-size: 1.05em;
    }
    
    .proceso {
        width: 50%;
        margin: 16px auto 0;
        gap: 1em;
    }
    
    .botones-container {
        width: 100%;
        flex-shrink: 0;
        gap: 1em;
    }

    button {
        width: auto;
        padding: 10px 28px;
        white-space: nowrap;
    }
}