:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef4fb;
  --ink: #132033;
  --muted: #647086;
  --line: #dce6f2;
  --primary: #2457d6;
  --teal: #14b8a6;
  --purple: #7c3aed;
  --radius: 8px;
  --shadow: 0 16px 40px rgba(21, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(36, 87, 214, 0.14), transparent 22rem),
    linear-gradient(180deg, #f8fbff, var(--bg));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.gallery-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.gallery-topbar,
.gallery-hero,
.screenshot-section,
.missing-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.gallery-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  font-weight: 900;
}

.brand img {
  width: 36px;
  height: 36px;
}

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

.button,
.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #ffffff;
}

.gallery-hero {
  padding: clamp(1.25rem, 4vw, 2.2rem);
  margin-bottom: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.16), transparent 16rem),
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.12), transparent 18rem),
    var(--surface);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.screenshot-section {
  padding: clamp(1rem, 3vw, 1.4rem);
  margin-top: 18px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 2px;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.count-badge,
.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 900;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.screenshot-card {
  overflow: hidden;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(21, 32, 51, 0.08);
}

.screenshot-card--landscape {
  grid-column: span 2;
}

.screenshot-thumb {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(36, 87, 214, 0.08), rgba(20, 184, 166, 0.07)),
    var(--surface-2);
}

.screenshot-card--portrait .screenshot-thumb img {
  max-height: 520px;
  width: auto;
  max-width: 100%;
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.screenshot-card--landscape .screenshot-thumb {
  min-height: 260px;
}

.screenshot-card--landscape .screenshot-thumb img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.screenshot-thumb img {
  display: block;
  height: auto;
  object-fit: contain;
}

.screenshot-meta {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.screenshot-meta h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.screenshot-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.missing-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: clamp(1rem, 3vw, 1.4rem);
}

.missing-list ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .screenshot-card--landscape {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .gallery-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

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

  .screenshot-card--portrait .screenshot-thumb img {
    max-height: 440px;
  }
}
