.translator {
  max-width: 800px;
  margin: 1rem auto;
  padding: 2rem;
  margin-top: -1rem;
  border-radius: 0px;
  background-color: var(--bg-secondary);
}

body.dark .translator {
  background-color: var(--bg-secondary-dark);
}

.translator h1 {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

body.dark .translator h1 {
  color: var(--accent-dark);
}

.translator-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.translator-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.label-counter-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.translator-option label {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

body.dark .translator-option label {
  color: var(--text-primary-dark);
}

.char-counter {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

body.dark .char-counter {
  color: var(--text-secondary-dark);
}

.custom-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: none;
  resize: none;
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.2s ease;
}

body.dark .custom-textarea {
  color: var(--text-primary-dark);
  border: 1px solid var(--border-dark);
}

.custom-textarea::placeholder {
  color: var(--text-secondary);
}

body.dark .custom-textarea::placeholder {
  color: var(--text-secondary-dark);
}

.custom-textarea[readonly] {
  background: transparent;
  cursor: default;
}

body.dark .custom-textarea[readonly] {
  background: transparent;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  width: 100%;
  padding: 0.75rem 2rem 0.75rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

body.dark .custom-select {
  color: var(--text-primary-dark);
  border: 1px solid var(--border-dark);
}

.custom-select-arrow {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

body.dark .custom-select-arrow {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.custom-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  padding: 0.5rem;
}

body.dark .custom-select option {
  background: var(--bg-primary-dark);
  color: var(--text-primary-dark);
}

.translator-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.translator-buttons .btn {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 100;
  border-radius: 20px;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
}

.translator-buttons .btn-secondary {
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.dark .translator-buttons .btn-secondary {
  color: var(--text-primary-dark);
  border: 1px solid var(--border-dark);
}

@media (max-width: 768px) {
  .translator {
    padding: 1.5rem;
  }

  .translator h1 {
    font-size: 1.5rem;
  }

  .label-counter-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }

  .translator-option label {
    font-size: 0.85rem;
  }

  .char-counter {
    font-size: 0.85rem;
  }

  .custom-textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
    min-height: 80px;
  }

  .custom-select {
    padding: 0.6rem 1.5rem 0.6rem 0.6rem;
    font-size: 0.9rem;
  }

  .custom-select-arrow {
    right: 0.6rem;
    width: 0.9rem;
    height: 0.9rem;
  }

  .translator-buttons .btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    min-width: 100px;
  }
}
