:root {
  --bg: #090b10;
  --bg-elev: #111520;
  --bg-card: rgba(20, 25, 38, 0.78);
  --bg-card-hover: rgba(27, 34, 52, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5f9;
  --text-muted: #98a2b8;
  --text-subtle: #667085;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --live: #22c55e;
  --live-soft: rgba(34, 197, 94, 0.14);
  --wip: #f59e0b;
  --wip-soft: rgba(245, 158, 11, 0.14);
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --live: #16a34a;
  --live-soft: rgba(22, 163, 74, 0.12);
  --wip: #d97706;
  --wip-soft: rgba(217, 119, 6, 0.12);
  --shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(640px 360px at 14% -4%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(560px 320px at 88% 8%, rgba(16, 185, 129, 0.12), transparent 70%);
}

[data-theme="light"] .ambient {
  background:
    radial-gradient(640px 360px at 14% -4%, rgba(99, 102, 241, 0.1), transparent 70%),
    radial-gradient(560px 320px at 88% 8%, rgba(16, 185, 129, 0.08), transparent 70%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #10b981);
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.65);
}

.brand-name {
  font-size: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.hero {
  max-width: 680px;
  margin-bottom: 40px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px var(--live-soft);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  min-width: 240px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-subtle);
  transition: border-color 0.2s;
}

.search-wrap:focus-within {
  border-color: var(--accent);
}

.search-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}

.search-wrap input::placeholder {
  color: var(--text-subtle);
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--card-accent, linear-gradient(90deg, #6366f1, #10b981));
  opacity: 0.85;
}

.card.is-live:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card.is-wip {
  opacity: 0.86;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.live {
  background: var(--live-soft);
  color: var(--live);
}

.status-badge.wip {
  background: var(--wip-soft);
  color: var(--wip);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
}

.card-note {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-subtle);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-subtle);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.cta-live {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card.is-live:hover .cta-arrow {
  transform: translate(2px, -2px);
}

.cta-arrow {
  transition: transform 0.2s ease;
}

.cta-wip {
  color: var(--text-subtle);
  font-weight: 500;
}

.host-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 400;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-sep {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .topbar {
    margin-bottom: 36px;
  }
  .search-wrap {
    width: 100%;
  }
}
