:root {
  --bg: #0b0f15;
  --surface: #111821;
  --surface-2: #151e29;
  --border: rgba(255,255,255,.09);
  --text: #f3f6fa;
  --muted: #96a2b1;
  --accent: #8fd14f;
  --accent-strong: #a7eb65;
  --accent-soft: rgba(143,209,79,.12);
  --shadow: 0 22px 55px rgba(0,0,0,.28);
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(58,88,116,.16), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(143,209,79,.08), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent);
}

.nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 30px rgba(143,209,79,.15);
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.nav-link:hover { color: var(--text); }

.hero-content {
  padding: 48px 0 43px;
}

.eyebrow, .plugin-type {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}

h1 span {
  color: var(--muted);
}

.intro {
  max-width: 650px;
  margin: 28px 0 0;
  color: #b5bfca;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  color: var(--muted);
  font-size: .9rem;
}

.dot { color: #52606e; }

.toolbar {
  display: grid;
  gap: 18px;
  margin: 30px 0 36px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent),
    rgba(17,24,33,.76);
  box-shadow: 0 14px 38px rgba(0,0,0,.16);
}

.filter-row {
  display: grid;
  gap: 24px;
}

.filter-row-primary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 280px;
  align-items: end;
}

.filter-row-bottom {
  grid-template-columns: 1fr;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.filter-group,
.search {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.filter-label {
  color: #8d9aaa;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

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

.filter, .search input {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
}

.filter {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition: .18s ease;
}

.filter:hover {
  color: #dce4eb;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.035);
}

.filter.active {
  color: var(--text);
  border-color: rgba(143,209,79,.44);
  background: rgba(143,209,79,.13);
  box-shadow: inset 0 0 0 1px rgba(143,209,79,.05);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 10px;
  outline: none;
}

.search input:focus {
  border-color: rgba(143,209,79,.55);
  box-shadow: 0 0 0 3px rgba(143,209,79,.09);
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
  padding-bottom: 64px;
}

.plugin-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent 45%), var(--surface);
  box-shadow: var(--shadow);
}

.card-image-wrap {
  position: relative;
  min-height: 160px;
  background: #080b10;
  border-bottom: 1px solid var(--border);
}

.card-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-image[hidden] {
  display: none;
}

.status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(143,209,79,.28);
  border-radius: 999px;
  background: rgba(11,15,21,.84);
  backdrop-filter: blur(10px);
  color: var(--accent-strong);
  font-size: .74rem;
  font-weight: 750;
}

.status-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(143,209,79,.7);
}

.status-badge.coming-soon {
  border-color: rgba(224,184,74,.32);
  color: #f0cf72;
}

.status-badge.coming-soon::before {
  background: #e0b84a;
  box-shadow: 0 0 10px rgba(224,184,74,.55);
}

.status-badge.archived {
  border-color: rgba(150,162,177,.24);
  color: var(--muted);
}

.status-badge.archived::before {
  background: #7f8b98;
  box-shadow: none;
}

.card-actions.source-only {
  grid-template-columns: 1fr;
}

.card-body { padding: 24px; }

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.plugin-type {
  margin-bottom: 5px;
  font-size: .68rem;
}

.plugin-name {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.version-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #c6ced7;
  background: rgba(255,255,255,.025);
  font: 700 .78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.plugin-description {
  min-height: 66px;
  margin: 16px 0 18px;
  color: #aab4c0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.tag {
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--surface-2);
  color: #aeb8c5;
  font-size: .76rem;
}

.dependency-section {
  display: grid;
  gap: 10px;
  margin: -4px 0 22px;
}

.dependency-row {
  display: grid;
  gap: 6px;
}

.dependency-label {
  color: #778493;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dependency-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dependency {
  padding: 5px 9px;
  border: 1px solid rgba(143,209,79,.22);
  border-radius: 7px;
  background: rgba(143,209,79,.08);
  color: #cfe9b4;
  font-size: .76rem;
}

.dependency.optional {
  border-color: var(--border);
  background: var(--surface-2);
  color: #9da8b6;
}

.dependency[hidden] {
  display: none;
}

.dependency-toggle {
  padding: 5px 9px;
  border: 1px dashed rgba(143,209,79,.28);
  border-radius: 7px;
  background: rgba(143,209,79,.06);
  color: #b8d69a;
  font: inherit;
  font-size: .76rem;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.dependency-toggle:hover {
  border-color: rgba(143,209,79,.5);
  background: rgba(143,209,79,.11);
  color: #d5efbc;
}

.release-meta {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  margin: 0 0 22px;
  padding: 17px 0;
  border-block: 1px solid var(--border);
}

.release-meta div { min-width: 0; }

.release-meta dt {
  margin-bottom: 3px;
  color: #778493;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.release-meta dd {
  margin: 0;
  color: #d5dbe2;
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-1px); }

.button.primary {
  background: var(--accent);
  color: #0a0f07;
}

.button.primary:hover { background: var(--accent-strong); }

.button.secondary {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #dde3e9;
}

.button.secondary:hover { border-color: rgba(255,255,255,.18); }

.secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 20px;
  margin-top: 16px;
}

.secondary-links a {
  color: #8996a5;
  font-size: .8rem;
  text-decoration: none;
}

.secondary-links a:hover { color: var(--text); }

.loading-card, .notice, .empty-state {
  grid-column: 1 / -1;
  padding: 44px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0 38px;
  border-top: 1px solid var(--border);
  color: #687584;
  font-size: .8rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) and (min-width: 761px) {
  .filter-row-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row-primary .search {
    grid-column: 1 / -1;
    max-width: 360px;
  }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1120px); }
  .hero-content { padding: 40px 0 36px; }
  .toolbar { margin-top: 22px; padding: 16px; }
  .filter-row,
  .filter-row-primary,
  .filter-row-bottom { grid-template-columns: 1fr; gap: 16px; }
  .filter-row-bottom { padding-top: 16px; }
  .search { width: 100%; }
  .search input { width: 100%; min-width: 0; }
  .plugin-grid { grid-template-columns: 1fr; }
  .plugin-description { min-height: auto; }
  .footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .hero-meta .dot { display: none; }
  .hero-meta { flex-direction: column; }
  .card-body { padding: 20px; }
  .release-meta { grid-template-columns: 1fr; }
}
