:root {
  color-scheme: dark;
  --bg: #061725;
  --bg-2: #082033;
  --panel: rgba(8, 31, 49, .74);
  --panel-strong: rgba(11, 42, 65, .92);
  --line: rgba(138, 221, 255, .22);
  --line-strong: rgba(124, 247, 230, .42);
  --text: #f3fbff;
  --muted: #9fb7c6;
  --soft: #cfe4ee;
  --cyan: #42dff5;
  --aqua: #7cf7e6;
  --gold: #e2c24d;
  --danger: #ff6887;
  --shadow: 0 30px 90px rgba(0, 0, 0, .45);
  --radius: 22px;
  --max: 1280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(66, 223, 245, .22), transparent 27%),
    radial-gradient(circle at 82% 12%, rgba(226, 194, 77, .14), transparent 24%),
    linear-gradient(145deg, #04101b 0%, var(--bg) 42%, #03111c 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

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

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .74;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 16, 27, .82);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #7cf7e6 0%, #30c8ff 54%, #e0c34d 100%);
  box-shadow: 0 12px 38px rgba(66, 223, 245, .32);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 11px 9px 12px 8px;
  border: solid rgba(255, 255, 255, .94);
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 19px;
  transform: rotate(-15deg);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.top-actions a,
.top-actions button,
.primary-link,
.ghost-link,
.launch-button,
.input-action button {
  min-height: 42px;
  border: 1px solid rgba(159, 183, 198, .24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(12, 34, 52, .8);
  cursor: pointer;
}

.top-actions a,
.top-actions button {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
}

.top-actions button {
  appearance: none;
}

main {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 96px) 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 430px;
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 96px);
}

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

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: 92px;
  line-height: .94;
  letter-spacing: 0;
  overflow-wrap: normal;
}

h2 {
  margin-bottom: 0;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 710px;
  margin-bottom: 34px;
  color: var(--soft);
  font-size: 23px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0 24px;
  font-weight: 800;
}

.primary-link,
.launch-button {
  border: 0;
  color: #03111c;
  background: linear-gradient(135deg, var(--aqua), var(--gold));
  box-shadow: 0 18px 50px rgba(124, 247, 230, .24);
}

.ghost-link {
  background: rgba(9, 31, 49, .58);
}

.launcher,
.workflow article,
.catalog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(9, 30, 47, .86), rgba(4, 17, 28, .76));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.launcher {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.launcher::before {
  content: "";
  position: absolute;
  inset: -90px -120px auto auto;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 247, 230, .34), transparent 68%);
}

.launcher-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.launcher-head span,
label span,
.selected-game span,
.search-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.launcher-head strong {
  color: var(--aqua);
  font-size: 42px;
}

label {
  display: grid;
  gap: 9px;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(159, 183, 198, .28);
  border-radius: 14px;
  color: var(--text);
  background: rgba(4, 16, 27, .74);
  outline: none;
  padding: 0 15px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 21px,
    calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

input:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(66, 223, 245, .12);
}

.input-action button {
  border-radius: 14px;
  color: #04101b;
  font-weight: 800;
  background: linear-gradient(135deg, var(--aqua), var(--gold));
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.selected-game {
  display: grid;
  gap: 8px;
  margin: 20px 0 18px;
  padding: 16px;
  border: 1px solid rgba(124, 247, 230, .2);
  border-radius: 16px;
  background: rgba(124, 247, 230, .06);
}

.selected-game strong {
  min-height: 24px;
  font-size: 20px;
}

.launch-button {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 900;
}

.launch-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.4);
}

.fine-print {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: -46px;
}

.workflow article {
  min-height: 154px;
  padding: 22px 24px;
}

.workflow span {
  display: block;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .22em;
}

.workflow strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.workflow p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.catalog {
  margin-top: 48px;
  padding: clamp(20px, 3vw, 34px);
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.catalog-tools {
  min-width: min(420px, 100%);
}

.search-box {
  grid-template-columns: 1fr;
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 3px 12px;
  scrollbar-color: rgba(124, 247, 230, .62) rgba(255, 255, 255, .08);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid rgba(159, 183, 198, .22);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(6, 23, 37, .72);
  padding: 0 16px;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  color: #03111c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--aqua), var(--gold));
  font-weight: 900;
}

.tab small {
  opacity: .72;
}

.status-line {
  min-height: 24px;
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.status-line.error {
  color: var(--danger);
}

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

.game-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(159, 183, 198, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% 8%, rgba(226, 194, 77, .22), transparent 35%),
    linear-gradient(145deg, rgba(12, 43, 65, .92), rgba(4, 16, 27, .9));
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(4, 16, 27, .12) 42%, rgba(4, 16, 27, .76) 100%),
    radial-gradient(circle at 88% 4%, rgba(226, 194, 77, .18), transparent 28%);
  z-index: 1;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 247, 230, .1), transparent 48%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  z-index: 2;
}

.game-card:hover::after {
  opacity: 1;
}

.game-art,
.game-card-body,
.game-meta,
.game-card h3,
.game-card button {
  position: relative;
  z-index: 3;
}

.game-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 20%, rgba(124, 247, 230, .24), transparent 32%),
    linear-gradient(135deg, rgba(4, 16, 27, .95), rgba(12, 43, 65, .88));
}

.game-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.018);
  transition: transform .24s ease, filter .24s ease;
}

.game-card:hover .game-art img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.052);
}

.game-card.missing-art .game-art {
  display: none;
}

.game-card-body {
  min-height: 172px;
  padding: 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.game-id {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(124, 247, 230, .28);
  border-radius: 999px;
  color: var(--aqua);
  padding: 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

.game-card h3 {
  min-height: 54px;
  margin: 0 0 14px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

.game-card button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(124, 247, 230, .28);
  border-radius: 14px;
  color: var(--text);
  background: rgba(4, 16, 27, .68);
  cursor: pointer;
}

.game-card button:hover {
  color: #03111c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--aqua), var(--gold));
  font-weight: 900;
}

.empty {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(159, 183, 198, .32);
  border-radius: 18px;
  color: var(--muted);
}

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(1, 8, 13, .7);
  backdrop-filter: blur(12px);
}

.launch-overlay[hidden] {
  display: none;
}

.launch-modal {
  width: min(420px, calc(100% - 40px));
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
}

.launch-modal strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 22px;
}

.launch-modal p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 3px solid rgba(124, 247, 230, .16);
  border-top-color: var(--aqua);
  border-radius: 50%;
  animation: spin .82s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .topbar {
    gap: 16px;
  }

  main {
    padding-top: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
  }

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

  h1 {
    max-width: 760px;
    font-size: 64px;
    line-height: 1;
  }

  h2 {
    font-size: 42px;
  }

  .lede {
    max-width: 720px;
    font-size: 20px;
  }

  .launcher {
    width: 100%;
    max-width: 680px;
  }

  .workflow {
    margin-top: 30px;
  }

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

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .brand small,
  .top-actions a {
    display: none;
  }

  main {
    width: min(100% - 28px, var(--max));
    padding-top: 32px;
  }

  h1 {
    font-size: 44px;
    line-height: 1.03;
  }

  .lede {
    font-size: 17px;
  }

  .hero-actions,
  .field-grid,
  .workflow,
  .section-title {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .primary-link,
  .ghost-link {
    width: 100%;
  }

  .workflow {
    display: grid;
  }

  .section-title {
    display: grid;
    align-items: stretch;
  }

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

@media (max-width: 460px) {
  .brand strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  h1 {
    font-size: 38px;
  }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
