:root {
  color-scheme: light;
  --ink: #1e252d;
  --muted: #66707d;
  --line: #dbe1e8;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --green: #19765a;
  --red: #b84435;
  --gold: #b17622;
  --blue: #286cae;
  --violet: #684c9d;
  --shadow: 0 18px 46px rgba(31, 38, 46, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 251, 0.96)),
    url("https://cdn-mainsite-aka.vnggames.com/products/jx1m/share_2026.jpg") center top / cover fixed;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(219, 225, 232, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
}

.quick-nav {
  display: flex;
  gap: 8px;
}

.quick-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: #313a45;
  background: #fff;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: clamp(34px, 6vw, 78px) 0 42px;
}

.hero-copy {
  max-width: 650px;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 560px;
  margin: 22px 0 0;
  color: #46505d;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.hero-media {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  grid-auto-rows: 172px;
  gap: 12px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.hero-media img:first-child {
  grid-row: span 2;
  border-radius: 8px;
}

.hero-media img:nth-child(2),
.hero-media img:nth-child(3) {
  border-radius: 8px;
}

.control-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 38, 46, 0.08);
}

.search-field {
  display: grid;
  gap: 7px;
  width: min(520px, 100%);
}

.search-field label {
  color: #3a434f;
  font-weight: 750;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
}

.search-field input:focus {
  outline: 3px solid rgba(40, 108, 174, 0.18);
  border-color: var(--blue);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: #313b46;
  cursor: pointer;
}

.filter.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0 10px;
}

.stat-item {
  min-height: 88px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-item strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.stat-item span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 20px;
  align-items: start;
  padding: 22px 0 58px;
}

.section-head {
  margin: 0 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

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

.game-card {
  overflow: hidden;
  min-height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 38, 46, 0.08);
}

.game-card.is-selected {
  border-color: rgba(40, 108, 174, 0.75);
  box-shadow: 0 18px 44px rgba(40, 108, 174, 0.17);
}

.game-shot {
  position: relative;
  height: 162px;
  background: #d6dce3;
}

.game-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-shot::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
}

.status-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.alias {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.tag {
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf1f5;
  color: #34404c;
  font-size: 0.8rem;
  font-weight: 700;
}

.tag.mobile {
  background: #e8f4ee;
  color: var(--green);
}

.tag.pc {
  background: #eaf1f9;
  color: var(--blue);
}

.tag.web {
  background: #f6efe3;
  color: var(--gold);
}

.summary {
  margin: 0;
  color: #4d5966;
  line-height: 1.55;
}

.card-actions {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.primary-action {
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.secondary-action {
  border: 1px solid var(--line);
  color: #2e3944;
}

.detail-panel {
  position: sticky;
  top: 86px;
  min-height: 420px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.detail-hero {
  height: 170px;
  background: #d6dce3;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  padding: 18px;
}

.detail-body h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.detail-subtitle {
  margin: 8px 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.info-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.info-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f4;
}

.info-row dt {
  color: var(--muted);
  font-weight: 750;
}

.info-row dd {
  margin: 0;
  color: #2f3944;
}

.detail-body h3 {
  margin: 18px 0 10px;
  font-size: 1rem;
}

.feature-list {
  margin: 0;
  padding-left: 19px;
  color: #3b4652;
  line-height: 1.55;
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.link-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-item strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 0.82rem;
}

.source-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.no-results {
  grid-column: 1 / -1;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px clamp(18px, 4vw, 54px) 32px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .hero,
  .content-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .control-band {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-nav {
    width: 100%;
  }

  .quick-nav a {
    flex: 1;
    text-align: center;
  }

  .hero-media {
    grid-template-columns: 1fr;
    grid-auto-rows: 170px;
  }

  .hero-media img:first-child {
    grid-row: auto;
  }

  .stats,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter {
    padding: 0 10px;
  }
}

@media (max-width: 420px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .card-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
