@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  background-image: url(./background.png);
  background-size: cover;
  background-position: center;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(180deg, #020617, #020617ee);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.translate {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.translate:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.translate-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.translate-body textarea {
  flex: 1;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: #e5e7eb;
  font-size: 15px;
  line-height: 1.5;
}

.translate-body p {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.translate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #1e293b;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #020617;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 55%,
    calc(100% - 11px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  color: #e5e7eb;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 6px 34px 6px 10px;
  font-size: 13px;
  height: 34px;
  cursor: pointer;
  transition: border 0.15s ease, box-shadow 0.15s ease;
  overflow-y: auto;
}
select option {
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  padding: 6px;
    border-radius: 8px;
}

select:hover {
  border-color: #3b82f6;
}

select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  outline: none;
}

#targetLang {
  align-self: flex-end;
  width: fit-content;
}

.icon-button {
  background: transparent;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease, transform 0.08s ease;
}

.icon-button:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button img {
  width: 22px;
  height: 22px;
  filter: invert(1);
}

.switch-button {
  align-self: center;
  justify-self: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #3b82f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.switch-button:hover {
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.switch-button:active {
  transform: scale(0.92) rotate(180deg);
}

.switch-button img {
  width: 22px;
  filter: invert(1);
}
select::-webkit-scrollbar {
  width: 6px;
}

select::-webkit-scrollbar-track {
  background: #020617;
}

select::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 6px;
}


@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .switch-button {
    transform: rotate(90deg);
  }
}
