.problem-list-page {
  background: #f8fafc;
  padding: 28px 0 80px;
}

.problem-list-container {
  width: min(1180px, 92%);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.problem-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.problem-header-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.problem-action-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.problem-action-btn.primary {
  background: #2563eb;
  border-color: rgba(37, 99, 235, 0.4);
  color: #fff;
}

.problem-list-header h1 {
  font-size: 24px;
}

.problem-list-header p {
  color: var(--muted);
  font-size: 14px;
}

.problem-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.problem-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.stat-sub {
  font-size: 12px;
  color: #64748b;
}

.problem-filters {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
}

.problem-search {
  width: 78%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.problem-search input {
  border: none;
  outline: none;
  font-size: 15px;
  width: 100%;
  color: var(--text);
  height: 30px;
}

.filter-btn {
  width: 90px;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  gap: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn:hover {
  background: #ededed;
}

.filter-section {
  padding: 20px;
  width: 100%;
  background: var(--card);
  max-height: 500px;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  opacity: 1;
}

.filter-section.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0 20px;
}

.filter-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.filter-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-box h1 {
  font-size: 14px;
  color: #777;
}

.filter-btns {
  display: flex;
  gap: 5px;
}

.filter-btns button {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btns button:hover {
  background: #ededed;
}

.filter-reset {
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 14px;
  color: #777;
  transition: 0.2s ease;
}

.filter-reset:hover {
  color: black;
}

.search-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.problem-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.problem-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
}

.problem-chip.is-active {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.08);
  font-weight: 600;
}

.problem-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  justify-content: flex-end;
}

.problem-sort select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  background: #fff;
}

.problem-list-table {
  display: grid;
  gap: 10px;
}

.problem-table-head {
  display: grid;
  grid-template-columns:
    minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr)
    minmax(0, 0.7fr) minmax(0, 0.5fr);
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 6px 8px;
}

.problem-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns:
    minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr)
    minmax(0, 0.7fr) minmax(0, 0.5fr);
  gap: 12px;
  align-items: center;
}

.problem-row-main {
  display: grid;
  gap: 6px;
}

.problem-row-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.problem-row-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.problem-row-meta {
  font-size: 12px;
  color: #64748b;
}

.problem-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.problem-row-state {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  text-align: center;
}

.problem-row-state.solved {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.problem-row-date {
  font-size: 12px;
  color: var(--muted);
}

.problem-row-action {
  display: flex;
  justify-content: flex-end;
}

.problem-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: #334155;
}

.problem-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
}

/* 표 */
.problem-list-section {
  width: 100%;
}

/* Modern table styles for problem-list */
.table-wrap {
  background: transparent;
  overflow: auto;
}
.problem-table.modern {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.problem-table.modern thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.problem-table.modern tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: #0f172a;
  font-size: 14px;
}
.problem-table.modern tbody tr:last-child td {
  border-bottom: none;
}
.problem-table.modern td.title {
  font-weight: 700;
}
.difficulty-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  font-weight: 600;
  font-size: 12px;
}
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
}
.status-badge.solved {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.open-btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.15);
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 960px) {
  .problem-table.modern {
    min-width: 0;
  }
  .problem-table.modern thead {
    display: none;
  }
  .problem-table.modern tbody td {
    display: block;
    width: 100%;
  }
  .problem-table.modern tbody tr {
    margin-bottom: 12px;
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
  }
  .problem-table.modern td {
    border-bottom: none;
    padding: 6px 10px;
  }
  .problem-table.modern td.title {
    font-size: 15px;
  }
}

@media (max-width: 960px) {
  .problem-stats {
    grid-template-columns: 1fr 1fr;
  }
  .problem-filters {
    grid-template-columns: 1fr;
  }
  .problem-table-head {
    display: none;
  }
  .problem-row {
    grid-template-columns: 1fr;
  }
  .problem-row-action {
    justify-content: flex-start;
  }
}
