:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-hover: #1a1f2b;
  --border: #242a36;
  --text: #e8ebf1;
  --muted: #8a93a6;
  --ok: #22c55e;
  --down: #ef4444;
  --unknown: #6b7280;
}

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

body {
  font-family: "Pretendard", system-ui, sans-serif;
  background:
    radial-gradient(900px 400px at 50% -100px, #1c2333 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero { text-align: center; padding: 72px 20px 32px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: 0.08em; }
.hero p { color: var(--muted); margin-top: 8px; }

main { width: min(1080px, 100% - 40px); margin: 0 auto; flex: 1; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }

#search {
  flex: 1 1 240px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font: inherit;
  outline: none;
}
#search:focus { border-color: #3b4458; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.tag-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

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

.card {
  --accent: #64748b;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.card:hover { transform: translateY(-3px); background: var(--panel-hover); border-color: var(--accent); }

.card-top { display: flex; justify-content: space-between; align-items: center; }
.icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.icon img { width: 28px; height: 28px; object-fit: contain; }

.status { width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); }
.status.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status.down { background: var(--down); }
.status.off { display: none; }

.name { font-size: 1.2rem; font-weight: 700; margin-top: 6px; }
.desc { color: var(--muted); font-size: 0.93rem; line-height: 1.5; flex: 1; }

.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tags span {
  font-size: 0.75rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
}
.host { font-size: 0.8rem; color: #5d6578; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

footer { text-align: center; color: #5d6578; font-size: 0.85rem; padding: 48px 20px 32px; }
