.copy-btn-wrapper {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  backdrop-filter: blur(4px);
  color: #374151;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.3);
  color: white;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

/* Ensure code blocks have relative positioning */
div[class*="language-"] {
  position: relative;
}

/* Hide copy button on very small screens */
@media (max-width: 480px) {
  .copy-btn-wrapper {
    top: 4px;
    right: 4px;
  }
  
  .copy-btn {
    width: 24px;
    height: 24px;
    padding: 4px;
  }
  
  .copy-btn svg {
    width: 12px;
    height: 12px;
  }
}