* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  min-height: 100vh;
  padding: 1rem;
  position: relative;
  padding-bottom: 60px; /* Space for footer */
}

.main-container {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 120px);
}

.editor-section {
  flex: 1;
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow-y: auto;
}

.docs-section {
  flex: 1;
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-height: 100%;
  overflow-y: auto;
}

.docs-content {
  max-width: 600px;
}

h1 {
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.8rem;
}

h2 {
  color: #444;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

h3 {
  color: #555;
  margin: 1.5rem 0 1rem;
  font-size: 1.2rem;
}

.input-section,
.output-section {
  margin-bottom: 2rem;
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
}

textarea:focus {
  outline: none;
  border-color: #007bff;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #0056b3;
}

.error-message {
  color: #dc3545;
  margin-bottom: 1rem;
  min-height: 20px;
}

#outputDisplay {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #ddd;
  min-height: 100px;
  font-family: monospace;
  white-space: pre-wrap;
}

/* Documentation Styles */
.docs-content ol,
.docs-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.docs-content li {
  margin-bottom: 0.5rem;
}

.docs-content pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #ddd;
  overflow-x: auto;
  margin: 1rem 0;
}

.docs-content code {
  font-family: monospace;
  font-size: 14px;
}

.docs-content p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* GitHub Corner */
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-25deg);
  }
  40%,
  80% {
    transform: rotate(10deg);
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    height: auto;
  }

  .editor-section,
  .docs-section {
    max-height: none;
  }

  .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
  color: #666;
  font-size: 0.9rem;
}
