/* 覆盖 Hydro .contest-problems（侧栏 180px 网格、窄屏隐藏） */

.contest-problem-nav.contest-problems {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100% !important;
  max-width: none;
  margin: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  row-gap: 6px;
  column-gap: 6px;
  font-size: 12px;
  line-height: 1;
  text-align: left;
  right: auto;
  top: auto;
}

.contest-problem-nav.contest-problems > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.contest-problem-nav.contest-problems > a:before,
.contest-problem-nav.contest-problems > a:after {
  content: none !important;
  display: none !important;
}

.contest-problem-nav.contest-problems > a .icon {
  display: none !important;
}

.contest-problem-nav.contest-problems > a .id,
.contest-problem-nav.contest-problems > a.pass .id,
.contest-problem-nav.contest-problems > a.fail .id,
.contest-problem-nav.contest-problems > a.pass:not(:hover) .id,
.contest-problem-nav.contest-problems > a.fail:not(:hover) .id {
  display: inline !important;
}

.contest-problem-nav.contest-problems > a:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.contest-problem-nav.contest-problems > a:focus-visible {
  outline: 2px solid #1677ff;
  outline-offset: 2px;
}

.contest-problem-nav.contest-problems > a.active {
  background: #e6f4ff;
  border-color: #1677ff;
  color: #0958d9;
}

.contest-problem-nav.contest-problems > a.pass {
  background: #f6ffed;
  border-color: #b7eb8f;
  color: #389e0d;
}

.contest-problem-nav.contest-problems > a.fail {
  background: #fff2f0;
  border-color: #ffccc7;
  color: #cf1322;
}

.contest-problem-nav.contest-problems > a.pass.active,
.contest-problem-nav.contest-problems > a.fail.active {
  box-shadow: inset 0 0 0 1px currentColor;
}

.problem-ide-contest-problems {
  flex-shrink: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}

.problem-ide-root--statement-collapsed .problem-ide-contest-problems {
  display: none !important;
}

.pd-header-card .contest-problem-nav.contest-problems {
  padding: 2px 0 0;
  border-top: none;
  margin-top: 0;
}

.theme--dark .contest-problem-nav.contest-problems > a {
  background: #21262d;
  border-color: #30363d;
  color: #8b949e;
}

.theme--dark .contest-problem-nav.contest-problems > a:hover {
  background: #30363d;
  border-color: #388bfd;
  color: #79c0ff;
}

.theme--dark .contest-problem-nav.contest-problems > a.active {
  background: #111d2c;
  border-color: #388bfd;
  color: #69b1ff;
}

.theme--dark .contest-problem-nav.contest-problems > a.pass {
  background: #162312;
  border-color: #274916;
  color: #73d13d;
}

.theme--dark .contest-problem-nav.contest-problems > a.fail {
  background: #2a1215;
  border-color: #5c2222;
  color: #ff7875;
}

.theme--dark .problem-ide-contest-problems {
  background: #1a1a1a;
  border-bottom-color: #333;
}
