main {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
}

header {
  background-color: #004080;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

header p {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.05rem;
  color: #f1f5f9;
}

header a {
  color: #60a5fa;
  text-decoration: underline;
  font-weight: bold;
}

header a:hover {
  color: #93c5fd;
  text-decoration: none;
}

.upload-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.upload-section div {
  flex: 1 1 300px;
}

.upload-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.upload-section input[type="file"] {
  width: 100%;
}

.upload-section button {
  height: 40px;
  padding: 0 1rem;
  background-color: #004080;
  color: white;
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

.upload-section button:hover {
  background-color: #0059b3;
}

.github-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: #eef4ff;
  border: 1px solid #ccd7e0;
  border-radius: 6px;
}

.github-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.github-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.github-grid .field label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.35rem;
}

.github-grid .field input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #bcc8d6;
}

.github-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.github-actions button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background-color: #004080;
  color: white;
  font-weight: bold;
}

.github-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.github-actions .hint {
  color: #344966;
  font-size: 0.9rem;
}

#translationTable {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  table-layout: fixed;
}

.resizable {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resizer {
  width: 5px;
  height: 100%;
  background: #ccc;
  cursor: col-resize;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

#translationTable th,
#translationTable td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  overflow-wrap: break-word;
}

#translationTable textarea {
  width: 100%;
  height: 100px;
  resize: vertical;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

#translationTable textarea.translation-warning {
  border: 1px solid #d32f2f;
  background-color: #fff5f5;
}

tr.highlight-missing td {
  background-color: #fff5f5;
}

tr.highlight-modified td {
  background-color: #fffbe6;
}

#searchInput {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.filters-row #searchInput {
  flex: 1 1 300px;
  margin-bottom: 0;
}

.select-wrapper {
  flex: 1 1 200px;
}

.select-wrapper label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.select-wrapper select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.toggle-wrapper {
  margin-bottom: 1rem;
  font-weight: bold;
}

.info-panel {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #ccd7e0;
  background-color: #f5f9ff;
  color: #1a3a5f;
  font-size: 0.95rem;
}

.info-panel ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.info-panel li {
  margin-bottom: 0.25rem;
}

.table-wrapper {
  max-height: 500px;
  overflow: auto;
  border: 1px solid #ccc;
}

.button-row {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

#exportBtn, #exportMissingBtn, #previewBtn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

#exportBtn { background-color: #2e7d32; color: white; }
#exportMissingBtn { background-color: #b36b00; color: white; }
#previewBtn { background-color: #004080; color: white; }
#previewBtn:hover { background-color: #0059b3; }

.preview-box {
  margin-top: 1.5rem;
  background-color: #fefefe;
  border: 1px solid #ccc;
  padding: 1rem;
  max-height: 300px;
  overflow: auto;
}

.code-preview {
  margin: 0;
  font-family: monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
