:root {
  color-scheme: dark;
  --bg: #0b1013;
  --panel: #151d20;
  --border: #293438;
  --muted: #9aa9ac;
  --accent: #b9e46c;
  --text: #f1f5f1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(
      ellipse at 75% 0%,
      rgba(105, 130, 75, 0.13),
      transparent 43%
    ),
    #0b0f10;
  font: 15px/1.6 system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: 1240px;
  margin: auto;
  padding: 0 24px;
}
.top {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  background: rgba(13, 19, 19, 0.88);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 75px;
}
.brand {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.mark {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #142018;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-right: 9px;
}
.smalllink,
.back {
  color: var(--muted);
  font-size: 13px;
}
/* DE/EN and header spacing */
.top .languages {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: -12px;
  padding: 4px;
  border: 1px solid #35433c;
  border-radius: 10px;
  flex-shrink: 0;
}
.top .languages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 7px 12px;
  border-radius: 7px;
  color: #b8c6bd;
  text-decoration: none;
  font-weight: 750;
  font-size: 12px;
  transition: background 0.2s, color 0.2s;
}
.top .languages a.active {
  background: #b7d57c;
  color: #182017;
}
.top .languages a:not(.active):hover {
  background: #293a30;
  color: #fff;
}
.top .smalllink {
  flex-shrink: 0;
}
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(172, 204, 128, 0.16);
  border-radius: 24px;
  padding: clamp(25px, 5vw, 64px);
  background: linear-gradient(
    115deg,
    rgba(26, 42, 33, 0.9),
    rgba(11, 16, 18, 0.9)
  );
}
.hero:after {
  content: "DZ";
  position: absolute;
  right: 3%;
  top: 5%;
  font-weight: 900;
  font-size: clamp(90px, 18vw, 240px);
  opacity: 0.035;
  pointer-events: none;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.hero h1,
.detail h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: -2px;
  margin: 13px 0;
}
.hero em {
  color: var(--accent);
  font-style: normal;
}
.hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
}
.filters {
  display: grid;
  grid-template-columns: 2fr 1.25fr 1fr 1fr auto;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 16px;
  align-items: end;
}
.filters label {
  min-width: 0;
}
.filters label span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.filters input,
.filters select {
  width: 100%;
  background: #0b1215;
  border: 1px solid #344144;
  border-radius: 9px;
  color: var(--text);
  padding: 12px;
  font: inherit;
  min-width: 0;
}
.filters button,
.copy {
  background: var(--accent);
  border: 0;
  color: #162113;
  padding: 13px 20px;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}
.resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 16px;
}
.resultbar h2 {
  font-size: 21px;
  margin: 0;
}
.resultbar span {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease;
  will-change: transform;
}
.item:hover {
  transform: translateY(-5px);
  border-color: rgba(185, 221, 123, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}
.art {
  height: 175px;
  background: radial-gradient(circle, #2b3936, #10181a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.art img {
  max-width: 83%;
  max-height: 83%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px #0009);
  transition: transform 0.28s ease;
}
.item:hover .art img {
  transform: scale(1.08);
}
.placeholder {
  font-size: 42px;
  font-weight: 900;
  color: #43564e;
}
.itembody {
  padding: 17px;
}
.category {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.item h3 {
  font-size: 17px;
  margin: 5px 0 2px;
  line-height: 1.3;
}
.classname {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.chip {
  font-size: 11px;
  border: 1px solid #405046;
  color: #c9d7ca;
  border-radius: 6px;
  padding: 2px 7px;
}
/* Numbered pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 35px 0;
}
.pagination .page-number,
.pagination .page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}
.pagination a:hover {
  background: #293a30;
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .page-number.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #142018;
  pointer-events: none;
}
.pagination .page-dots {
  padding: 0 5px;
  color: var(--muted);
  font-size: 15px;
}
/* Backwards compatibility with old pagination */
.pagination > a:not(.page-number):not(.page-arrow) {
  color: var(--accent);
}
.alert,
.empty {
  background: #251b1c;
  border: 1px solid #774342;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}
.empty {
  background: var(--panel);
  border-color: var(--border);
}
.footer {
  color: var(--muted);
  padding-top: 50px;
  padding-bottom: 35px;
  font-size: 13px;
}
.footer a {
  color: var(--accent);
}
.detail {
  padding-top: 40px;
}
.detailhero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
  margin: 25px 0 35px;
}
.detailart {
  background: radial-gradient(circle, #2b3936, #10181a);
  border: 1px solid var(--border);
  border-radius: 18px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detailart img {
  max-width: 88%;
  max-height: 270px;
  object-fit: contain;
}
.detailhero p {
  color: var(--muted);
}
.copy {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.copy:hover {
  background: #c9f18a;
  transform: translateY(-2px);
}
.copy.copied {
  background: #238b54;
  color: #fff;
}
.copy.copy-error {
  background: #a83c3c;
  color: #fff;
}
.copy-icon {
  font-size: 16px;
}
.detailgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  min-width: 0;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.stat {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--border);
  padding: 10px 0;
  align-items: start;
}
.stat span {
  color: var(--muted);
  flex: 0 0 35%;
}
.stat strong {
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 65%;
  min-width: 0;
}
code {
  font-family: ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  font-weight: 400;
  font-size: 12px;
}
.more {
  margin-top: 18px;
}
.more summary {
  cursor: pointer;
  font-weight: 700;
}
.rawgrid {
  padding-top: 14px;
}
.nested {
  display: grid;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}
.nestedrow {
  display: grid;
  grid-template-columns: minmax(110px, 35%) minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(180, 200, 180, 0.1);
  padding: 7px 0;
  overflow-wrap: anywhere;
}
.nestedrow > span {
  color: #a6b4aa;
}
.nestedrow > div {
  min-width: 0;
}
.nested .nested {
  border-left: 1px solid #3a4a3d;
  padding-left: 10px;
}
@media (max-width: 950px) {
  .filters {
    grid-template-columns: repeat(2, 1fr);
  }
  .filters button {
    grid-column: 1/-1;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 650px) {
  .wrap {
    padding-left: 15px;
    padding-right: 15px;
  }
  .top .bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 18px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .top .brand {
    width: 100%;
  }
  .top .languages {
    margin-left: 0;
    margin-right: 0;
  }
  .top .smalllink {
    font-size: 12px;
  }
  .hero {
    padding: 28px 20px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .filters button {
    grid-column: auto;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .art {
    height: 130px;
  }
  .itembody {
    padding: 12px;
  }
  .item h3 {
    font-size: 15px;
  }
  .detailhero,
  .detailgrid {
    grid-template-columns: 1fr;
  }
  .detailhero {
    gap: 20px;
  }
  .detailart {
    min-height: 230px;
  }
  .nestedrow {
    grid-template-columns: 1fr;
  }
  .pagination {
    gap: 5px;
  }
  .pagination .page-number,
  .pagination .page-arrow {
    min-width: 34px;
    height: 36px;
    padding: 0 7px;
    font-size: 12px;
  }
}
@media (max-width: 390px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .top .bar {
    gap: 10px 14px;
  }
  .top .languages a {
    padding: 6px 10px;
  }
  .top .smalllink {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .item,
  .item .art img,
  .copy {
    transition: none;
  }
  .item:hover,
  .copy:hover {
    transform: none;
  }
}
