.markdown-editor {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.editor-toolbar {
  padding: 8px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.editor-toolbar button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 3px;
  color: #555;
  font-size: 14px;
  transition: background-color 0.2s;
}

.editor-toolbar button:hover {
  background-color: #e9ecef;
}

.toolbar-divider {
  width: 1px;
  background-color: #ddd;
  margin: 0 5px;
}

.editor-container {
  display: flex;
  min-height: 300px;
}

.editor-wrapper {
  flex: 1;
  position: relative;
}

.markdown-textarea {
  width: 100%;
  height: 100%;
  min-height: 300px;
  padding: 15px;
  border: none;
  resize: vertical;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.preview-wrapper {
  flex: 1;
  border-left: 1px solid #ddd;
  overflow-y: auto;
  padding: 15px;
}

.preview-header {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.markdown-preview {
  font-size: 14px;
  line-height: 1.6;
}

.markdown-preview :deep(h1),
.markdown-preview :deep(h2),
.markdown-preview :deep(h3),
.markdown-preview :deep(h4),
.markdown-preview :deep(h5),
.markdown-preview :deep(h6) {
  margin-top: 1em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.markdown-preview :deep(p) {
  margin-bottom: 1em;
}

.markdown-preview :deep(img) {
  max-width: 100%;
  height: auto;
}

.markdown-preview :deep(blockquote) {
  border-left: 4px solid #ddd;
  padding-left: 1em;
  color: #777;
  margin: 1em 0;
}

.markdown-preview :deep(pre) {
  background-color: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
}

.markdown-preview :deep(code) {
  background-color: #f5f5f5;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.markdown-preview :deep(table) {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.markdown-preview :deep(th),
.markdown-preview :deep(td) {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.markdown-preview :deep(th) {
  background-color: #f5f5f5;
}

.editor-footer {
  padding: 8px;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
}

.toggle-preview-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle-preview-btn:hover {
  background-color: #e9ecef;
}

.toggle-preview-btn i {
  margin-right: 5px;
}

@media (max-width: 768px) {
  .editor-container {
    flex-direction: column;
  }
  
  .preview-wrapper {
    border-left: none;
    border-top: 1px solid #ddd;
  }
}