/* Reset și bază */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.5;
}

/* Container formular + rezultat */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px;
}

/* Formular */
form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

input[type="text"] {
  width: 100%;
  padding: 12px 10px;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus {
  border-color: #007bff;
  outline: none;
}

input[type="submit"] {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  padding: 10px 25px;
  font-size: 1.1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(53, 122, 189, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

input[type="submit"]:hover {
  background: linear-gradient(135deg, #357abd, #4a90e2);
  box-shadow: 0 6px 18px rgba(74, 144, 226, 0.8);
}

/* Rezultat */
.result {
  background-color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-top: 25px;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Wrap text în pre */
.result pre {
  white-space: pre-wrap;       /* Înlocuiește whitespace fix cu wrap */
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  font-family: monospace;
  font-size: 1rem;
  margin: 0;
  overflow-x: auto;            /* Scroll orizontal dacă e nevoie */
}

/* Responsive pentru mobil */
@media (max-width: 600px) {
  body {
    margin: 10px;
  }

  form {
    padding: 15px;
  }

  input[type="text"], button {
    font-size: 1rem;
    padding: 10px 12px;
  }

  .result {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .result pre {
    font-size: 0.9rem;
  }
}
