.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--background-color);
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
}

pre {
  position: relative;
  padding-top: 32px;
}

.code-language-label {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 10;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.code-copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
  color: #6b7280;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.code-copy-button svg {
  display: block;
}

.code-copy-button:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  color: #4b5563;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.code-copy-tooltip {
  position: absolute;
  top: 8px;
  right: 44px;
  z-index: 10;
  padding: 4px 8px;
  border-radius: 6px;
  background: #222;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.code-copy-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.code-copy-tooltip.is-hiding {
  opacity: 0;
  transform: translateY(-4px);
}

body[data-theme="dark"] .code-copy-button {
  background: rgba(37, 37, 38, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
  color: #c9d1d9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .code-language-label {
  color: #8b949e;
}

body[data-theme="dark"] .code-copy-button:hover {
  background: rgba(52, 53, 65, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f0f6fc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

body[data-theme="light"] .code-copy-button {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.08);
  color: #6b7280;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .code-language-label {
  color: #6a737d;
}

body[data-theme="light"] .code-copy-button:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.1);
  color: #4b5563;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
