/* ============ ESTILO GENERAL ============ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color:white; 
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ============ ENCABEZADOS ============ */
 h2, h3 {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 12px 25px;
  margin: 15px 0;
  border-radius: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  color: #ffffff;
}
h1 { font-size: 2.4em; color: #f65c78; }
h2 { font-size: 1.8em; color: #e0e0e0; }
h3 { font-size: 1.4em; color: #cccccc; font-weight: normal; }

/* ============ FILA HORIZONTAL: INPUTS Y BOTONES ============ */
.fila-horizontal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 600px;
  margin: 15px auto;
}

/* ============ INPUT Y SELECT ============ */
input[type="text"], select {
  font-size: 18px;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #555;
  background-color: #1e1e1e;
  color: #ffffff;
  max-width: 300px;
  width: 70%;
  box-sizing: border-box;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
}

.select2-selection__rendered img,
.select2-results__option img {
  vertical-align: middle;
  margin-right: 14px;
  width: 25px;
  height: 10px;
}

/* ============ BOTONES ============ */
button {
  background-color: #2e6f77;
  color: #ece8f3;
  font-size: 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
button:hover {
  background-color: #ff5722;
  transform: scale(1.05);
}
.boton-volver { background-color: #6a1b9a; }
.audiobtn { background-color: #05c8e2; }
.audio-control-btn { background-color: #d32f2f; }

.botones-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  width: 80%;
  max-width: 350px;
}

/* ============ CAMPO TRADUCCIÓN ============ */

/* ============ IMAGEN RELACIONADA ============ */
#imagen {
  display: none;
  width: 70%;
  text-align: center;
  align-items: center;
  max-width: 300px;
  border-radius: 10px;
  margin-top: 5px;
  box-shadow: 0 2px 6px rgba(255,255,255,0.2);
}

/* ============ SÍLABAS ============ */
#zonaSilabas {
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
}

.btn-silaba {
  text-transform: uppercase;
  background-color: #150474;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}
.boton-silaba:hover {
  background-color: #555;
}


.boton-silaba:hover {
  background-color: #555;
}

.botones-audio {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-audio {
  background-color: #010e57;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
}

.btn-audio:hover {
  background-color: #121312;
}

.btn-audio i {
  margin-right: 6px;
  font-size: 18px;
}


/* ============ ZONA DE ESCRITURA Y VERIFICACIÓN ============ */

.verificacion {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}
.verificacion input {
  font-size: 18px;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #555;
  background-color: #1e1e1e;
  color: white;
  text-align: center;
}
#resultado {
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  width: 100%;
  color: #4caf50;
}
h1 {margin-top: 30px;
  padding: 15px;
  font-size: 22px;
  background-color:#072e4e;  
  color:  rgb(233, 231, 238);
 }
/* ============ TEXTO CENTRAL ============ */
#texto-container {
  display: flex;
  gap: 10px;
  width: 90%;
  max-width: 800px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
#texto {
  width: 90%;
  flex: 1;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  background-color: #1a1a1a;
  color: rgb(233, 231, 238);
  padding: 12px;
  border-radius: 14px;
}



/* ============ ENTRADA DE VOZ ============ */
.entrada-voz {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  width: 100%;
}
.entrada-voz input {
  font-size: 50px;
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #555;
  background-color: #1e1e1e;
  color: white;
  width: 100%;
  max-width: 400px;
}
.entrada-voz button {
  width: 100px;
  font-size: 30px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }
  h1 { font-size: 1.6em; }
  h2 { font-size: 1.4em; }
  h3 { font-size: 1.2em; }

  input[type="text"], select {
    font-size: 16px;
    padding: 10px;
    max-width: 100%;
  }

  .entrada-voz input {
    font-size: 24px;
    padding: 12px;
  }

  button {
    font-size: 14px;
    padding: 10px 16px;
  }

  .entrada-voz button {
    width: 6px;
    font-size: 24px;
  }

  .fila-horizontal,
  .botones-horizontal,
  .texto-container {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 90%;
  }

  .definicion-container {
    flex-direction: column;
    align-items: center;
  }

  .definicion {
    width: 95%;
  }

  #imagen {
    width: 95%;
    align-items: center;
  }
}

/* ============ CENTRADO GENERAL Y TECLADO ÁRABE ============ */
.center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .teclado-arabe {
    display: grid;
    grid-template-columns: repeat(2, auto); /* 2 columnas */
    gap: 6px; /* espacio entre columnas y filas */
    justify-content: flex-start; /* alineado a la izquierda */
    border: 3px solid #0c0458;
  }
}
.teclado-arabe .linea {
  display: contents; /* ignora el contenedor de línea para que las teclas fluyan */
}


.teclado-arabe button {
  flex: 1; /* Cada botón crece igual dentro de su fila */
  text-align: center;
}


  .teclado-arabe {
    display: inline-block;
    text-align: center;
  }
  .linea {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
  }

.teclado-arabe button {
  padding: 10px 14px; /* más largo */
  height: 45px;  
  font-size: 10px;
  border: none;
  border-radius: 0.5px;
  margin: 0.5px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.1s;
}
.teclado-arabe button:hover {
  opacity: 0.85;
}
#btnTraducir {
  grid-column: span 0; /* ✅ ocupa dos celdas igual que borrar */
  background-color: rgb(40, 151, 170);
  padding: 10px 150px;
  font-size: 10px;
  color: white;
}
/* Números: fondo negro, texto blanco */
.linea.numeros button {
  background-color:rgb(156, 152, 152);
  color: rgb(247, 246, 246);
}

/* Letras: colores profesionales */
.teclado-arabe button:not(.borrar):not(.linea.numeros button) {
  background-color: rgb(241, 245, 248);
  color: rgb(15, 15, 15);
}

/* Botón borrar */
.borrar {
  background-color: rgb(17, 17, 17);
  color: white;
  font-size: 20px;
}

/* Separadores entre bloques */
.separador {
  border: none;
  border-top: 1px solid #f6f6f8;
  margin: 2px auto;
  width: 0%;
}
.teclado-arabe button {
  padding: 18px 20px; /* más largo */
  font-size: 16px;
  border: none;
  border-radius: 4px;
  margin: 3px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}


/* ============ MENSAJES ============ */
.mensaje-aliento {
  margin-top: 10px;
  font-size: 1.5em;
  color: #03381b;
  text-align: center;
  font-weight: bold;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.mensaje-aliento.animar {
  opacity: 1;
  animation: parpadeo 1s infinite alternate;
}

@keyframes parpadeo {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.6; transform: scale(1.05); }
}

.mensaje-bienvenida {
  margin-top: 14px;
  text-align: center;
  font-size: 1.3em;
  font-weight: bold;
  color: #e9b015;
  background-color: #180202;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 15px 15px rgba(4, 70, 32, 0.2);
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.contenedor-boton {
  display: flex;
  justify-content: center; /* Centra horizontal */
  margin-top: 20px;
}

#btnverificar {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  background-color:rgb(40, 151, 170); 
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

#btnverificar:hover {
  background-color: #218838;
  transform: scale(1.05);
}
/* Botón especial con icono ▶ */
#btnPlay {
  width: 45px;
  height: 45px;
  border-radius: 50%;             /* redondo */
  border: none;
  background:#4b9dd4;      /* azul */
  color: #fff;                    /* icono blanco */
  font-size: 22px;                /* tamaño del icono */
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#btnPlay.play:hover {
  background: #af2f1e;            /* azul más oscuro */
  transform: scale(1.05);
}

/* Activo (cuando se pulsa) */
#btnPlay.play:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Versión accesible para teclado */
#btnPlay.play:focus-visible {
  outline: 3px solid rgba(214, 21, 15, 0.4);
  outline-offset: 3px;
}
.btnMensaje.play {
  width: 50px;
  height: 50px;
  border-radius: 50%;             /* redondo */
  border: none;
  background:#4b9dd4;      /* azul */
  color: #fff;                    /* icono blanco */
  font-size: 22px;                /* tamaño del icono */
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover (en PC) */
.btnMensaje.play:hover {
  background: #af2f1e;            /* azul más oscuro */
  transform: scale(1.05);
}

/* Activo (cuando se pulsa) */
.btnMensaje.play:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Versión accesible para teclado */
.btnMensaje.play:focus-visible {
  outline: 3px solid rgba(214, 21, 15, 0.4);
  outline-offset: 3px;
}

/* En pantallas pequeñas */
@media (max-width: 600px) {
  #btnMensaje.play {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}


.btn-reconocer {
  background-color:rgb(78, 77, 77);
  border-radius: 80%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-reconocer:hover {
  background-color: #4b9dd4;
}

.btn-reconocer:active {
  background-color: #ec2222; /* rojo Google cuando está activo */
}
/*audio /*/

.traduccion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.traduccion-campo {
  font-size: 22px;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 250px;
  text-align: center;
}

.btn-audio {
  font-size: 20px;
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #020b11;
  color: white;
}
.btn-audio:hover {
  background: #0a0b0c;
}

.fila {
  display: flex;
  align-items: center;          /* Alinear elementos en el centro vertical */
  justify-content: space-between;
  margin: 10px 0;               /* menos margen para ahorrar espacio */
  padding: 6px 10px;
  border-bottom: 1px solid #ddd; /* línea fina para separar filas */
}

.fila .bandera {
  flex: 0 0 auto;
  font-size: 32px;              /* bandera más grande */
  margin-right: 12px;           /* espacio después de la bandera */
}

.fila .texto {
  flex: 1;
  text-align: center;
  font-size: 20px;              /* un poco más grande */
  font-weight: bold;            /* negrita */
  color: #f5f1ee;               /* color destacado pero elegante */
  margin: 0 12px;               /* espacio a los lados */
}

.fila .escuchar {
  flex: 0 0 auto;
  background: #0c0c0c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.fila .escuchar:hover {
  background: #05c8e2;
}

.bandera {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  margin-right: 10px;
}

.footer {
    font-size: 12px;   /* Tamaño base (ordenador) */
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    justify-content: space-between;
    text-align: center;
    padding:10px ;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    background-color: #135285; /* azul */
  }

 

  /* En pantallas pequeñas (móvil) */
  @media (max-width: 600px) {
    .footer h {
      font-size: 12px;   /* Más pequeño en móvil */
      width: 100%;
      
    }
    
  }


