    body {
      font-family: Arial, sans-serif;
      background-color: #f5f7fa;
      color: #333;
      margin: 0;
      padding: 0;
      min-height: 100dvh;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow-x: hidden;
    }

    main {
      /* width: 50%; */
      max-width: 600px;
      min-width: 320px;
      margin: auto;
      background: white;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    }

    h1 {
      text-align: center;
      font-size: 1.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-group {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-bottom: 1.5em;
    }

    button {
      background-color: #4a90e2;
      border: none;
      color: white;
      padding: 10px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 1rem;
      transition: background .4s ease-in-out;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    button:hover {
      background-color: #2d01f0ef;
    }

    label {
      display: block;
      margin-top: 10px;
      font-weight: bold;
    }

    input,
    textarea {
      width: auto;
      padding: 8px;
      margin-top: 4px;
      border: 1px solid #ccc;
      border-radius: 5px;
      font-size: 1rem;
    }

    textarea {
      resize: vertical;
      min-height: 80px;
    }

    #resultado2 {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin-top: 1.5em;
      padding: 10px;
      background: #f0f4f8;
      border-radius: 5px;
      min-height: 30px;
    }

    #resultado {
      display: grid;
      place-items: center;
      /* centra horizontal y vertical */
      margin-top: 1.5em;
      padding: 10px;
      background: #f0f4f8;
      border-radius: 5px;
      min-height: 30px;
    }
	
	.div-resultado {
  max-width: 100%;
  overflow-wrap: break-word; /* Permite que las palabras largas se dividan */
  word-break: break-word;    /* Compatibilidad extra */
  white-space: pre-wrap;     /* Mantiene saltos de línea dentro de <pre> */
  padding: 10px;
  box-sizing: border-box;
}
.div-resultado pre {
  white-space: pre-wrap;     /* Evita que el contenido desborde */
  word-break: break-word;
}

    .formulario {
      display: flex;
      flex-direction: column;
      gap: 1em;
    }

    .form-group {
      display: flex;
      flex-direction: column;
    }

    label {
      font-weight: bold;
    }

    input,
    textarea {
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-size: 1rem;
    }

    .btn-primary {
      background-color: #4a90e2;
      color: white;
      border: none;
      padding: 10px 14px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 1rem;
    }

    .btn-primary:hover {
      background-color: #357abd;
    }

    .alert-msg {
      color: red;
      font-weight: bold;
      text-align: center;
    }


    .span-resultado {
      margin-top: 1.5em;
      padding: 10px;
      background: #f0f4f8;
      border-radius: 5px;
      min-height: 30px;
      width: 90%;
    }