body {
  display: flex;
  justify-content: center;
  padding: 2em;
  background: #f5f5f5;
}

.markdown-body {
  box-sizing: border-box;
  min-width: 200px;
  max-width: 980px;
  margin: 0 auto;
  padding: 45px;
}

.pre-wrapper {
  position: relative;
  margin: 1em 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
  border-radius: 6px
}

.markdown-body pre {
  width:calc(100% - 80px);
  position: relative;
  padding: 1em;
  margin-bottom: 0;
  overflow: auto;
}

.markdown-body pre code {
  font-size:0.87rem;
  display: block;
  padding-right: 2.5em; /* ensures space on the right for the copy button */
}

.zeroclipboard-container {
  position: absolute;
  top: .5em;
  right: .5em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.copy-btn {
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  background-color: transparent;
  border: 1px solid transparent;
  gap: 4px;
  opacity: 0.6;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.copy-btn:hover {
  opacity: 1;
}

/* Style for the upload result box */
#upload-result {
  max-width: 980px;
  margin: 2em auto;
  font-family: monospace;
  color: #333;
  background: #eef;
  padding: 1em;
  border-radius: 6px;
  display: none;
  transition: opacity 0.3s ease; /* For smooth transition */
  opacity: 0; /* Start invisible */
}

#upload-result.show {
  display: block; /* Show the element */
  opacity: 1; /* Make it visible */
}

@media (max-width: 767px) {
  body {
    padding: 0 0 50px 0;
  }

  .markdown-body {
    max-width: 100%;   /* override the 980px cap on small screens */
    padding: 1rem;     /* reduce padding to allow more space */
  }
}
