:root {
  color-scheme: dark;
  --bg: #070914;
  --bg-2: #0d1022;
  --panel: rgba(20, 25, 48, 0.86);
  --panel-strong: #171d37;
  --ink: #f6f8ff;
  --muted: #a8b2d6;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #35f2b6;
  --brand-2: #59a7ff;
  --brand-3: #ffcf5a;
  --danger: #ff6b9d;
  --soft: rgba(53, 242, 182, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(53, 242, 182, 0.2), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(89, 167, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 50% 92%, rgba(255, 207, 90, 0.12), transparent 26rem),
    linear-gradient(180deg, var(--bg), #0b0d18 54%, #080a12);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: var(--brand);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 20, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #071014;
  box-shadow: 0 0 28px rgba(53, 242, 182, 0.32);
}

.nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.nav a,
.site-footer a {
  color: #dfe6ff;
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 10px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-color: rgba(53, 242, 182, 0.35);
  background: rgba(53, 242, 182, 0.1);
  color: var(--brand);
}

.site-footer a:hover,
.text-link:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 118px) clamp(18px, 5vw, 44px) 58px;
}

.hero::after {
  position: absolute;
  right: 4%;
  bottom: 28px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: rgba(53, 242, 182, 0.1);
  filter: blur(42px);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1,
.page h1,
.article h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.8rem, 6.8vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero h1 {
  background: linear-gradient(92deg, #fff, #bfffe8 42%, #92c6ff 82%);
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.12rem;
}

.eyebrow,
.date {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions,
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 610px;
  margin-top: 28px;
}

.hero-stats span {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 11px 20px;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #061018;
  box-shadow: 0 12px 34px rgba(53, 242, 182, 0.22);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.game-preview {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.game-preview::before {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  content: "Now Playing  |  Memeno Match";
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.preview-grid span,
.memory-card {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(53, 242, 182, 0.22), rgba(89, 167, 255, 0.14));
  color: #fff;
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.content-band,
.split,
.page,
.article {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px clamp(18px, 5vw, 44px);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 26px;
}

.section-heading h2,
.split h2,
.game-notes h2,
.article h2 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0;
}

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

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

.feature,
.article-card,
.game-card,
.platform-card,
.game-panel,
.game-notes,
.steps {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.feature,
.article-card,
.platform-card,
.game-panel,
.game-notes {
  padding: 24px;
}

.game-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 310px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.game-card::after {
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(53, 242, 182, 0.12);
  content: "";
}

.game-card:nth-child(2)::after {
  background: rgba(89, 167, 255, 0.16);
}

.game-card:nth-child(3)::after {
  background: rgba(255, 207, 90, 0.16);
}

.game-card:nth-child(4)::after {
  background: rgba(255, 107, 157, 0.16);
}

.game-card .button {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.game-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #071014;
  font-size: 1.25rem;
  font-weight: 950;
  box-shadow: 0 0 30px rgba(53, 242, 182, 0.28);
}

.feature h3,
.article-card h3,
.game-card h2,
.game-card h3,
.platform-card h3 {
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.2;
}

.feature p,
.article-card p,
.game-card p,
.platform-card p,
.game-notes p,
.site-footer p,
.article p,
.article li,
.split p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.steps {
  margin: 0;
  padding: 24px 24px 24px 46px;
}

.steps li + li {
  margin-top: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  padding: 34px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 20, 0.72);
}

.site-footer p {
  margin: 6px 0 0;
}

.game-shell,
.game-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.game-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.level-picker {
  display: grid;
  gap: 8px;
  min-width: 180px;
  color: var(--muted);
  font-weight: 800;
}

select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: #10162c;
  color: var(--ink);
  font: inherit;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.score-row span,
.status {
  border: 1px solid rgba(53, 242, 182, 0.16);
  border-radius: 16px;
  background: rgba(53, 242, 182, 0.1);
  padding: 10px 12px;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(42px, 1fr));
  gap: 10px;
}

.memory-card {
  border: 2px solid rgba(53, 242, 182, 0.42);
  background: linear-gradient(145deg, #131a33, #0c1022);
  color: var(--brand);
  min-width: 0;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.memory-card:hover:not(:disabled) {
  transform: translateY(-2px);
}

.memory-card.is-open {
  border-color: var(--brand-2);
  background: linear-gradient(145deg, rgba(89, 167, 255, 0.3), rgba(53, 242, 182, 0.16));
  color: #fff;
}

.memory-card.is-matched {
  border-color: var(--brand-3);
  background: linear-gradient(145deg, var(--brand-3), #ffefad);
  color: #1b1604;
}

.status {
  margin-top: 16px;
  color: var(--brand);
  font-weight: 900;
}

.arcade-stage {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.number-grid,
.sum-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 10px;
}

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

.trail-tile,
.sum-tile,
.echo-tile {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 2px solid rgba(53, 242, 182, 0.34);
  border-radius: 18px;
  background: #121832;
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 950;
  cursor: pointer;
}

.trail-tile.is-hit,
.sum-tile.is-hit {
  border-color: var(--brand-3);
  background: var(--brand-3);
  color: #1b1604;
}

.echo-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

.echo-tile {
  min-height: 120px;
  opacity: 0.68;
}

.echo-tile.green {
  background: #18c58f;
}

.echo-tile.gold {
  background: #f4c95d;
}

.echo-tile.blue {
  background: #3a7bd5;
}

.echo-tile.rose {
  background: #d95d7f;
}

.echo-tile.is-lit {
  opacity: 1;
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

.article {
  max-width: 900px;
}

.article ul {
  padding-left: 22px;
}

.article blockquote {
  margin: 24px 0;
  border-left: 4px solid var(--brand);
  border-radius: 18px;
  padding: 12px 18px;
  background: rgba(53, 242, 182, 0.1);
}

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

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

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  .game-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .article-grid,
  .game-library,
  .platform-grid,
  .hero-stats,
  .score-row {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page h1,
  .article h1 {
    font-size: clamp(2.35rem, 12vw, 4.4rem);
  }
}

@media (max-width: 520px) {
  .memory-board,
  .number-grid,
  .sum-grid {
    gap: 7px;
  }

  .game-panel {
    padding: 16px;
  }
}
