:root {
  --bg: #0f172a;
  --card: #1e293b;
  --line: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --muted: rgba(226, 232, 240, 0.8);
  --faint: rgba(148, 163, 184, 0.9);
  --accent: #38bdf8;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}
.brand h1 span { font-weight: 600; color: #e2e8f0; }
.brand p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
}
.search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.7;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 0 14px 0 36px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.layout {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  flex: 1;
}

.side {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  height: fit-content;
}
.side button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  padding: 9px 10px 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  position: relative;
}
.side button:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.side button.active {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
  font-weight: 600;
}
.side button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  min-height: 148px;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  border-color: rgba(56, 189, 248, 0.4);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.icon-life { background: linear-gradient(135deg, #10b981, #059669); }
.icon-health { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.icon-school { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.icon-mp { background: linear-gradient(135deg, #22c55e, #15803d); }

.card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.card .host {
  color: #5eead4;
  font-size: 12px;
  margin-top: 2px;
}
.card:hover .host {
  color: #99f6e4;
  text-decoration: underline;
}
.card .host.is-mp {
  color: #86efac;
}
.card.is-mp {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.card.is-wip {
  cursor: default;
  opacity: 0.92;
}
.card.is-wip:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.08);
}
.tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
}
.tag-wip {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}
.tag-live {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
}

.empty { color: var(--faint); padding: 24px; }

.footer {
  margin-top: 36px;
  text-align: center;
  color: rgba(148, 163, 184, 0.7);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.footer a { color: rgba(148, 163, 184, 0.85); text-decoration: none; }
.footer a:hover { color: #e2e8f0; text-decoration: underline; }
.footer .dot { margin: 0 6px; opacity: 0.5; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
}
