/* 题库页面 */

.problems-section {
  margin-top: 28px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h1 {
  font-size: 1.6rem;
  margin: 0 0 16px;
  color: var(--text);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 180ms;
}

.filter-input:focus {
  border-color: var(--accent);
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 180ms;
  min-width: 100px;
}

.filter-select:focus {
  border-color: var(--accent);
}

.btn-filter {
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms, transform 180ms;
}

.btn-filter:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

thead {
  background: rgba(217, 123, 45, 0.06);
}

th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

tr:hover td {
  background: rgba(217, 123, 45, 0.03);
}

td a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

td a:hover {
  text-decoration: underline;
  color: var(--accent-deep);
}

.solved-mark {
  color: var(--green);
  font-weight: 700;
  margin-left: 6px;
}

.diff-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.diff-beginner { background: #fde8e8; color: #fe4c61; }
.diff-pop- { background: #fef3e2; color: #f39c11; }
.diff-pop { background: #fff8e1; color: #ffc116; }
.diff-popplus { background: #e8f5e9; color: #52c41a; }
.diff-improve { background: #e0f7fa; color: #0abde3; }
.diff-impplus { background: #e3f2fd; color: #3498db; }
.diff-prov { background: #f3e5f5; color: #9b59b6; }
.diff-noi { background: #1a1a2e; color: #eceff1; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0;
}

.pagination-previous,
.pagination-next,
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms, border-color 180ms, color 180ms;
}

.pagination-previous:hover:not(:disabled),
.pagination-next:hover:not(:disabled),
.pagination-link:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pagination-previous:disabled,
.pagination-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-list li {
  display: inline-flex;
}

.pagination-link.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .filter-bar {
    flex-direction: column;
  }

  .filter-input {
    min-width: 100%;
  }

  .filter-select {
    width: 100%;
  }
}

/* 通过率进度条 */
.prob-rate-bar {
  width: 100%;
  min-width: 48px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.prob-rate-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.prob-rate-fill.high { background: #22c55e; }
.prob-rate-fill.mid { background: #f59e0b; }
.prob-rate-fill.low { background: #ef4444; }
