/* === ESTILOS GENERALES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: #F3F5FC;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === CABECERA MODIFICADA === */
header {
  width: 100%;
  background: #e0e0e0; /* Mismo color del contenedor principal */
  padding: 15px 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
}

header img {
  width: 80px;
  height: auto;
}

/* === TITULO PRINCIPAL === */
h1 {
  font-size: 36px;
  text-align: center;
  font-style: italic;
  margin: 30px 0;
  color: #0A3871;
  width: 100%;
}

/* === CONTENEDOR PRINCIPAL === */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  flex: 1;
}

/* === CONTENEDOR DEL ENCRIPTADOR === */
.encriptador-container {
  display: flex;
  background-color: #e0e0e0;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 20px;
  max-width: 1200px;
  width: 90%;
  height: 780px;
}

/* === AREA IZQUIERDA: INPUT === */
.input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-right: 20px;
  background-color: #e0e0e0;
  border-radius: 12px;
  padding: 10px;
}

.input-area textarea {
  flex: 1;
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background-color: #e0e0e0;
  resize: none;
}

.input-area textarea:focus {
  outline: none;
}

.input-area .info {
  margin-top: 10px;
  font-size: 14px;
  color: #495057;
}

.input-area .botones {
  display: flex;
  margin-top: 15px;
  gap: 10px;
}

.input-area button {
  flex: 1;
  height: 50px;
  border-radius: 24px;
  border: 1px solid #0A3871;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.input-area .btn-encriptar {
  background-color: #0A3871;
  color: #fff;
}

.input-area .btn-encriptar:hover {
  background-color: #084070;
}

.input-area .btn-desencriptar {
  background-color: #D8DFE8;
  color: #0A3871;
}

.input-area .btn-desencriptar:hover {
  background-color: #bfc9d3;
}

/* Estados de botones después de hacer clic - estilo copiado */
.input-area .btn-copiado {
  background-color: #D8DFE8;
  color: #0A3871;
}

/* === AREA DERECHA: OUTPUT === */
.output-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 10px;
}

.output-area textarea {
  flex: 1;
  padding: 15px;
  font-size: 18px;
  border-radius: 12px;
  border: none;
  background-color: #ffffff;
  background-image: url('muneco.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  resize: none;
}

.output-area textarea:focus {
  outline: none;
}

/* Botón Copiar y Borrar - MISMO TAMAÑO Y CENTRADO */
.output-area .boton-copiar-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.output-area .boton-copiar-container button {
  height: 50px;
  border-radius: 24px;
  border: 1px solid #0A3871;
  font-size: 16px;
  cursor: pointer;
  background-color: #0A3871;
  color: #fff;
  transition: 0.3s;
  width: 100%; /* Mismo ancho que los botones de encriptar/desencriptar */
  max-width: 300px; /* Limitar el ancho máximo para que no sea demasiado ancho */
}

.output-area button.copiado {
  background-color: #D8DFE8;
  color: #0A3871;
}

/* === AREA DE MENSAJES Y ESTADO === */
.status-area {
  margin-top: 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1200px;
  width: 90%;
}

#writingEffect {
  font-size: 18px;
  color: #ff0000; /* Color rojo para resaltar */
  height: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Animación del reloj giratorio */
.clock-icon {
  display: inline-block;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#statusMessage {
  font-size: 18px;
  color: #e74c3c;
  height: 22px;
  font-weight: bold;
}

/* === RESPONSIVE === */
@media (max-width: 1000px) {
  .encriptador-container {
    flex-direction: column;
    height: auto;
  }

  .input-area {
    margin-right: 0;
    margin-bottom: 20px;
  }
  
  header {
    padding: 15px 20px;
  }
  
  .output-area .boton-copiar-container button {
    max-width: 100%; /* En móvil ocupa todo el ancho disponible */
  }
}

