:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #8e8e93;
  --accent: #007aff;
  --accent2: #5856d6;
  --orange: #ff9500;
  --green: #34c759;
  --red: #ff3b30;
  --border: rgba(60, 60, 67, 0.12);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(242, 242, 247, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.back:hover { opacity: 0.8; }
.topbar h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  flex: 1;
}
.topbar .sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.hero h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

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

.tile {
  display: block;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.85rem;
}
.tile h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.tile p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.tile .badge {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

/* Server dashboard */
.group {
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.group-header {
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.group-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
}
.link-card {
  display: block;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.12s;
}
.link-card:hover { background: rgba(0, 122, 255, 0.06); }
.link-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--accent);
}
.link-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.search-box {
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}
.search-box:focus {
  outline: 2px solid var(--accent);
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.empty {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .group-links { grid-template-columns: 1fr; }
}
