:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #11161e;
  --line: #252d39;
  --muted: #929dad;
  --text: #eef2f7;
  --accent: #ffbd2e;
  --accent2: #ffe19a;
}

* {
  box-sizing: border-box;
}

html.lang-pending body {
  visibility: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, #29210d 0, transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "IBM Plex Sans", system-ui, sans-serif;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
  padding: 72px 0 96px;
}

header {
  position: relative;
  z-index: 3;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 680px;
  margin: 22px 0 36px;
  color: #b8c0cc;
  font-size: 18px;
  line-height: 1.7;
}

.lang {
  position: relative;
  z-index: 10;
  flex: none;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 104px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #171d26;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.lang-toggle .lang-flag {
  font-size: 18px;
}

.lang-toggle .lang-name {
  font-size: 13px;
}

.lang-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lang-menu button:hover,
.lang-menu button[aria-checked="true"] {
  background: #171d26;
  color: var(--accent2);
}

.lang-menu span {
  font-size: 18px;
}

.lang-menu b {
  font-size: 13px;
}

.search {
  position: sticky;
  top: 16px;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 22, 30, 0.88);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

input {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

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

.filters {
  display: flex;
  flex: none;
  gap: 6px;
}

.filter,
.url button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #171d26;
  color: #cbd2db;
  font-weight: 700;
  cursor: pointer;
}

.filter {
  padding: 0 15px;
  white-space: nowrap;
}

.filter.active {
  border-color: #6e581f;
  background: #2b250f;
  color: var(--accent2);
}

.summary {
  display: flex;
  justify-content: space-between;
  margin: 28px 2px 14px;
  color: var(--muted);
  font-size: 14px;
}

.summary a {
  color: var(--accent2);
  text-decoration: none;
}

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

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(20, 26, 35, 0.98),
    rgba(13, 17, 24, 0.98)
  );
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.card[hidden] {
  display: none;
}

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

.kind {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.version {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.description {
  min-height: 52px;
  color: #aeb7c4;
  line-height: 1.6;
}

.url {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 16px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #090d13;
}

.url code {
  min-width: 0;
  overflow: hidden;
  color: #dbe4ef;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url button {
  margin-left: auto;
  padding: 7px 10px;
}

.tags,
.packages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 5px 8px;
  border-radius: 7px;
  background: #202734;
  color: #b9c5d3;
  font-size: 11px;
}

.packages {
  align-items: center;
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}

.packages b {
  margin-right: 3px;
}

.packages code {
  color: #8f9bab;
}

.license {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent2);
  font-size: 11px;
  text-decoration: none;
}

.license:hover {
  text-decoration: underline;
}

footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #727e8e;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 760px) {
  main {
    padding-top: 48px;
  }

  .intro {
    font-size: 16px;
  }

  .search {
    position: static;
    display: block;
  }

  .filters {
    margin-top: 8px;
  }

  .filter {
    min-height: 38px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .description {
    min-height: 0;
  }

  .card-top {
    display: block;
  }

  .version {
    display: block;
    margin-top: 8px;
  }
}
