:root {
  --bg: #111216;
  --panel: #242529;
  --panel-border: #353740;
  --ink: #f4f6fb;
  --muted: #9aa1b2;
  --faint: #747b8d;
  --blue: #4b96ff;
  --blue-hover: #5ca2ff;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1460px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(17, 18, 22, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff9a16, #ff6f00);
  color: #fff;
}

.nav {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover {
  color: var(--ink);
}

.list-shell {
  width: min(1460px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.tabs {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  min-height: 52px;
  margin-bottom: 8px;
}

.tab {
  position: relative;
  min-height: 46px;
  cursor: pointer;
  border: 0;
  padding: 0 5px;
  background: transparent;
  color: #697083;
  font: inherit;
  font-size: 23px;
  font-weight: 900;
}

.tab.is-active {
  color: var(--ink);
}

.tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: #4c8cff;
  content: "";
}

.toolbar {
  display: flex;
  max-width: 660px;
  gap: 12px;
  margin: 10px 0 8px;
}

input,
select {
  min-height: 42px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #1a1b20;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

input {
  width: min(420px, 100%);
  padding: 0 14px;
}

select {
  width: 180px;
  padding: 0 12px;
}

input::placeholder {
  color: #6f7585;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding-top: 18px;
}

.plugin-card {
  display: flex;
  min-height: 336px;
  flex-direction: column;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-top {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-height: 82px;
}

.icon-box {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: #f5f6fb;
  color: #4d8cff;
  font-size: 24px;
  font-weight: 900;
}

.icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title-block {
  min-width: 0;
}

.plugin-card h2 {
  display: -webkit-box;
  min-height: 64px;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.desc {
  display: -webkit-box;
  flex: 1;
  margin: 28px 0 24px;
  overflow: hidden;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.meta {
  color: var(--faint);
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
}

.install-button {
  display: inline-flex;
  min-width: 94px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 23px;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(75, 150, 255, 0.28);
}

.install-button:hover {
  background: var(--blue-hover);
}

.empty-state {
  grid-column: 1 / -1;
  margin: 36px 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.site-footer {
  width: min(1460px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}

.footer-links a:hover {
  color: var(--ink);
}

.floating-tags {
  position: fixed;
  left: 0;
  top: 52vh;
  z-index: 60;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.floating-tags-panel {
  display: grid;
  gap: 10px;
  transform: translateX(-112px);
  transition: transform 220ms ease;
}

.floating-tags:hover .floating-tags-panel,
.floating-tags:focus-within .floating-tags-panel,
.floating-tags.is-open .floating-tags-panel {
  transform: translateX(0);
}

.floating-tags-handle {
  width: 34px;
  height: 78px;
  cursor: pointer;
  border: 0;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(180deg, #ff9c1a, #ff6d00);
  box-shadow: 0 14px 34px rgba(255, 138, 0, 0.24);
  pointer-events: auto;
}

.floating-tags-handle span {
  display: block;
  width: 5px;
  height: 34px;
  margin: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.floating-tag {
  position: relative;
  display: flex;
  width: 158px;
  min-height: 50px;
  align-items: center;
  overflow: hidden;
  padding: 0 18px 0 20px;
  border-radius: 0 18px 18px 0;
  color: #fff;
  font-weight: 900;
  isolation: isolate;
  pointer-events: auto;
  box-shadow: 0 14px 34px rgba(93, 124, 248, 0.18);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.floating-tag::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--floating-gradient);
  background-size: 180% 180%;
  content: "";
  animation: floating-tag-flow 7s ease infinite;
}

.floating-tag::after {
  position: absolute;
  top: -26px;
  right: -18px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  content: "";
  filter: blur(2px);
}

.floating-tag:hover {
  transform: translateX(5px);
  box-shadow: 0 18px 40px rgba(255, 138, 0, 0.22);
}

.floating-tag-home {
  --floating-gradient: linear-gradient(135deg, #ff9c1a, #ff6d00, #ffc46b);
}

.floating-tag-rules {
  --floating-gradient: linear-gradient(135deg, #31dc88, #24c8bd, #5e93ff);
}

.floating-tag-plugin {
  --floating-gradient: linear-gradient(135deg, #7c6bff, #b14bff, #ff7bc1);
}

@keyframes floating-tag-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@media (max-width: 1180px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .list-shell,
  .site-footer {
    width: calc(100vw - 32px);
  }

  .toolbar {
    flex-direction: column;
  }

  input,
  select {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .plugin-card {
    min-height: 300px;
    padding: 24px;
  }

  .plugin-card h2 {
    font-size: 22px;
  }

  .desc {
    font-size: 16px;
  }
}
