:root {
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.groups {
  max-width: 960px;
  margin: 0 auto;
}

.head {
  text-align: center;
  margin-bottom: 28px;
}

.head h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.group h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
}

.sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.site {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.site:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
  border-color: #cbd5e1;
}

.site-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.site-name {
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图标颜色类 */
.red { background-color: #ef4444; }
.blue { background-color: #3b82f6; }
.green { background-color: #10b981; }
.orange { background-color: #f97316; }
.cyan { background-color: #06b6d4; }
.slate { background-color: #475569; }
.pink { background-color: #ec4899; }

@media (max-width: 480px) {
  body {
    padding: 16px 12px;
  }

  .sites {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}