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

:root {
  --bg-0: #0b0e20;
  --bg-1: #171a3a;
  --primary: #7c5cff;
  --cyan: #22d3ee;
  --pink: #ff5ca8;
  --gold: #ffb347;
  --text: #eef0ff;
  --text-dim: #9aa0c8;
  --panel: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
}

html, body { min-height: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% 18%, var(--bg-1), var(--bg-0) 70%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body > *:not(#starfield) { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.brand-text em {
  font-style: normal;
  margin-left: 10px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, .35);
  border-radius: 999px;
  letter-spacing: 2px;
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.gh-link:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .18); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px;
  margin: 56px auto 36px;
  padding: 0 24px;
  text-align: center;
}

.kicker {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--cyan) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: clamp(14px, 2vw, 17px);
}

.badges {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text);
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* ---------- Filters ---------- */
.filters {
  max-width: 1180px;
  margin: 10px auto 28px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  font: inherit;
  font-size: 14px;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all .2s ease;
}
.chip:hover { color: var(--text); border-color: rgba(124, 92, 255, .5); }
.chip.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, .9), rgba(34, 211, 238, .75));
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(124, 92, 255, .35);
}

/* ---------- Grid ---------- */
.grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, .55);
  box-shadow: 0 18px 44px rgba(7, 9, 25, .55), 0 0 0 1px rgba(124, 92, 255, .25);
}

.card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, color-mix(in srgb, var(--c1, #7c5cff) 55%, transparent), transparent 70%);
  opacity: .5;
  transition: opacity .25s ease, transform .35s ease;
}
.card:hover .card-glow { opacity: .9; transform: scale(1.25); }

.card-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--c1) 35%, transparent);
  margin-bottom: 18px;
}

.card h2 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }

.card p {
  font-size: 13.5px;
  color: var(--text-dim);
  flex: 1;
}

.tag {
  margin-top: 16px;
  align-self: flex-start;
  font-size: 12px;
  color: var(--cyan);
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .25);
}

.card.hidden { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 28px 24px 44px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.site-footer a { color: var(--cyan); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .brand-text { font-size: 15px; }
  .brand-text em { display: none; }
  .hero { margin-top: 30px; }
  .grid { grid-template-columns: 1fr; }
}
