/* Reset y estilo base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

header {
  background-color: #001833;
  height: 200px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

header .logo img {
  height: 100%;
  max-height: 110px;
  width: auto;
  object-fit: contain;
}

.ai-title {
  color: #ffffff;
  font-size: 24px;
  margin-left: 20px;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.translator-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  max-width: 900px;
}

.language-selection {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

select {
  width: 48%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fafafa;
  font-family: 'Arial', sans-serif;
}

.switch-button {
  font-size: 20px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #007bff;
}

.switch-button:hover {
  color: #0056b3;
}

/* Cuadro de entrada centrado */
.text-box.top-center {
  width: 100%;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.text-box.top-center textarea {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-height: 200px;
  background-color: #fafafa;
  font-family: 'Arial', sans-serif;
  resize: none;
}

.clear-btn {
  position: absolute;
  top: 12px;
  right: 10px;
  background-color: transparent;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  line-height: 1;
}

.clear-btn:hover {
  color: #333;
}

/* Botón de traducir centrado */
.center-btn-wrapper {
  text-align: center;
  margin-bottom: 20px;
}

.translate-btn {
  padding: 12px 40px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.translate-btn:hover {
  background-color: #0056b3;
}

.text-box-container {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 20px;
}

.text-box {
  width: 48%;
  position: relative;
}

.textarea-wrapper {
  position: relative;
}

.text-box label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
}

textarea {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 15px;
  min-height: 200px;
  resize: none;
  background-color: #fafafa;
  font-family: 'Arial', sans-serif;
}

textarea:focus {
  border-color: #007bff;
  outline: none;
}

textarea[readonly] {
  background-color: #f1f1f1;
}

/* ✔ Checkmark */
.checkmark {
  color: green;
  font-size: 18px;
  margin-left: 8px;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.checkmark.visible {
  display: inline;
  opacity: 1;
}

/* Botón de copiar dentro del textarea */
.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
}

.copy-btn:hover {
  background-color: #0056b3;
}

footer {
  background-color: #f0f0f0;
  color: #888;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-family: 'Arial', sans-serif;
}

/* Responsive */
@media (max-width: 600px) {
  .translator-container {
    width: 90%;
  }

  .text-box-container {
    flex-direction: column;
  }

  .text-box {
    width: 100%;
    margin-bottom: 10px;
  }

  .clear-btn {
    top: 10px;
    right: 10px;
    font-size: 16px;
  }

  .copy-btn {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 3px 6px;
  }
}
