* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #0a0a0f;
  color: #e8e8ed;
  line-height: 1.6;
  padding: 32px 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Header */
header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #2a2a35;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #6ee7b7 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.last-sync {
  font-size: 13px;
  color: #8a8a92;
}

/* Stats Summary */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: #16161e;
  border: 1px solid #2a2a35;
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #3a3a4a;
}

.stat-card.active {
  border-color: #3b82f6;
  background: #1a1a25;
}

.stat-card .count {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: 12px;
  color: #b0b0b8;
  font-weight: 500;
}

.stat-card.progress .count { color: #6ee7b7; }
.stat-card.pending .count { color: #fbbf24; }
.stat-card.todo .count { color: #60a5fa; }
.stat-card.frozen .count { color: #fb923c; }
.stat-card.done .count { color: #9ca3af; }

/* Filters */
.filters {
  margin-bottom: 32px;
  background: #0f0f17;
  border: 1px solid #2a2a35;
  border-radius: 12px;
  padding: 16px 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-group label {
  font-size: 12px;
  color: #8a8a92;
  font-weight: 500;
  min-width: 72px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-buttons button {
  background: #1a1a25;
  border: 1px solid #2a2a35;
  color: #b0b0b8;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filter-buttons button:hover {
  border-color: #4a4a5a;
  color: #e8e8ed;
}

.filter-buttons button.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  font-weight: 500;
}

/* Category Sections */
main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.category-section {
  background: #0f0f17;
  border: 1px solid #2a2a35;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.category-section:hover {
  border-color: #3a3a4a;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a35;
}

.category-header h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-header .count-badge {
  background: #2a2a35;
  color: #b0b0b8;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: #6a6a72;
  font-size: 14px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #6a6a72;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid #2a2a35;
}

td {
  padding: 14px 12px;
  font-size: 14px;
  color: #d0d0d8;
  border-bottom: 1px solid #1a1a25;
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: #14141c; }

td.name {
  font-weight: 500;
  color: #e8e8ed;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
}

td.summary {
  color: #b0b0b8;
  max-width: 320px;
}

td.next {
  color: #9a9aa3;
  max-width: 280px;
  font-size: 13px;
}

td.status-cell { white-space: nowrap; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.status-progress { background: rgba(110, 231, 183, 0.12); color: #6ee7b7; }
.status-pending { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.status-todo { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.status-frozen { background: rgba(251, 146, 60, 0.12); color: #fb923c; }
.status-done { background: rgba(156, 163, 175, 0.12); color: #9ca3af; }

td.update {
  font-size: 12px;
  color: #6a6a72;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #2a2a35;
  font-size: 12px;
  color: #6a6a72;
  text-align: center;
  line-height: 1.8;
}

footer code {
  background: #16161e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: #b0b0b8;
}

/* Responsive */
@media (max-width: 900px) {
  body { padding: 20px 16px; }
  h1 { font-size: 24px; }
  .stats {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .stat-card { padding: 14px 8px; }
  .stat-card .count { font-size: 28px; }
  .stat-card .label { font-size: 10px; }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .filter-group { flex-direction: column; align-items: flex-start; }
  .filter-group label { min-width: 0; }
  th, td { padding: 8px 6px; font-size: 12px; }
  td.summary, td.next { max-width: 160px; }
  td.name { font-size: 12px; }
  .status-badge { padding: 2px 6px; font-size: 10px; }
}
