:root {
  --bg-1: #08111f;
  --bg-2: #12273d;
  --ink: #e5eef7;
  --muted: #96a8bd;
  --accent: #ff8a3d;
  --accent-soft: rgba(255, 138, 61, 0.14);
  --panel: rgba(11, 23, 38, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(80, 194, 255, 0.2), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 138, 61, 0.22), transparent 22%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select {
  width: 100%;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(280px, 330px) 1fr;
  gap: 24px;
  padding: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  padding: 22px;
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 24px;
}

.brand-block h1,
.hero h2,
.stage-topbar h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.panel {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.panel-heading,
.stage-topbar,
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.04rem;
}

.game-list,
.instructions-stack,
.control-stack {
  display: grid;
  gap: 10px;
}

.game-category {
  display: grid;
  gap: 8px;
}

.game-category-static {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.16), rgba(75, 188, 255, 0.12));
}

.game-category-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.game-category-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.game-category-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-category-icon {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.game-category-body {
  display: grid;
  gap: 8px;
}

.game-category.collapsed .game-category-body {
  display: none;
}

.build-info {
  display: grid;
  gap: 8px;
}

.build-info p {
  margin: 0;
}

.bubble-arena {
  width: min(100%, 720px);
  min-height: 420px;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(70, 177, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 138, 61, 0.18), transparent 20%),
    rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.bubble-target {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.scramble-card {
  width: min(100%, 640px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.scramble-word {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

.scramble-hint {
  text-align: center;
  color: var(--muted);
}

.scramble-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.scramble-feedback {
  min-height: 24px;
  text-align: center;
  color: var(--muted);
}

.slots-card,
.code-card {
  width: min(100%, 720px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.cups-card {
  width: min(100%, 720px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.cups-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.cup-button {
  min-height: 180px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(216, 132, 62, 0.95), rgba(125, 68, 32, 0.98)),
    rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.cup-shell {
  font-size: clamp(3rem, 8vw, 4.8rem);
  font-weight: 800;
  line-height: 1;
}

.cup-gem {
  position: absolute;
  bottom: 18px;
  font-size: 1.6rem;
  color: #ffd166;
}

.cup-reveal {
  box-shadow: 0 18px 34px rgba(255, 209, 102, 0.18);
}

.cup-choice {
  box-shadow: inset 0 0 0 3px rgba(126, 240, 187, 0.42);
}

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

.slot-reel {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(255, 209, 102, 0.2), transparent 55%),
    rgba(9, 18, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.code-current,
.code-palette,
.code-history {
  display: grid;
  gap: 10px;
}

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

.code-slot,
.guess-row {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.code-slot {
  min-height: 84px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.code-palette {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.guess-row {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.guess-pegs {
  display: flex;
  gap: 8px;
}

.guess-feedback {
  color: var(--muted);
}

.color-choice {
  font-weight: 700;
}

.color-peg {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #08111f;
  font-weight: 800;
}

.color-red {
  background: #ff6b6b;
}

.color-blue {
  background: #46b1ff;
}

.color-green {
  background: #7ef0bb;
}

.color-gold {
  background: #ffd166;
}

.color-pink {
  background: #ff8cc6;
}

.color-cyan {
  background: #86f7ff;
}

.tower-card {
  width: min(100%, 1040px);
  display: grid;
  gap: 14px;
}

.tower-card .canvas-card {
  margin: 0;
}

.tower-panel {
  display: grid;
  gap: 10px;
}

.tower-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-control {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--line);
}

.compact-copy {
  margin: 0;
  line-height: 1.5;
}

.game-select {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid transparent;
}

.game-select-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.game-select:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 61, 0.28);
}

.game-select.active {
  background: var(--accent-soft);
  border-color: rgba(255, 138, 61, 0.38);
}

.game-select strong {
  display: block;
}

.game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.95), rgba(255, 201, 84, 0.95));
  color: #08111f;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.stat-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

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

.stat-box strong {
  font-size: 1.7rem;
}

.main-stage {
  display: grid;
  gap: 24px;
}

.hero,
.game-stage {
  padding: 22px;
}

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

.status-pill-row,
.stage-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.quick-control {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.quick-control-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compact-select {
  min-width: 180px;
  padding-block: 10px;
}

.primary-button,
.secondary-button {
  border-radius: 16px;
  padding: 14px 18px;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 16px 28px rgba(255, 138, 61, 0.22);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.game-surface {
  margin-top: 18px;
  min-height: 640px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.canvas-wrap {
  width: min(100%, 860px);
  display: grid;
  gap: 12px;
}

.canvas-hud,
.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.canvas-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #06101d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.canvas-card.square {
  aspect-ratio: 1 / 1;
  max-width: 680px;
  margin: 0 auto;
}

.canvas-card canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.dom-game-wrap {
  width: min(100%, 860px);
  display: grid;
  gap: 18px;
}

.stack-layout {
  display: grid;
  gap: 16px;
}

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

.memory-card {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
}

.memory-card.revealed,
.memory-card.matched {
  background: var(--accent-soft);
}

.merge-grid {
  --merge-gap: 12px;
  --merge-pad: 14px;
  width: min(100%, 540px);
  padding: var(--merge-pad);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--merge-gap);
  position: relative;
}

.merge-slot {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.merge-layer {
  position: absolute;
  inset: var(--merge-pad);
  pointer-events: none;
}

.merge-tile {
  width: calc((100% - var(--merge-gap) * 3) / 4);
  height: calc((100% - var(--merge-gap) * 3) / 4);
  position: absolute;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  transform: translate(
    calc(var(--col) * (100% + var(--merge-gap))),
    calc(var(--row) * (100% + var(--merge-gap)))
  );
}

.merge-moving {
  transition: transform 0.22s ease;
}

.merge-0 {
  color: transparent;
}

.merge-2 {
  background: #f4e8d8;
  color: #3b2f2f;
}

.merge-4 {
  background: #f0d4b7;
  color: #382c2c;
}

.merge-8 {
  background: #ffb96b;
  color: white;
}

.merge-16 {
  background: #ff9448;
  color: white;
}

.merge-32 {
  background: #ff7d4b;
  color: white;
}

.merge-64 {
  background: #ff6138;
  color: white;
}

.merge-128,
.merge-256,
.merge-512 {
  background: #46b1ff;
  color: white;
}

.merge-1024,
.merge-2048 {
  background: #8f66ff;
  color: white;
}

.info-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.action-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.mini-button {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ttt-grid {
  width: min(100%, 540px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ttt-cell,
.connect-cell {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
}

.connect-grid {
  width: min(100%, 620px);
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.connect-cell {
  border-radius: 999px;
  font-size: 1.6rem;
}

.connect-empty {
  background: rgba(255, 255, 255, 0.06);
}

.connect-player {
  background: rgba(70, 177, 255, 0.24);
}

.connect-cpu {
  background: rgba(255, 138, 61, 0.24);
}

.word-display {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.letter-box {
  width: 44px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 1.4rem;
  font-weight: 800;
}

.keyboard-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.letter-button {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--line);
}

.letter-button.used {
  opacity: 0.4;
}

.whack-grid {
  width: min(100%, 600px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.whack-hole {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3rem);
}

.whack-hole.active {
  background: rgba(255, 138, 61, 0.18);
}

.simon-grid {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.simon-pad {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: 1px solid var(--line);
  opacity: 0.72;
}

.simon-pad.active {
  transform: scale(0.98);
  opacity: 1;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.14);
}

.simon-green {
  background: #1eb980;
}

.simon-red {
  background: #ef4444;
}

.simon-yellow {
  background: #f59e0b;
}

.simon-blue {
  background: #3b82f6;
}

.blackjack-table {
  width: min(100%, 720px);
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(22, 83, 58, 0.95), rgba(14, 60, 43, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 16px;
}

.card-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.playing-card {
  width: 86px;
  height: 124px;
  border-radius: 16px;
  background: #fffdf8;
  color: #231f20;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.mine-grid {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.mine-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.mine-cell.revealed {
  background: rgba(255, 255, 255, 0.16);
}

.mine-cell.bomb {
  background: rgba(239, 68, 68, 0.28);
}

.reaction-pad {
  width: min(100%, 720px);
  min-height: 320px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.reaction-wait {
  background: rgba(239, 68, 68, 0.18);
}

.reaction-ready {
  background: rgba(16, 185, 129, 0.2);
}

.guess-card {
  width: min(100%, 520px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.guess-controls {
  display: flex;
  gap: 12px;
}

.guess-controls input {
  flex: 1;
}

.guess-log {
  min-height: 80px;
  color: var(--muted);
  line-height: 1.5;
}

.rps-grid {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rps-button {
  border-radius: 20px;
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 1.1rem;
  font-weight: 700;
}

.rps-button.selected {
  border-color: rgba(255, 138, 61, 0.48);
  background: rgba(255, 138, 61, 0.14);
  transform: translateY(-1px);
}

.rps-showdown {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.rps-throw-card {
  min-height: 120px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.rps-throw-icon {
  font-size: 2.6rem;
  line-height: 1;
}

.rps-icon-pop {
  animation: rps-pop 0.35s ease;
}

.rps-throw-label {
  color: var(--ink);
  font-weight: 700;
}

.rps-versus {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.rps-result {
  text-align: center;
  color: var(--muted);
}

.rps-result.reveal {
  color: var(--ink);
}

@keyframes rps-pop {
  0% {
    transform: scale(0.72) rotate(-8deg);
    opacity: 0.2;
  }
  65% {
    transform: scale(1.12) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.lane-grid {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lane-cell {
  aspect-ratio: 1 / 1.1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}

.lane-cell::before {
  content: "";
  position: absolute;
  inset: 8px 44%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.lane-cell > span {
  position: relative;
  z-index: 1;
}

.lane-player {
  outline: 3px solid rgba(70, 177, 255, 0.45);
}

.lane-obstacle {
  background: rgba(239, 68, 68, 0.18);
}

.lane-train {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(30, 64, 175, 0.18));
}

.lane-jump {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.22), rgba(194, 65, 12, 0.18));
}

.lane-slide {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.2), rgba(202, 138, 4, 0.16));
}

.lane-coin {
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.22);
}

.lane-jumping {
  outline-color: rgba(125, 211, 252, 0.82);
}

.lane-sliding {
  outline-color: rgba(250, 204, 21, 0.82);
}

.lane-crash {
  outline-color: rgba(248, 113, 113, 0.9);
}

.typing-card {
  width: min(100%, 720px);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.typing-prompt {
  font-size: 1.2rem;
  line-height: 1.6;
}

.typing-char-correct {
  color: #7ef0bb;
}

.typing-char-wrong {
  color: #ff8f8f;
}

.stacker-card {
  width: min(100%, 720px);
  display: grid;
  gap: 16px;
}

.stacker-board {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.8), rgba(18, 39, 61, 0.95));
  border: 1px solid var(--line);
}

.stacker-floor {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.stacker-block {
  position: absolute;
  height: 26px;
  border-radius: 12px;
  background: linear-gradient(90deg, #46b1ff, #8f66ff, #ff8a3d);
  box-shadow: 0 10px 24px rgba(70, 177, 255, 0.22);
}

.stacker-guide {
  color: var(--muted);
  text-align: center;
}

.flood-grid {
  width: min(100%, 560px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.flood-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.74;
}

.flood-cell-active {
  opacity: 1;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.flood-controls {
  width: min(100%, 560px);
  margin: 0 auto;
}

.maze-grid {
  width: min(100%, 620px);
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.maze-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 1.1rem;
}

.maze-wall {
  background: linear-gradient(180deg, rgba(18, 39, 61, 0.95), rgba(8, 17, 31, 0.96));
}

.maze-player {
  background: radial-gradient(circle at center, rgba(255, 209, 102, 0.95), rgba(255, 138, 61, 0.45));
  box-shadow: 0 10px 22px rgba(255, 209, 102, 0.2);
}

.maze-goal {
  background: rgba(30, 185, 128, 0.18);
}

.maze-exit-locked {
  background: rgba(255, 138, 61, 0.18);
}

.maze-coin {
  color: #ffd166;
  box-shadow: inset 0 0 0 2px rgba(255, 209, 102, 0.18);
}

.maze-cage {
  background: rgba(92, 118, 146, 0.18);
  box-shadow: inset 0 0 0 2px rgba(148, 163, 184, 0.1);
}

.maze-door {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.32), rgba(59, 130, 246, 0.14));
  box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.18);
}

.maze-ghost {
  background: rgba(239, 68, 68, 0.22);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.16);
}

.maze-cage-ghost {
  opacity: 0.72;
}

.maze-frightened {
  background: rgba(70, 177, 255, 0.22);
  box-shadow: 0 10px 22px rgba(70, 177, 255, 0.16);
}

.lights-grid {
  width: min(100%, 560px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.lights-cell {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lights-cell.on {
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.95), rgba(255, 138, 61, 0.9));
  box-shadow: 0 12px 28px rgba(255, 138, 61, 0.18);
}

.crate-grid {
  width: min(100%, 620px);
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.crate-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 1.15rem;
}

.crate-wall {
  background: linear-gradient(180deg, rgba(18, 39, 61, 0.95), rgba(8, 17, 31, 0.96));
}

.crate-floor {
  background: rgba(255, 255, 255, 0.04);
}

.crate-goal {
  box-shadow: inset 0 0 0 2px rgba(30, 185, 128, 0.3);
}

.crate-box {
  background: rgba(255, 138, 61, 0.18);
}

.crate-box-on-goal {
  background: rgba(30, 185, 128, 0.18);
}

.crate-player {
  background: rgba(70, 177, 255, 0.24);
}

.clicker-card {
  width: min(100%, 720px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.clicker-button {
  min-height: 240px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 209, 102, 0.85), rgba(255, 138, 61, 0.92) 45%, rgba(143, 102, 255, 0.65) 100%);
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  box-shadow: 0 22px 48px rgba(255, 138, 61, 0.22);
}

.clicker-upgrades {
  width: 100%;
}

.empty-hint {
  max-width: 720px;
  text-align: center;
}

@media (max-width: 1120px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 14px;
    gap: 14px;
  }

  .hero,
  .game-stage,
  .sidebar {
    padding: 18px;
  }

  .hero,
  .stage-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stage-actions {
    justify-items: stretch;
  }

  .stage-button-row {
    width: 100%;
  }

  .stage-button-row .primary-button,
  .stage-button-row .secondary-button {
    flex: 1 1 0;
  }

  .memory-grid {
    gap: 8px;
  }

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