* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.container {
  width: min(100%, 900px);
}

header {
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

p {
  margin: 0;
  color: #475569;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
  padding: 24px;
  margin-bottom: 20px;
}

.small-card {
  max-width: 640px;
}

.field-row,
.field-group {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
}

input[type="text"],
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 12px 14px;
  font-size: 1rem;
  color: #111827;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

button#translate-button {
  background: #2563eb;
  color: #ffffff;
}

button.secondary {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.result-box {
  min-height: 160px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(148, 163, 184, 0.15);
  padding: 2px 6px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  body {
    padding: 16px 10px;
  }
}
