/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f8f9fa;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eaeaea;
}

h1 {
  color: #2c3e50;
  margin: 0;
}

main {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

#markdown-output, #markdown-source {
  min-height: 200px;
}

#markdown-source {
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  background-color: #f8f8f8;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
}

.loading {
  text-align: center;
  color: #666;
  font-style: italic;
}

footer {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* Tabs */
#markdown-tabs {
  margin-bottom: 1rem;
}

#markdown-tabs button {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-bottom: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  margin-right: 0.2rem;
}

#markdown-tabs button.active {
  background-color: white;
  border-bottom: 1px solid white;
  position: relative;
  bottom: -1px;
  font-weight: bold;
}

#markdown-tabs button:hover:not(.active) {
  background-color: #dee2e6;
}

/* Markdown content styles */
#markdown-output h1,
#markdown-output h2,
#markdown-output h3 {
  color: #2c3e50;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

#markdown-output h1 {
  font-size: 2em;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.3em;
}

#markdown-output h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.3em;
}

#markdown-output p {
  margin: 1em 0;
}

#markdown-output a {
  color: #3498db;
  text-decoration: none;
}

#markdown-output a:hover {
  text-decoration: underline;
}

#markdown-output code {
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

#markdown-output pre {
  background-color: #f4f4f4;
  padding: 12px;
  border-radius: 5px;
  overflow-x: auto;
}

#markdown-output blockquote {
  border-left: 4px solid #3498db;
  margin: 0;
  padding: 0 1em;
  color: #666;
}

#markdown-output ul,
#markdown-output ol {
  padding-left: 2em;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  main {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.5em;
  }
}