* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #141416;
  color: #ececec;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.wrapper {
  width: 100%;
  max-width: 780px;
  background: #1d1d20;
  border: 1px solid #2e2e33;
  border-radius: 12px;
  padding: 20px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.top-bar h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.langs-tag {
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.06em;
}

.lang-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

select {
  flex: 1;
  background: #141416;
  color: #ececec;
  border: 1px solid #2e2e33;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}

select:focus {
  border-color: #c81e45;
}

#swapBtn {
  background: #27272b;
  color: #ececec;
  border: 1px solid #2e2e33;
  border-radius: 8px;
  width: 44px;
  font-size: 1.1rem;
  cursor: pointer;
}

#swapBtn:hover {
  background: #323238;
}

.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.pane {
  background: #141416;
  border: 1px solid #2e2e33;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.output-area {
  display: flex;
  flex-direction: column;
  min-height: 165px;
}

textarea {
  width: 100%;
  height: 165px;
  background: none;
  border: none;
  color: #ececec;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.output-area textarea {
  height: 105px;
}

textarea::placeholder {
  color: #5c5c63;
}

.en-sub {
  font-size: 0.85rem;
  color: #a1a1aa;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px dashed #2a2a30;
  line-height: 1.4;
  min-height: 52px;
  max-height: 85px;
  overflow-y: auto;
  word-break: break-word;
}

.pane-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #222226;
  font-size: 0.78rem;
  color: #888;
}

.mini-btn {
  background: #222226;
  color: #ccc;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.mini-btn:hover {
  background: #2f2f35;
  color: #fff;
}

#goBtn {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  background: #c81e45;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

#goBtn:hover {
  background: #ad183a;
}

#goBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}