:root {
  --bg: #12141a;
  --surface: #1a1e27;
  --border: #2a3140;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --accent: #c8d0dc;
  --row-hover: #222833;
  --radius: 8px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
}

body {
  min-height: 100vh;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.bg-art {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 26, 0.28);
}

.bg-art img {
  position: absolute;
  left: -8%;
  top: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  opacity: 0.92;
  filter: saturate(0.95) brightness(0.92);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.note a,
.footer a {
  color: #b7c7df;
}

@media (prefers-reduced-motion: reduce) {
  .bg-art img {
    transform: none !important;
  }
}


.header {
  margin-bottom: 0.2rem;
  padding: 0.85rem 1rem;
  background: rgba(26, 30, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.subtitle a,
.footer a {
  color: #b7c7df;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.4rem 0 0.75rem;
  padding: 0.9rem;
  background: rgba(26, 30, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 7.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field.grow {
  flex: 1 1 12rem;
}

.field input,
.field select,
.reset {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
}

.field input:focus,
.field select:focus,
.reset:focus {
  outline: 2px solid #5b6b84;
  outline-offset: 1px;
}

.reset {
  align-self: end;
  cursor: pointer;
  color: var(--accent);
}

.reset:hover {
  border-color: var(--accent);
}

.count {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(26, 30, 39, 0.8);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: left;
  font-size: 0.92rem;
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  background: rgba(26, 30, 39, 0.8);
  position: sticky;
  top: 0;
}

tbody tr:hover {
  background: rgba(34, 40, 51, 0.8);
}

.cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: #0d0f14;
  display: block;
  cursor: zoom-in;
}

button.cover-btn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 4px;
}

button.cover-btn:focus-visible {
  outline: 2px solid #5b6b84;
  outline-offset: 2px;
}

.cover-fallback {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  background: #0d0f14;
  border: 1px dashed var(--border);
}

.title {
  font-weight: 560;
  max-width: 22rem;
}

.title-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(183, 199, 223, 0.35);
  text-underline-offset: 0.15em;
}

.title-link:hover {
  color: #e4ecf8;
  text-decoration-color: #b7c7df;
}

.genres,
.country,
.label-cell {
  color: var(--muted);
  max-width: 14rem;
}

.price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

a {
  color: #b7c7df;
}

a:hover {
  color: #e4ecf8;
}

.cards {
  display: none;
}

.footer {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .table-wrap {
    display: none;
  }

  .cards {
    display: grid;
    gap: 0.75rem;
  }

  .card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    padding: 0.8rem;
    background: rgba(26, 30, 39, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .card .cover,
  .card .cover-fallback {
    width: 72px;
    height: 72px;
  }

  .card h2 {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    font-weight: 600;
  }

  .card .meta {
    margin: 0.15rem 0;
    color: var(--muted);
    font-size: 0.85rem;
  }

  .card .price {
    margin-top: 0.35rem;
    display: inline-block;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(8, 10, 14, 0.88);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 720px);
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  cursor: default;
}

.lightbox-caption {
  margin: 0;
  max-width: min(92vw, 720px);
  text-align: center;
  color: var(--accent);
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}

.lightbox-close:hover {
  color: #fff;
}

body.lightbox-open {
  overflow: hidden;
}
