/* Page layout (optional) */
.page {
  max-width: 980px;
  margin: 30px auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* The outer card */
.code-block {
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
  background: #ffffff;
}

/* Header bar */
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 12px;
  background: #1f5fbf;
  color: #ffffff;
}

/* Small language tag (left side) */
.code-language {
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  opacity: 0.9;
}

/* Copy button */
.copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #ffffff;

  padding: 8px 12px;
  border-radius: 999px;

  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.copy-btn:hover {
  border-color: rgba(255, 255, 255, 0.65);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Body area that holds your hilite.me HTML */
.code-body {
  padding: 12px;
  background: #f6f6f6; /* this is just the container background */
  overflow: auto;
}

/*
  IMPORTANT:
  hilite.me usually outputs <pre> and <code> with inline styles.
  These rules keep the block readable and scrollable without breaking hilite’s colors.
*/
.code-body pre {
  margin: 0;
  overflow: auto;
}

/* Optional: keep code from wrapping */
.code-body code {
  white-space: pre;
}

/* --- Copy success state --- */
.copy-btn.copied {
  background: #2ecc71;       /* Green background */
  border-color: #2ecc71;
  color: #ffffff;
}

/* Smooth color transition */
.copy-btn {
  transition: background-color 0.2s ease, 
              border-color 0.2s ease, 
              color 0.2s ease;
}
