/* CupCake neon theme — deliberately limited to pages marked .games-theme. */
html[data-theme="cupcake"] body.games-theme {
  --game-void: #070312;
  --game-void-deep: #03020a;
  --game-violet: #a934ff;
  --game-pink: #ff32bd;
  --game-blue: #39d5ff;
  --game-orange: #ff8a27;
  --game-ink: #f5f0ff;
  --game-muted: #c1b5d8;
  background:
    radial-gradient(circle at 78% 6%, rgba(57, 213, 255, .16), transparent 28rem),
    radial-gradient(circle at 10% 18%, rgba(255, 50, 189, .16), transparent 30rem),
    var(--game-void);
}

/* Games landing page. */
html[data-theme="cupcake"] body.games-theme .games-hero {
  background-image:
    radial-gradient(circle at 72% 24%, rgba(57, 213, 255, .22), transparent 24rem),
    radial-gradient(circle at 22% 32%, rgba(255, 50, 189, .2), transparent 25rem),
    linear-gradient(90deg, rgba(6, 3, 17, .96) 0%, rgba(8, 4, 25, .72) 45%, rgba(6, 4, 21, .24) 82%),
    linear-gradient(0deg, var(--game-void-deep) 0%, transparent 42%),
    url("assets/games/games-hub-collage.png");
}

html[data-theme="cupcake"] body.games-theme .games-hero h1,
html[data-theme="cupcake"] body.games-theme .section-head h2 {
  color: var(--game-ink);
  text-shadow: 0 0 26px rgba(169, 52, 255, .3);
}

html[data-theme="cupcake"] body.games-theme .games-shell .kicker,
html[data-theme="cupcake"] body.games-theme .games-shell .hero-tags span,
html[data-theme="cupcake"] body.games-theme .games-shell .shelf-card span {
  color: var(--game-blue);
}

html[data-theme="cupcake"] body.games-theme .hero-tags span {
  background: rgba(11, 5, 30, .78);
  border-color: rgba(57, 213, 255, .52);
  box-shadow: inset 0 0 18px rgba(57, 213, 255, .06);
}

html[data-theme="cupcake"] body.games-theme .games-content {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 50, 189, .09), transparent 24rem),
    radial-gradient(circle at 92% 14%, rgba(57, 213, 255, .08), transparent 27rem),
    var(--game-void);
}

html[data-theme="cupcake"] body.games-theme .game-feature,
html[data-theme="cupcake"] body.games-theme .shelf-card {
  border-color: rgba(57, 213, 255, .4);
  box-shadow: 0 22px 60px rgba(1, 0, 16, .48), inset 0 0 0 1px rgba(255, 50, 189, .12);
}

html[data-theme="cupcake"] body.games-theme .game-feature::before {
  background: linear-gradient(0deg, rgba(6, 3, 19, .98) 5%, rgba(12, 3, 29, .18) 72%);
}

html[data-theme="cupcake"] body.games-theme .game-feature:hover {
  border-color: var(--game-orange);
  box-shadow: 0 0 0 1px rgba(255, 138, 39, .45), 0 24px 68px rgba(255, 50, 189, .15);
}

html[data-theme="cupcake"] body.games-theme .game-feature-copy span,
html[data-theme="cupcake"] body.games-theme .archive-note strong {
  color: var(--game-orange);
}

html[data-theme="cupcake"] body.games-theme .archive-note {
  background: linear-gradient(105deg, rgba(50, 13, 81, .7), rgba(8, 20, 49, .72));
  border-top-color: rgba(57, 213, 255, .42);
  border-bottom-color: rgba(169, 52, 255, .34);
  border-left-color: var(--game-orange);
  box-shadow: inset 0 0 32px rgba(57, 213, 255, .05);
}

/* Starfield archive. */
html[data-theme="cupcake"] body.games-theme .hero {
  background-image:
    radial-gradient(circle at 74% 28%, rgba(57, 213, 255, .19), transparent 28rem),
    radial-gradient(circle at 12% 36%, rgba(255, 50, 189, .16), transparent 26rem),
    linear-gradient(90deg, rgba(7, 3, 20, .97) 0%, rgba(8, 4, 28, .82) 44%, rgba(7, 4, 24, .38) 78%, rgba(7, 4, 24, .18) 100%),
    linear-gradient(0deg, var(--game-void-deep) 0%, rgba(11, 3, 30, 0) 22%),
    url("assets/starfield/hero-galaxy.png");
}

html[data-theme="cupcake"] body.games-theme .hero-copy::before {
  border-left-color: var(--game-orange);
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 255, 255, .68) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 28%, rgba(57, 213, 255, .72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 38% 64%, rgba(255, 50, 189, .7) 0 1px, transparent 1.5px),
    linear-gradient(90deg, rgba(57, 213, 255, .14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 50, 189, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 3, 25, .9), rgba(8, 3, 25, .58) 72%, transparent);
}

html[data-theme="cupcake"] body.games-theme .hero-portrait {
  border-color: var(--game-blue);
  box-shadow: 0 0 0 1px rgba(255, 50, 189, .56), 0 28px 90px rgba(0, 0, 0, .5), 0 0 34px rgba(57, 213, 255, .22);
}

html[data-theme="cupcake"] body.games-theme .hero-portrait span {
  color: var(--game-blue);
  background: rgba(11, 4, 29, .94);
  border-color: var(--game-pink);
}

html[data-theme="cupcake"] body.games-theme .eyebrow,
html[data-theme="cupcake"] body.games-theme .section-kicker,
html[data-theme="cupcake"] body.games-theme .mod-code,
html[data-theme="cupcake"] body.games-theme .format-box code {
  color: var(--game-blue);
}

html[data-theme="cupcake"] body.games-theme .action {
  color: #16070b;
  background: linear-gradient(135deg, #ffbd4a, var(--game-orange) 58%, #ff6d30);
}

html[data-theme="cupcake"] body.games-theme .action.ghost,
html[data-theme="cupcake"] body.games-theme .format-box,
html[data-theme="cupcake"] body.games-theme .loadout,
html[data-theme="cupcake"] body.games-theme .slot-card,
html[data-theme="cupcake"] body.games-theme .large {
  color: var(--game-ink);
  background: linear-gradient(145deg, rgba(42, 11, 70, .8), rgba(7, 18, 45, .88));
  border-color: rgba(57, 213, 255, .36);
  box-shadow: 0 18px 42px rgba(1, 0, 15, .44), inset 0 0 24px rgba(255, 50, 189, .05);
}

html[data-theme="cupcake"] body.games-theme .format-box { border-top-color: var(--game-orange); }
html[data-theme="cupcake"] body.games-theme .tag { background: var(--game-blue); color: #08111e; }
html[data-theme="cupcake"] body.games-theme .suit .tag { background: #ff5a80; }
html[data-theme="cupcake"] body.games-theme .pack .tag { background: var(--game-orange); }
html[data-theme="cupcake"] body.games-theme .helm .tag { background: #a984ff; }
html[data-theme="cupcake"] body.games-theme .slot-card h3,
html[data-theme="cupcake"] body.games-theme .nexus-tag { color: var(--game-orange); }
html[data-theme="cupcake"] body.games-theme .copy:hover,
html[data-theme="cupcake"] body.games-theme .copy.is-copied { background: rgba(57, 213, 255, .12); }
html[data-theme="cupcake"] body.games-theme .nexus-card {
  border-color: rgba(57, 213, 255, .34);
  border-left-color: var(--game-orange);
  background: linear-gradient(155deg, rgba(53, 12, 82, .86), rgba(7, 18, 44, .92));
}

/* Full-screen atlas overlays, shared by Starfield's starmap and Once Human's Nalcott map. */
html[data-theme="cupcake"] body.games-theme .starmap-modal,
html[data-theme="cupcake"] body.games-theme .nalcott-map-modal,
html[data-theme="cupcake"] body.games-theme .dust-farm-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 10px;
  background: radial-gradient(circle at 22% 12%, rgba(255, 50, 189, .2), transparent 28rem), rgba(3, 1, 13, .88);
  backdrop-filter: blur(14px);
}

html[data-theme="cupcake"] body.games-theme .starmap-modal.is-open,
html[data-theme="cupcake"] body.games-theme .nalcott-map-modal.is-open,
html[data-theme="cupcake"] body.games-theme .dust-farm-modal.is-open {
  display: grid;
  place-items: center;
}

html[data-theme="cupcake"] body.games-theme .starmap-panel,
html[data-theme="cupcake"] body.games-theme .nalcott-map-panel,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel {
  width: min(1920px, 99vw);
  height: 98vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(39, 10, 66, .96), rgba(4, 16, 42, .98));
  border: 1px solid rgba(57, 213, 255, .78);
  box-shadow: 0 0 0 1px rgba(255, 50, 189, .5), 0 30px 90px rgba(0, 0, 0, .7), 0 0 46px rgba(57, 213, 255, .16);
}

html[data-theme="cupcake"] body.games-theme .starmap-bar,
html[data-theme="cupcake"] body.games-theme .nalcott-map-bar,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel .nalcott-map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(57, 213, 255, .46);
  background: linear-gradient(90deg, rgba(56, 12, 88, .98), rgba(8, 31, 70, .96));
}

html[data-theme="cupcake"] body.games-theme .starmap-bar .section-kicker,
html[data-theme="cupcake"] body.games-theme .nalcott-map-bar .section-kicker,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel .nalcott-map-bar .section-kicker {
  margin-bottom: 5px;
  color: var(--game-blue);
}

html[data-theme="cupcake"] body.games-theme .starmap-bar h2,
html[data-theme="cupcake"] body.games-theme .nalcott-map-bar h2,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel .nalcott-map-bar h2 {
  color: var(--game-ink);
  font-size: 1.15rem;
  text-shadow: 0 0 16px rgba(255, 50, 189, .38);
}

html[data-theme="cupcake"] body.games-theme .starmap-close,
html[data-theme="cupcake"] body.games-theme .nalcott-map-close,
html[data-theme="cupcake"] body.games-theme .nalcott-map-actions a,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel .nalcott-map-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  color: #16070b;
  background: linear-gradient(135deg, #ffbe49, var(--game-orange) 58%, #ff6d30);
  border: 0;
  font: 800 .72rem/1 "Cascadia Mono", Consolas, monospace;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

html[data-theme="cupcake"] body.games-theme .starmap-close:hover,
html[data-theme="cupcake"] body.games-theme .nalcott-map-close:hover,
html[data-theme="cupcake"] body.games-theme .nalcott-map-actions a:hover,
html[data-theme="cupcake"] body.games-theme .dust-farm-panel .nalcott-map-actions a:hover {
  background: linear-gradient(135deg, #ffcc69, #ff6b2d 55%, #ff43bb);
}

html[data-theme="cupcake"] body.games-theme .nalcott-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

html[data-theme="cupcake"] body.games-theme .nalcott-map-image,
html[data-theme="cupcake"] body.games-theme .starmap-panel .starmap-image,
html[data-theme="cupcake"] body.games-theme .dust-farm-image {
  width: 100%;
  height: 100%;
  padding: 5px;
  background: #040313;
  object-fit: contain;
}

html[data-theme="cupcake"] body.games-theme.nalcott-map-locked { overflow: hidden; }
html[data-theme="cupcake"] body.games-theme .dust-farm-panel { width:min(1240px,99vw); height:auto; max-height:98vh; grid-template-rows:auto minmax(0,1fr) auto; }
html[data-theme="cupcake"] body.games-theme .dust-farm-image { max-height:calc(98vh - 230px); }
html[data-theme="cupcake"] body.games-theme .dust-farm-note { margin:0; padding:14px 18px 16px; color:var(--game-ink); font-size:.98rem; line-height:1.55; border-top:1px solid rgba(57,213,255,.42); background:rgba(5,12,28,.92); }
html[data-theme="cupcake"] body.games-theme .server-opening-panel { width:min(1100px,94vw); height:auto; max-height:88vh; grid-template-rows:auto minmax(0,1fr); }
html[data-theme="cupcake"] body.games-theme .server-opening-content { overflow:auto; padding:20px; color:var(--game-ink); line-height:1.5; }
html[data-theme="cupcake"] body.games-theme .server-opening-content p { margin:0 0 16px; }
html[data-theme="cupcake"] body.games-theme .server-opening-table { overflow-x:auto; margin:20px 0; }
html[data-theme="cupcake"] body.games-theme .server-opening-table table { width:100%; border-collapse:collapse; min-width:750px; }
html[data-theme="cupcake"] body.games-theme .server-opening-table th,
html[data-theme="cupcake"] body.games-theme .server-opening-table td { padding:12px; border:1px solid rgba(57,213,255,.35); text-align:left; vertical-align:top; }
html[data-theme="cupcake"] body.games-theme .server-opening-table th { color:var(--game-blue); }

/* Once Human hub, research, deviations, and traits. */
html[data-theme="cupcake"] body.games-theme .once-shell,
html[data-theme="cupcake"] body.games-theme .research-shell {
  background-image:
    radial-gradient(circle at 85% 5%, rgba(57, 213, 255, .15), transparent 25rem),
    radial-gradient(circle at 10% 20%, rgba(255, 50, 189, .16), transparent 28rem),
    linear-gradient(90deg, rgba(6, 3, 19, .88), rgba(8, 3, 27, .58)),
    linear-gradient(0deg, rgba(5, 3, 16, .9), rgba(5, 3, 16, .28)),
    url("assets/once-human/once-human-mainframe.png");
}

html[data-theme="cupcake"] body.games-theme .once-card,
html[data-theme="cupcake"] body.games-theme .loadout-section,
html[data-theme="cupcake"] body.games-theme .research-hero,
html[data-theme="cupcake"] body.games-theme .research-catalog {
  background: linear-gradient(135deg, rgba(169, 52, 255, .15), transparent 43%), linear-gradient(320deg, rgba(57, 213, 255, .11), transparent 48%), rgba(9, 5, 27, .9);
  border-color: rgba(57, 213, 255, .46);
  box-shadow: 0 28px 90px rgba(2, 0, 16, .52), inset 0 0 44px rgba(255, 50, 189, .045);
}

html[data-theme="cupcake"] body.games-theme .once-card,
html[data-theme="cupcake"] body.games-theme .research-hero { border-left-color: var(--game-blue); }
html[data-theme="cupcake"] body.games-theme .loadout-section,
html[data-theme="cupcake"] body.games-theme .research-catalog { border-left-color: var(--game-orange); }

html[data-theme="cupcake"] body.games-theme .once-shell .kicker,
html[data-theme="cupcake"] body.games-theme .research-shell .kicker,
html[data-theme="cupcake"] body.games-theme .research-shell .control-label { color: var(--game-blue); }

html[data-theme="cupcake"] body.games-theme .once-shell h1,
html[data-theme="cupcake"] body.games-theme .once-shell h2,
html[data-theme="cupcake"] body.games-theme .research-shell h1,
html[data-theme="cupcake"] body.games-theme .research-shell h2 { text-shadow: 0 0 24px rgba(169, 52, 255, .22); }

html[data-theme="cupcake"] body.games-theme .status-strip span,
html[data-theme="cupcake"] body.games-theme .loadout-label {
  color: var(--game-blue);
  background: rgba(12, 8, 34, .78);
  border-color: rgba(57, 213, 255, .46);
}

html[data-theme="cupcake"] body.games-theme .build-name > span { color: var(--game-orange); }

html[data-theme="cupcake"] body.games-theme .hub-feature {
  border-color: rgba(57, 213, 255, .45);
  box-shadow: 0 16px 42px rgba(0, 0, 14, .38);
}

html[data-theme="cupcake"] body.games-theme .hub-feature figcaption,
html[data-theme="cupcake"] body.games-theme .loadout-reference figcaption {
  color: var(--game-muted);
  border-top-color: rgba(169, 52, 255, .38);
  background: rgba(10, 5, 27, .72);
}

/* Research table cells retain their existing colors; only their surrounding frame changes. */
html[data-theme="cupcake"] body.games-theme .research-catalog .table-wrap {
  border-color: rgba(57, 213, 255, .52);
  background: linear-gradient(135deg, rgba(169, 52, 255, .12), transparent 28%), rgba(4, 8, 22, .66);
  box-shadow: inset 0 0 30px rgba(57, 213, 255, .045);
}

html[data-theme="cupcake"] body.games-theme .research-catalog .search-box input,
html[data-theme="cupcake"] body.games-theme .research-catalog .filter-button {
  border-color: rgba(57, 213, 255, .48);
  background: rgba(12, 6, 31, .78);
}

html[data-theme="cupcake"] body.games-theme .research-catalog .search-box input:focus,
html[data-theme="cupcake"] body.games-theme .research-catalog .filter-button:hover,
html[data-theme="cupcake"] body.games-theme .research-catalog .filter-button[aria-pressed="true"] {
  border-color: var(--game-pink);
  box-shadow: 0 0 0 2px rgba(255, 50, 189, .12);
}

@media (max-width: 620px) {
  html[data-theme="cupcake"] body.games-theme .starmap-modal,
  html[data-theme="cupcake"] body.games-theme .nalcott-map-modal { padding: 4px; }

  html[data-theme="cupcake"] body.games-theme .starmap-panel,
  html[data-theme="cupcake"] body.games-theme .nalcott-map-panel { height: 99vh; }

  html[data-theme="cupcake"] body.games-theme .starmap-bar,
  html[data-theme="cupcake"] body.games-theme .nalcott-map-bar { align-items: flex-start; flex-direction: column; }
}
