/* IDE 页快捷键面板（problem_ide_shortcuts.ts） */
.problem-ide-shortcuts {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.problem-ide-shortcuts[hidden] { display: none; }

.problem-ide-shortcuts__dialog {
  width: min(560px, 100%);
  max-height: min(640px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
  color: #27272a;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  animation: problem-ide-shortcuts-in 0.16s ease-out;
}
@keyframes problem-ide-shortcuts-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .problem-ide-shortcuts__dialog { animation: none; }
}

.problem-ide-shortcuts__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.problem-ide-shortcuts__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #09090b;
}
.problem-ide-shortcuts__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #71717a;
  font-size: 20px;
  line-height: 28px;
  cursor: pointer;
}
.problem-ide-shortcuts__close:hover { background: rgba(15, 23, 42, 0.06); color: #09090b; }
.problem-ide-shortcuts__close:focus-visible { outline: 2px solid var(--ide-primary, #1677ff); outline-offset: 1px; }

.problem-ide-shortcuts__body {
  overflow-y: auto;
  padding: 6px 18px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 28px;
}
.problem-ide-shortcuts__group-title {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #a1a1aa;
}
.problem-ide-shortcuts__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  margin: 0;
}
.problem-ide-shortcuts__list dt {
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: #3f3f46;
}
.problem-ide-shortcuts__list dd {
  display: inline-flex;
  gap: 4px;
  margin: 0;
}
.problem-ide-shortcuts kbd {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fafafa;
  color: #3f3f46;
  font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .problem-ide-shortcuts__body { grid-template-columns: minmax(0, 1fr); }
}

.theme--dark .problem-ide-shortcuts { background: rgba(0, 0, 0, 0.5); }
.theme--dark .problem-ide-shortcuts__dialog {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1c1c1f;
  color: #e4e4e7;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.theme--dark .problem-ide-shortcuts__header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.theme--dark .problem-ide-shortcuts__title { color: #fafafa; }
.theme--dark .problem-ide-shortcuts__close { color: #a1a1aa; }
.theme--dark .problem-ide-shortcuts__close:hover { background: rgba(255, 255, 255, 0.08); color: #fafafa; }
.theme--dark .problem-ide-shortcuts__group-title { color: #71717a; }
.theme--dark .problem-ide-shortcuts__list dt { color: #d4d4d8; }
.theme--dark .problem-ide-shortcuts kbd {
  border-color: rgba(255, 255, 255, 0.14);
  background: #27272a;
  color: #e4e4e7;
}
