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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding: 20px;
  background-color: #f5f5f5;
}

.container {
  display: flex;
  max-width: 1200px;
  height: 90vh;
  margin: 0 auto;
  gap: 20px;
}

.pane {
  padding: 20px;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.output-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

h2 {
  margin-bottom: 15px;
  color: #333;
}

textarea {
  flex-grow: 1;
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  resize: none;
  font-size: 14px;
}

button {
  padding: 10px 15px;
  background-color: #1e6afe;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #030b60;
}

.translation-card {
  background-color: #f9f9f9;
  border-left: 4px solid #1e6afe;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.person-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.translation-text {
  color: #555;
}

/* Markdown-specific styling */
.translation-text h1,
.translation-text h2,
.translation-text h3,
.translation-text h4,
.translation-text h5,
.translation-text h6 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #333;
  font-weight: bold;
}

.translation-text h1 {
  font-size: 1.8em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.translation-text h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.translation-text h3 {
  font-size: 1.3em;
}

.translation-text h4 {
  font-size: 1.1em;
}

.translation-text p {
  margin: 0.8em 0;
}

.translation-text ul,
.translation-text ol {
  padding-left: 2em;
  margin: 0.8em 0;
}

.translation-text li {
  margin: 0.3em 0;
}

.translation-text blockquote {
  padding: 0 1em;
  color: #6a737d;
  border-left: 3px solid #dfe2e5;
  margin: 0.8em 0;
}

.translation-text pre {
  background-color: #f6f8fa;
  border-radius: 3px;
  font-size: 85%;
  line-height: 1.45;
  overflow: auto;
  padding: 16px;
  margin: 0.8em 0;
}

.translation-text code {
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  font-size: 85%;
  margin: 0;
  padding: 0.2em 0.4em;
  font-family: monospace;
}

.translation-text pre code {
  background-color: transparent;
  padding: 0;
}

.translation-text a {
  color: #0366d6;
  text-decoration: none;
}

.translation-text a:hover {
  text-decoration: underline;
}

.translation-text table {
  border-collapse: collapse;
  margin: 0.8em 0;
  width: 100%;
}

.translation-text table th,
.translation-text table td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.translation-text table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

.translation-text img {
  max-width: 100%;
  box-sizing: content-box;
}

.translation-text hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: #e1e4e8;
  border: 0;
}

.placeholder-message {
  color: #999;
  text-align: center;
  margin-top: 30px;
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  .pane {
    width: 100%;
    margin-bottom: 20px;
  }

  .input-pane {
    height: 40vh;
    min-height: 200px;
  }

  .output-pane {
    min-height: 40vh;
  }

  textarea {
    min-height: 150px;
  }
}

/* Ensure enough height for content on small screens */
@media (max-height: 700px) {
  .container {
    height: auto;
  }
}

/* For extra small screens */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .pane {
    padding: 15px;
  }
}
