/* 观城 OJ · 状态页「查看代码」浮层（不依赖答题页样式，可单独引入） */
.cp-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 24, 39, .45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 9040;
}

.cp-mask.on {
  display: flex;
}

.cp-card {
  width: 880px;
  max-width: 94vw;
  max-height: 84vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cpIn .16s ease-out;
}

@keyframes cpIn {
  from { transform: translateY(10px); opacity: .55; }
  to   { transform: none; opacity: 1; }
}

.cp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #f3f8ff, #e7f0fb);
  border-bottom: 1px solid #d6e2f4;
  color: #1b4b8f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.cp-head .cp-who {
  color: #0f3f86;
}

.cp-head .cp-dim {
  font-weight: 400;
  color: #5d7ba6;
  font-size: 13px;
}

.cp-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #7b96b9;
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.cp-x:hover {
  background: rgba(31, 102, 184, .1);
  color: #1f66b8;
}

.cp-body {
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 120px;
  background: #fff;
  color: #1f2937;
  font: 13px/1.6 "Consolas", "Courier New", "Microsoft YaHei", monospace;
  white-space: pre;
  tab-size: 4;
  border: 0;
}

.cp-body.empty {
  color: #8b98a8;
  font-family: inherit;
  white-space: pre-wrap;
}

.cp-body.err {
  color: #b42318;
  background: #fff8f7;
  font-family: inherit;
  white-space: pre-wrap;
}

.cp-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #eef2f8;
  background: #fbfcfe;
}

.cp-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid #cfd9e6;
  background: #fff;
  color: #46586e;
  font-size: 13px;
  cursor: pointer;
}

.cp-btn:hover {
  border-color: #9db8d9;
  color: #1f66b8;
}

.cp-btn.primary {
  border-color: #2f6fb5;
  background: #2f6fb5;
  color: #fff;
}

.cp-btn.primary:hover {
  background: #2a63a3;
  color: #fff;
}

.cp-btn[disabled] {
  opacity: .5;
  cursor: default;
}

.cp-open {
  margin-right: auto;
  font-size: 12px;
  color: #5d7ba6;
  text-decoration: none;
}

.cp-open:hover {
  color: #1f66b8;
  text-decoration: underline;
}
