/* 复制按钮基础样式 */
.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  background-color: #62626262;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  font-size: 12px;
}

/* 提示框样式 */
.code-copy-tip {
  position: absolute;
  top: 10px;
  right: 50px;
  padding: 4px 8px;
  background-color: #333;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 10;
}

.code-copy-tip.show {
  opacity: 1;
}

/* 手机端适配：仅保留字号/内边距优化，恢复右上角定位（核心修改） */
@media screen and (max-width: 768px) {
  .code-copy-btn {
    /* 删掉bottom:10px、top:auto，保留top:10px（继承基础样式，也可显式写） */
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 3px 6px;
  }
  .code-copy-tip {
    /* 同步删掉bottom:10px、top:auto，恢复顶部定位 */
    top: 10px;
    right: 50px;
    font-size: 11px;
  }
}

/* 核心：确保手机端行号不可选中（防止原生选择时带行号） */
.rouge-gutter, .line-number {
  user-select: none; /* 关键：行号不可选中 */
  -webkit-user-select: none; /* 适配Safari/Chrome移动端 */
}
