:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #a9b7c7;
  --quiet: #72839a;
  --void: #071016;
  --night: #0b1720;
  --panel: rgba(13, 28, 37, 0.84);
  --panel-strong: rgba(16, 38, 50, 0.94);
  --cyan: #28f3e4;
  --mint: #79ffb0;
  --pink: #ff4fa3;
  --amber: #ffd15c;
  --lime: #b9f35b;
  --violet: #a987ff;
  --danger: #ff6c7a;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  --shadow-crisp: 0 12px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  font-family: "Assistant", "Rubik", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(40, 243, 228, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(155deg, #071016 0%, #0c181f 34%, #17201b 65%, #151019 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 20%, rgba(255, 209, 92, 0.11) 20% 21%, transparent 21% 52%, rgba(255, 79, 163, 0.08) 52% 53%, transparent 53%),
    repeating-linear-gradient(135deg, rgba(121, 255, 176, 0.035) 0 2px, transparent 2px 13px);
  opacity: 0.9;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(7, 16, 22, 0) 0%, rgba(7, 16, 22, 0.42) 72%, rgba(7, 16, 22, 0.96) 100%);
}

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

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 34px) 40px;
}

main {
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 22px;
  background: rgba(7, 16, 22, 0.74);
  box-shadow: var(--shadow-crisp), 0 0 0 1px rgba(40, 243, 228, 0.1) inset;
  backdrop-filter: blur(18px);
  max-width: 100%;
}

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

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(40, 243, 228, 0.95), rgba(121, 255, 176, 0.78) 46%, rgba(255, 209, 92, 0.9)),
    #12232b;
  box-shadow: 0 10px 24px rgba(40, 243, 228, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.brand-mark span {
  width: 17px;
  height: 17px;
  background: #071016;
  clip-path: polygon(50% 0, 63% 33%, 100% 36%, 70% 57%, 81% 93%, 50% 72%, 19% 93%, 30% 57%, 0 36%, 37% 33%);
}

.brand-text {
  display: grid;
  gap: 0;
  line-height: 1;
  min-width: 0;
}

.brand-text strong {
  font-family: "Rubik", "Assistant", Arial, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand-text small {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-weight: 700;
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition-property: color, transform;
  transition-duration: 180ms;
  transition-timing-function: var(--ease);
}

.desktop-nav a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-button,
.ghost-button,
.icon-button,
.option-button,
.world-button,
.avatar-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition-property: transform, opacity, background-color, box-shadow, color, filter;
  transition-duration: 180ms;
  transition-timing-function: var(--ease);
}

.primary-button:active,
.ghost-button:active,
.icon-button:active,
.option-button:active,
.world-button:active,
.avatar-button:active {
  transform: scale(0.96);
}

.primary-button {
  gap: 8px;
  padding: 0 18px;
  color: #071016;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--mint) 58%, var(--amber));
  box-shadow: 0 12px 26px rgba(40, 243, 228, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.26) inset;
}

.primary-button:hover {
  filter: saturate(1.12) brightness(1.04);
  transform: translateY(-1px);
}

.primary-button.compact {
  min-height: 44px;
  padding: 0 14px;
}

.primary-button.wide {
  min-width: 176px;
}

.ghost-button {
  gap: 8px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.icon-button {
  width: 44px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.icon-button.is-muted {
  color: var(--quiet);
}

.menu-toggle {
  display: none;
}

.mobile-nav {
  display: none;
}

[data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: calc(100svh - 94px);
  padding: clamp(42px, 7vw, 94px) 0 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--cyan);
  font-weight: 800;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(185, 243, 91, 0.12);
  animation: pulse 1.8s var(--ease) infinite;
}

@keyframes pulse {
  50% {
    transform: scale(0.76);
    box-shadow: 0 0 0 11px rgba(185, 243, 91, 0);
  }
}

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

h1,
h2 {
  font-family: "Rubik", "Assistant", Arial, sans-serif;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 6.5vw, 6.8rem);
  line-height: 0.93;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.2vw, 4.4rem);
  line-height: 1;
}

h3 {
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.hero-metrics strong {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.hero-visual {
  position: relative;
}

.device-frame {
  position: relative;
  min-height: 520px;
  padding: 14px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(40, 243, 228, 0.22), rgba(255, 79, 163, 0.14) 42%, rgba(255, 209, 92, 0.16)),
    rgba(11, 23, 32, 0.86);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.13) inset;
  overflow: hidden;
}

.device-frame::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

.device-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 18px 18px 10px 10px;
  background: rgba(7, 16, 22, 0.72);
}

.device-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.device-toolbar span:nth-child(1) {
  background: var(--pink);
}

.device-toolbar span:nth-child(2) {
  background: var(--amber);
}

.device-toolbar span:nth-child(3) {
  background: var(--mint);
}

.device-toolbar p {
  margin: 0 auto 0 0;
  color: var(--quiet);
  direction: ltr;
  font-size: 0.88rem;
  font-weight: 800;
}

.mini-studio {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-height: 444px;
  padding-top: 14px;
}

.mini-chat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
}

.mini-chat [data-lucide] {
  width: 28px;
  height: 28px;
  color: var(--cyan);
}

.mini-chat p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mini-world {
  position: relative;
  min-height: 310px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(19, 53, 75, 0.86) 0 52%, rgba(18, 95, 87, 0.88) 52% 100%),
    #102632;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
}

.pixel-sky span {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(255, 209, 92, 0.55);
  clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
}

.pixel-sky span:nth-child(1) {
  top: 42px;
  right: 12%;
}

.pixel-sky span:nth-child(2) {
  top: 96px;
  right: 38%;
  width: 14px;
  height: 14px;
}

.pixel-sky span:nth-child(3) {
  top: 66px;
  left: 22%;
  background: var(--cyan);
}

.pixel-sky span:nth-child(4) {
  top: 152px;
  left: 40%;
  width: 13px;
  height: 13px;
  background: var(--mint);
}

.pixel-character {
  position: absolute;
  right: 49%;
  bottom: 96px;
  width: 58px;
  height: 72px;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, var(--pink) 0 28%, var(--amber) 28% 55%, var(--cyan) 55%);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.36);
  animation: floaty 3.2s var(--ease) infinite;
}

.pixel-character::before,
.pixel-character::after {
  position: absolute;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #071016;
  content: "";
}

.pixel-character::before {
  right: 15px;
}

.pixel-character::after {
  left: 15px;
}

@keyframes floaty {
  50% {
    transform: translateY(-10px);
  }
}

.pixel-platforms span {
  position: absolute;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  box-shadow: 0 10px 22px rgba(40, 243, 228, 0.2);
}

.pixel-platforms span:nth-child(1) {
  right: 8%;
  bottom: 72px;
  width: 170px;
}

.pixel-platforms span:nth-child(2) {
  right: 44%;
  bottom: 138px;
  width: 138px;
  background: linear-gradient(90deg, var(--amber), var(--pink));
}

.pixel-platforms span:nth-child(3) {
  left: 8%;
  bottom: 92px;
  width: 160px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.mini-command {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(7, 16, 22, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
}

.mini-command span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-command button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #071016;
  font-weight: 800;
  background: var(--amber);
}

.studio-section,
.gallery-section,
.trust-section,
.path-section {
  padding: clamp(48px, 8vw, 112px) 0;
}

.studio-section {
  order: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(660px, calc(100svh - 130px), 940px);
  padding: clamp(28px, 4vw, 56px) 0 clamp(40px, 5vw, 72px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 28px;
  min-width: 0;
}

.section-heading h2 {
  margin-bottom: 0;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(310px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.studio-controls,
.preview-stage {
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(18px);
}

.studio-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px;
}

.field-label,
.group-title {
  color: var(--ink);
  font-weight: 800;
}

.field-label {
  display: inline-flex;
  margin-bottom: -8px;
}

.idea-box {
  position: relative;
}

.idea-box textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 16px 16px 16px 58px;
  border: 0;
  border-radius: 18px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
  line-height: 1.45;
}

.idea-box textarea:focus {
  box-shadow: 0 0 0 2px rgba(40, 243, 228, 0.58), 0 14px 28px rgba(0, 0, 0, 0.2);
}

.idea-box .icon-button {
  position: absolute;
  top: 10px;
  left: 10px;
}

.control-group {
  display: grid;
  gap: 10px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-title [data-lucide] {
  color: var(--cyan);
}

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

.option-button {
  min-height: 54px;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.option-button:hover,
.world-button:hover,
.avatar-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.option-button.is-active,
.world-button.is-active,
.avatar-button.is-active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(40, 243, 228, 0.24), rgba(255, 79, 163, 0.16));
  box-shadow: 0 0 0 2px rgba(40, 243, 228, 0.5) inset, 0 12px 22px rgba(40, 243, 228, 0.08);
}

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

.avatar-button {
  min-height: 74px;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.avatar-sprite {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 12px 12px 10px 10px;
  background: linear-gradient(180deg, var(--pink), var(--amber) 52%, var(--cyan));
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

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

.world-button {
  min-height: 50px;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.world-swatch {
  width: 36px;
  height: 28px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.preview-stage {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.preview-header,
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-kicker {
  margin-bottom: 4px;
  color: var(--cyan);
  font-weight: 800;
}

.preview-header h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.6rem);
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.status-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(121, 255, 176, 0.6);
}

.status-pill.is-building .status-light {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 209, 92, 0.7);
}

.game-screen {
  position: relative;
  min-height: 360px;
  border-radius: 20px;
  background: #0b1720;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
}

.game-screen canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.hud {
  position: absolute;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.top-hud {
  top: 14px;
  justify-content: space-between;
}

.bottom-hud {
  bottom: 14px;
}

.hud span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  color: var(--ink);
  font-weight: 800;
  background: rgba(7, 16, 22, 0.58);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
  backdrop-filter: blur(10px);
}

.bottom-hud span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-thinking {
  position: absolute;
  inset: auto 50% 50% auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(7, 16, 22, 0.8);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  opacity: 0;
  transform: translate(50%, 50%) scale(0.96);
  pointer-events: none;
  transition-property: opacity, transform, filter;
  transition-duration: 220ms;
  transition-timing-function: var(--ease);
  backdrop-filter: blur(14px);
}

.ai-thinking.is-visible {
  opacity: 1;
  transform: translate(50%, 50%) scale(1);
}

.ai-thinking [data-lucide] {
  color: var(--amber);
  animation: spin 1.1s linear infinite;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.build-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.build-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
}

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

.game-card {
  position: relative;
  min-height: 314px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(13, 28, 37, 0.82);
  box-shadow: var(--shadow-crisp);
  overflow: hidden;
  transition-property: transform, box-shadow, background-color;
  transition-duration: 220ms;
  transition-timing-function: var(--ease);
}

.game-card:hover {
  transform: translateY(-6px);
  background: rgba(18, 40, 52, 0.92);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.game-art {
  position: relative;
  min-height: 178px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--art-bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  overflow: hidden;
}

.game-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.38;
}

.game-art::after {
  position: absolute;
  right: var(--sprite-x, 44%);
  bottom: 34px;
  width: 44px;
  height: 54px;
  border-radius: 13px 13px 10px 10px;
  content: "";
  background: var(--sprite-bg);
  box-shadow: 0 16px 20px rgba(0, 0, 0, 0.3);
}

.game-card h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.game-card p {
  margin-bottom: 12px;
  color: var(--muted);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
}

.trust-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.trust-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.68;
  text-wrap: pretty;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trust-grid article {
  min-height: 210px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: var(--shadow-crisp);
}

.trust-grid [data-lucide] {
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  color: var(--amber);
}

.trust-grid h3 {
  margin-bottom: 8px;
}

.trust-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.path-step {
  min-height: 176px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    rgba(13, 28, 37, 0.72);
  box-shadow: var(--shadow-crisp);
}

.path-step span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--cyan);
  font-family: "Rubik", "Assistant", Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.path-step h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.path-step p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 0;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.footer-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.reveal {
  animation: enter 620ms var(--ease) both;
}

.delay-1 {
  animation-delay: 100ms;
}

.delay-2 {
  animation-delay: 200ms;
}

@keyframes enter {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(7, 16, 22, 0.94);
    box-shadow: var(--shadow-crisp);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition-property: opacity, transform;
    transition-duration: 180ms;
    transition-timing-function: var(--ease);
  }

  .mobile-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 800;
  }

  .mobile-nav a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .studio-layout,
  .trust-section {
    grid-template-columns: 1fr;
  }

  .studio-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .field-label,
  .idea-box {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 760px) {
  .site-shell {
    max-width: 100vw;
    overflow-x: clip;
    padding-inline: 12px;
  }

  .topbar {
    top: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: 18px;
  }

  .brand-text strong {
    max-width: 126px;
    overflow: hidden;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions .primary-button {
    display: none;
  }

  .hero-section {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  h2 {
    font-size: clamp(1.8rem, 8.4vw, 2.45rem);
    line-height: 1.08;
  }

  .hero-actions,
  .preview-footer,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions > *,
  .preview-footer > *,
  .footer > * {
    width: 100%;
  }

  .hero-metrics {
    flex-direction: column;
  }

  .device-frame {
    min-height: 460px;
    border-radius: 22px;
  }

  .mini-world {
    min-height: 272px;
  }

  .studio-controls {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .option-grid,
  .avatar-row,
  .game-gallery,
  .trust-grid,
  .path-steps {
    grid-template-columns: 1fr;
  }

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

  .preview-stage {
    padding: 12px;
    border-radius: 20px;
  }

  .preview-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-hud {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .game-screen,
  .game-screen canvas {
    min-height: 430px;
  }

  .hud span {
    min-height: 32px;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * Gallery "play now" button
 * ============================================================ */
.game-play {
  margin-top: 14px;
  width: 100%;
}

/* ============================================================
 * Play modal (the real game)
 * ============================================================ */
.play-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.play-modal[hidden] {
  display: none;
}

.play-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 14, 0.82);
  backdrop-filter: blur(8px);
}

.play-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: play-pop 220ms var(--ease);
}

@keyframes play-pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.play-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.play-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.play-title {
  font-family: "Rubik", sans-serif;
  font-size: 1.4rem;
  line-height: 1.1;
}

.play-goal {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.play-stats {
  display: flex;
  gap: 8px;
}

.play-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.play-stat[hidden] {
  display: none;
}

.play-stat b {
  font-family: "Rubik", sans-serif;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}

.play-stat small {
  color: var(--quiet);
  font-weight: 700;
  font-size: 0.72rem;
}

.play-lives b {
  color: var(--pink);
}

.play-timer b {
  color: var(--amber);
}

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

.play-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  background: #0b1720;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.play-canvas {
  display: block;
  width: 100%;
  height: min(58dvh, 560px);
  touch-action: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 16, 22, 0.72);
  backdrop-filter: blur(4px);
}

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

.play-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 26px 28px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
}

.play-overlay-icon {
  width: 46px;
  height: 46px;
  color: var(--amber);
}

.play-overlay-title {
  font-family: "Rubik", sans-serif;
  font-size: 1.6rem;
}

.play-overlay-text {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.55;
}

.play-overlay-btn {
  margin-top: 6px;
}

.play-help {
  margin-top: 10px;
  color: var(--quiet);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  text-wrap: balance;
}

/* Touch controls — hidden on devices with a real pointer */
.touch-pad {
  position: absolute;
  inset: auto 0 0 0;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 18px;
  pointer-events: none;
}

.touch-pad .touch-btn {
  pointer-events: auto;
}

.touch-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.touch-row {
  display: flex;
  gap: 6px;
}

.touch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(7, 16, 22, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color 120ms var(--ease);
}

.touch-btn:active {
  transform: scale(0.92);
  background: rgba(40, 243, 228, 0.28);
}

.touch-jump {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 79, 163, 0.32);
}

@media (hover: none) and (pointer: coarse) {
  .touch-pad {
    display: flex;
  }
}

@media (max-width: 720px) {
  .play-window {
    padding: 12px;
  }

  .play-canvas {
    height: min(56dvh, 520px);
  }

  .play-bar {
    gap: 8px;
  }

  .play-title {
    font-size: 1.15rem;
  }
}

/* ============================================================
 * Difficulty selector
 * ============================================================ */
.diff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.diff-button {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px 12px;
}

.diff-button small {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--muted);
}

.diff-button.is-active small {
  color: var(--ink);
}

/* ============================================================
 * Preview footer buttons + share
 * ============================================================ */
.footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.share-button {
  width: 100%;
  justify-content: center;
}

@media (min-width: 540px) {
  .footer-buttons {
    flex-direction: row;
  }

  .footer-buttons .primary-button {
    flex: 1 1 60%;
  }

  .footer-buttons .share-button {
    flex: 1 1 40%;
  }
}

/* ============================================================
 * My-space: achievements + my games
 * ============================================================ */
.mygames-section {
  margin-top: 12px;
}

.achievements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  text-align: center;
}

.achievement i {
  color: var(--accent, #28f3e4);
}

.achievement strong {
  font-family: "Rubik", sans-serif;
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.achievement span {
  font-size: 0.82rem;
  color: var(--muted);
}

.mygames-empty {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  color: var(--muted);
  line-height: 1.7;
}

.game-card.mine .mine-idea {
  min-height: 2.4em;
  color: var(--muted);
  line-height: 1.55;
}

.mine-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.mine-actions .my-play {
  flex: 1;
  margin-top: 0;
}

@media (max-width: 760px) {
  .achievements {
    gap: 8px;
  }

  .achievement strong {
    font-size: 1.45rem;
  }

  .achievement span {
    font-size: 0.74rem;
  }
}
