:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --surface: #101010;
  --surface-2: #171717;
  --text: #f7f7f4;
  --muted: #9d9d98;
  --soft: #d7d7d0;
  --line: rgba(247, 247, 244, 0.13);
  --line-strong: rgba(247, 247, 244, 0.28);
  --paper: #f2f0ea;
  --ink: #050505;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(247, 247, 244, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 247, 244, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px, 72px 72px;
  color: var(--text);
}

body.sheet-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.header-actions,
.hero-actions,
.trust-row,
.filter-row,
.sheet-actions,
.product-bottom,
.lookup-panel,
.admin-tools {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: fit-content;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--paper);
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--ink) 5px 10px);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(5, 5, 5, 0.85);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-left-color: transparent;
  border-radius: 50%;
  background: rgba(242, 240, 234, 0.9);
}

.brand-name {
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

.top-nav {
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.top-nav a:hover {
  color: var(--paper);
}

.header-actions {
  gap: 8px;
}

.icon-button,
.nav-cta,
.button,
.ghost-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(247, 247, 244, 0.04);
  color: var(--text);
  font-weight: 900;
}

.icon-button {
  width: 44px;
  padding: 0;
}

.nav-cta,
.button {
  padding: 0 18px;
}

.button.primary,
.nav-cta {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.button.secondary,
.ghost-link {
  background: transparent;
}

.button.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(34px, 6vw, 86px) clamp(16px, 4vw, 56px) 54px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.08;
}

.lead {
  max-width: 690px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  border: 1px solid var(--line);
}

.trust-row span {
  min-height: 38px;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.025);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trust-row span:last-child {
  border-right: 0;
}

.hero-showcase {
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.86);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.showcase-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.showcase-top strong {
  color: var(--paper);
}

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

.section {
  padding: 70px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.muted-section {
  background:
    repeating-linear-gradient(135deg, rgba(247, 247, 244, 0.035) 0 1px, transparent 1px 18px),
    #080808;
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.catalog-toolbar.compact {
  margin-top: 22px;
}

.search-box {
  display: grid;
  gap: 7px;
}

.search-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: rgba(247, 247, 244, 0.035);
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--paper);
  background: rgba(247, 247, 244, 0.065);
}

.filter-row {
  gap: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-chip:last-child {
  border-right: 0;
}

.filter-chip.active {
  background: var(--paper);
  color: var(--ink);
}

.game-grid,
.product-grid,
.feature-grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.game-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.product-grid {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-tile,
.product-card,
.feature-item,
.stats-grid article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(247, 247, 244, 0.045), rgba(247, 247, 244, 0.015)),
    var(--bg-2);
  color: var(--text);
  text-align: left;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.game-tile:hover,
.product-card:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(247, 247, 244, 0.082), rgba(247, 247, 244, 0.02)),
    #0d0d0d;
}

.compact-tile {
  min-height: 190px;
}

.game-tile img,
.game-head img,
.selected-product img {
  width: 66px;
  height: 66px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: cover;
}

.game-tile::after,
.product-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  pointer-events: none;
}

.tile-badge,
.product-badge,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(247, 247, 244, 0.03);
  color: var(--paper);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.game-tile strong {
  font-size: 21px;
  line-height: 1.04;
}

.game-tile small,
.product-card p,
.feature-item span,
.support-section p,
#gameDescription,
.modal-head p,
.result-box span,
.confirm-box span {
  color: var(--muted);
  line-height: 1.48;
}

.game-tile b {
  width: fit-content;
  color: var(--paper);
  font-size: 12px;
}

.game-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.game-head img {
  width: 88px;
  height: 88px;
}

.ghost-link {
  width: fit-content;
  margin-bottom: 18px;
  padding: 0 13px;
}

.product-card {
  min-height: 190px;
}

.product-bottom {
  align-self: end;
  justify-content: space-between;
  gap: 12px;
}

.product-bottom strong {
  color: var(--paper);
  font-size: 20px;
}

.feature-item {
  min-height: 162px;
}

.feature-item strong {
  font-size: 18px;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background: linear-gradient(90deg, rgba(247, 247, 244, 0.05), transparent 54%), #050505;
}

.lookup-panel,
.admin-login,
.admin-tools {
  gap: 12px;
  max-width: 820px;
  margin-bottom: 18px;
}

.lookup-panel .search-box,
.admin-login .search-box,
.admin-tools .search-box {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--bg-2);
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--soft);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.74);
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 780px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 20px 14px 24px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #080808;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 247, 244, 0.05);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.modal-head {
  padding-right: 44px;
}

.modal-head h2 {
  margin: 10px 0 8px;
  font-size: 34px;
}

.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
}

.selected-product {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.035);
}

.selected-product span {
  display: grid;
  gap: 4px;
}

.selected-product small {
  color: var(--muted);
  word-break: break-word;
}

.sheet-input {
  margin-bottom: 10px;
}

.confirm-box,
.result-box {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(247, 247, 244, 0.035);
}

.confirm-box dl,
.result-box dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.confirm-box div,
.result-box div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.confirm-box dt,
.result-box dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.confirm-box dd,
.result-box dd {
  margin: 0;
  word-break: break-word;
}

.sheet-actions {
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stats-grid article {
  min-height: 112px;
}

.stats-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-grid strong {
  font-size: 30px;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 28px;
  background: var(--bg-2);
  color: var(--muted);
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .product-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .top-nav {
    display: none;
  }

  .hero,
  .catalog-toolbar,
  .support-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
    padding: 12px;
  }

  .brand-name {
    font-size: 12px;
  }

  .nav-cta {
    display: none;
  }

  .hero,
  .section {
    padding: 36px 12px;
  }

  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 16px;
  }

  .trust-row,
  .showcase-grid,
  .game-grid,
  .product-grid,
  .feature-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .trust-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-row span:last-child {
    border-bottom: 0;
  }

  .lookup-panel,
  .admin-login,
  .admin-tools,
  .sheet-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .selected-product {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .selected-product b {
    grid-column: 2;
  }
}
