/* ============================================================
   AFTER GAMES — launcher
   Identidade: console/moderno, painéis escuros, acento por jogo.
   Escopo: body.games-mode (não vaza para o resto do app).
   Layout fluido: sem larguras fixas, tudo em grid auto-fit,
   porque a coluna do app varia entre ~600 e ~1380 px.
   ============================================================ */

body.games-mode {
  --gx-line: #1d2130;
  --gx-line-soft: #161a25;
  --gx-panel: #0a0c11;
  --gx-panel-2: #101420;
  --gx-text: #edf0f7;
  --gx-muted: #8a93a8;
  --gx-accent: #7c5cff;
  --gx-gap: 16px;
}

.gx-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- barra superior ---------- */
body.games-mode .gx-header {
  position: relative !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 14px !important;
  min-height: 0 !important;
  margin: 0 0 var(--gx-gap) !important;
  padding: 10px 12px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #0d1017, #090b10) !important;
  box-shadow: 0 22px 46px -34px #000 !important;
  overflow: visible !important;
}
body.games-mode .gx-header:before,
body.games-mode .gx-header:after { content: none !important; display: none !important; }

body.games-mode .gx-brand {
  order: 1;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  flex: 1 1 190px;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}
body.games-mode .gx-brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px -10px #4b2fd6, 0 0 0 1px #ffffff14;
}
body.games-mode .gx-brand-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body.games-mode .gx-brand-copy b {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #fff;
  white-space: nowrap;
}
body.games-mode .gx-brand-copy span {
  font-size: 10.5px;
  color: var(--gx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- abas ---------- */
body.games-mode #gamesPage .gx-nav {
  order: 3;
  flex: 1 1 100%;
  position: static !important;
  top: auto !important;
  z-index: 2;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 4px !important;
  border: 1px solid var(--gx-line-soft) !important;
  border-radius: 12px !important;
  background: #080a0e !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
}
body.games-mode #gamesPage .gx-nav::-webkit-scrollbar { display: none; }

body.games-mode #gamesPage .gx-nav button {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #8891a6 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  overflow: visible !important;
  transition: background .15s ease, color .15s ease;
}
body.games-mode #gamesPage .gx-nav button:hover { background: #131826 !important; color: #e6eaf4 !important; }
body.games-mode #gamesPage .gx-nav button.active { background: #171327 !important; color: #fff !important; box-shadow: inset 0 0 0 1px #3b2e73 !important; }

body.games-mode #gamesPage .gx-nav [data-game-view="arcade"] { --gx-accent: #ffb43d; }
body.games-mode #gamesPage .gx-nav [data-game-view="dominio"] { --gx-accent: #8b6bff; }
body.games-mode #gamesPage .gx-nav [data-game-view="abismo"] { --gx-accent: #ff4a5e; }
body.games-mode #gamesPage .gx-nav [data-game-view="code"] { --gx-accent: #25f2a6; }
body.games-mode #gamesPage .gx-nav [data-game-view="editor"] { --gx-accent: #6ea8ff; }
body.games-mode #gamesPage .gx-nav [data-game-view="communities"] { --gx-accent: #ff7ab8; }
body.games-mode #gamesPage .gx-nav [data-game-view="live"] { --gx-accent: #ff4d6d; }
body.games-mode #gamesPage .gx-nav [data-game-view="live"].active { background: #26101a !important; box-shadow: inset 0 0 0 1px #6b2136 !important; }

body.games-mode #gamesPage .gx-nav [data-game-view="arcade"].active { background: #241a09 !important; box-shadow: inset 0 0 0 1px #6b4a17 !important; }
body.games-mode #gamesPage .gx-nav [data-game-view="dominio"].active { background: #181334 !important; box-shadow: inset 0 0 0 1px #3b2a78 !important; }
body.games-mode #gamesPage .gx-nav [data-game-view="abismo"].active { background: #231016 !important; box-shadow: inset 0 0 0 1px #5c1d28 !important; }
body.games-mode #gamesPage .gx-nav [data-game-view="code"].active { background: #0a211c !important; box-shadow: inset 0 0 0 1px #14624c !important; }

body.games-mode .gx-tab-logo {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  overflow: visible;
  border-radius: 6px;
}
body.games-mode .gx-tab-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}
body.games-mode #gamesPage .gx-nav .stark-editor-tab-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #8272ff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

/* ---------- conta de jogos (chip) ---------- */
body.games-mode .gx-account {
  order: 2;
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 224px;
  justify-self: end !important;
  align-self: center !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}
body.games-mode .gx-account .games-accounts-head { display: none !important; }
body.games-mode .gx-account .games-accounts-list { display: flex !important; gap: 8px !important; }
body.games-mode .gx-account .games-account-card.is-coming { display: none !important; }
body.games-mode .gx-account .games-account-card {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 7px 8px 7px 9px !important;
  border: 1px solid var(--gx-line-soft) !important;
  border-radius: 11px !important;
  background: #0a0c11 !important;
}
body.games-mode .gx-account .games-account-card.is-linked { border-color: #1f4a34 !important; }
body.games-mode .gx-account .games-account-icon {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}
body.games-mode .gx-account .games-account-copy {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
}
body.games-mode .gx-account .games-account-copy strong { font-size: 11.5px !important; font-weight: 750 !important; color: #e6eaf4 !important; }
body.games-mode .gx-account .games-account-copy span {
  font-size: 9.5px !important;
  color: #7d879c !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.games-mode .gx-account .games-account-card button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  height: 26px !important;
  padding: 0 9px !important;
  border: 1px solid #2a3145 !important;
  border-radius: 7px !important;
  background: #121724 !important;
  color: #cdd4e4 !important;
  font-size: 9.5px !important;
  font-weight: 750 !important;
  white-space: nowrap;
}
body.games-mode .gx-account .games-account-card button:hover { background: #1a2133 !important; color: #fff !important; }

/* ---------- AFTER Originals ---------- */
body.games-mode .gx-originals { margin: 0 0 var(--gx-gap); }
body.games-mode .gx-originals-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 11px;
}
body.games-mode .gx-eyebrow {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .24em;
  color: #7b86a0;
  text-transform: uppercase;
}
body.games-mode .gx-originals-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -.02em;
  color: #f2f5fb;
}
body.games-mode .gx-originals-head p {
  margin: 0;
  max-width: 300px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #79839a;
  text-align: right;
}

body.games-mode .gx-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
body.games-mode .gx-tile {
  position: relative !important;
  isolation: isolate;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 176px !important;
  padding: 15px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 16px !important;
  background: linear-gradient(165deg, #111520, #0a0c11 72%) !important;
  color: #e9edf6 !important;
  text-align: left !important;
  box-shadow: none !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.games-mode button.gx-tile:hover { transform: translateY(-3px) !important; border-color: var(--tile-line, #2b3247) !important; box-shadow: 0 26px 42px -30px #000 !important; }
body.games-mode .gx-tile:focus-visible { outline: 2px solid var(--tile-accent, #7c5cff); outline-offset: 2px; }
body.games-mode .gx-tile:before {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  top: -130px;
  height: 240px;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 50%, var(--tile-glow, transparent), transparent 70%);
  pointer-events: none;
}

body.games-mode .gx-tile-dominio { --tile-accent: #8b6bff; --tile-glow: #6a44ff3d; --tile-line: #3a2f6d; }
body.games-mode .gx-tile-abismo { --tile-accent: #ff5a6e; --tile-glow: #c9153c33; --tile-line: #5c202a; }
body.games-mode .gx-tile-codigo { --tile-accent: #2ae2a0; --tile-glow: #25f2a62b; --tile-line: #175844; }
body.games-mode .gx-tile-arcade { --tile-accent: #ffb43d; --tile-glow: #ffb43d2e; --tile-line: #6b4a17; }

body.games-mode .gx-tile-art {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  margin-bottom: 4px;

}
body.games-mode .gx-tile-badge {
  position: absolute;
  top: 13px;
  right: 13px;
  padding: 4px 7px;
  border: 1px solid #ffffff14;
  border-radius: 6px;
  background: #07090da8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #9aa4bb;
}
body.games-mode .gx-tile-genre {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tile-accent, #8a93a8);
}
body.games-mode .gx-tile strong {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #fff;
}
body.games-mode .gx-tile-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.5;
  color: #8790a5;
}
body.games-mode .gx-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  height: 30px;
  padding: 0 11px;
  border: 1px solid #ffffff14;
  border-radius: 8px;
  background: #ffffff0a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #e9edf6;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
body.games-mode .gx-tile-cta b { font-weight: 900; font-size: 12px; line-height: 1; transition: transform .16s ease; }
body.games-mode button.gx-tile:hover .gx-tile-cta { background: var(--tile-accent, #7c5cff); border-color: transparent; color: #080a0e; }
body.games-mode button.gx-tile:hover .gx-tile-cta b { transform: translateX(2px); }

/* temporada — faixa horizontal abaixo dos jogos */
body.games-mode .gx-season {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #46223a;
  border-radius: 16px;
  background: linear-gradient(120deg, #1b1024, #0a0810 78%);
}
body.games-mode .gx-season:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 120% at 12% 0%, #d61f8a2e, transparent 70%);
  pointer-events: none;
}
body.games-mode .gx-season-copy { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.games-mode .gx-season-copy .gx-tile-genre { color: #ff9ad5; }
body.games-mode .gx-season-copy strong { font-size: 14px; line-height: 1.3; font-weight: 800; color: #fff; }
body.games-mode .gx-season-copy .gx-tile-desc { -webkit-line-clamp: 1; max-width: 560px; }
body.games-mode .gx-season-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
body.games-mode .gx-season-btn {
  height: 32px;
  padding: 0 13px;
  border: 1px solid #6b2a55 !important;
  border-radius: 8px !important;
  background: #ff9ad51a !important;
  color: #ffc0e6 !important;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
body.games-mode .gx-season-btn:hover { background: #ff9ad52e !important; color: #fff !important; }
body.games-mode .gx-season-side small { font-size: 8.5px; line-height: 1.3; color: #6f6879; white-space: nowrap; }

/* ---------- portal dos criadores (faixa) ---------- */
body.games-mode #afterDevPortal {
  margin: 0 0 var(--gx-gap) !important;
  padding: 10px 14px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 14px !important;
  background: var(--gx-panel) !important;
  color: var(--gx-text) !important;
}
body.games-mode #afterDevPortal .after-dev-head {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px 16px !important;
}
body.games-mode #afterDevPortal .after-dev-head > div {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 4px 10px !important;
  min-width: 0 !important;
}
body.games-mode #afterDevPortal .after-dev-head small { font-size: 9px !important; font-weight: 800 !important; letter-spacing: .16em !important; color: #6f7a92 !important; }
body.games-mode #afterDevPortal .after-dev-head h3 { margin: 0 !important; font-size: 13px !important; font-weight: 750 !important; color: #dde3ef !important; }
body.games-mode #afterDevPortal .after-dev-head h3 em { font-style: normal !important; color: #a892ff !important; }
body.games-mode #afterDevPortal .after-dev-head p { display: none !important; }
body.games-mode #afterDevPortal .after-dev-head button {
  flex: 0 0 auto;
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #2b2440 !important;
  border-radius: 8px !important;
  background: #171129 !important;
  color: #d9d2ff !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}
body.games-mode #afterDevPortal .after-dev-head button:hover { background: #20183a !important; color: #fff !important; }

/* ---------- barra de ferramentas e palco ---------- */
body.games-mode #gamesPage .gx-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.games-mode #gamesPage .gx-toolbar.hidden { display: none !important; }
body.games-mode #gamesPage .gx-toolbar select {
  flex: 0 1 240px !important;
  height: 38px !important;
  min-width: 0 !important;
  max-width: 260px;
  padding: 0 34px 0 12px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 10px !important;
  background-color: var(--gx-panel) !important;
  color: #dbe1ee !important;
  font-size: 12px !important;
}
body.games-mode #gamesPage .gx-toolbar button {
  flex: 0 0 auto;
  margin-left: auto !important;
  height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #2b2440 !important;
  border-radius: 10px !important;
  background: #171129 !important;
  color: #d9d2ff !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
}
body.games-mode #gamesPage .gx-toolbar button:hover { background: #20183a !important; color: #fff !important; }

body.games-mode .gx-stage { min-height: 420px !important; padding: 0 !important; }
body.games-mode .gx-stage:before { content: none !important; display: none !important; }

body.games-mode #gamesContent > h3 {
  margin: 0 0 12px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: #7b86a0 !important;
}

/* ---------- arcade: hero, seletor e palco ---------- */
body.games-mode #gamesContent .arcade-shell { max-width: none !important; }
body.games-mode #gamesContent .arcade-hero {
  padding: 16px 18px !important;
  margin-bottom: 14px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #15112a, #0a0b11 72%) !important;
}
body.games-mode #gamesContent .arcade-hero > span {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8f7ce0;
}
body.games-mode #gamesContent .arcade-hero h2 {
  margin: 6px 0 4px !important;
  font-size: clamp(19px, 2.4vw, 24px) !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  letter-spacing: -.02em !important;
  color: #f4f2ff;
}
body.games-mode #gamesContent .arcade-hero p {
  margin: 0 !important;
  max-width: 560px;
  font-size: 11.5px !important;
  line-height: 1.5 !important;
  color: #9a93b5 !important;
}
body.games-mode #gamesContent .arcade-picker {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 0 0 14px !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
}
body.games-mode #gamesContent .arcade-picker button {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 38px !important;
  padding: 0 13px !important;
  border: 1px solid #232a3c !important;
  border-radius: 10px !important;
  background: #0f131d !important;
  color: #dfe4ef !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
body.games-mode #gamesContent .arcade-picker button:hover { background: #161c2a !important; border-color: #33405c !important; color: #fff !important; }
body.games-mode #gamesContent .arcade-picker button.selected {
  background: #1d1733 !important;
  border-color: #6b50d8 !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px #6b50d8 !important;
}
body.games-mode #gamesContent .arcade-picker-title {
  margin: 2px 0 9px !important;
  font-size: 10px !important;
  letter-spacing: .18em !important;
  color: #7b86a0 !important;
}
body.games-mode #gamesContent .arcade-play {
  border: 1px solid var(--gx-line) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #0d1017, #080a0e) !important;
}
body.games-mode #gamesContent .arcade-play > p {
  margin: 0;
  padding: 22px 8px;
  text-align: center;
  color: #7d879c;
  font-size: 12.5px;
}

/* ---------- cartões de comunidade ---------- */
body.games-mode #gamesPage .games-community-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)) !important;
  gap: 12px !important;
}body.games-mode #gamesPage .games-community-grid .games-card {
  min-height: 132px !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #10141d, #090b10) !important;
  box-shadow: none !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
body.games-mode #gamesPage .games-community-grid .games-card:hover {
  border-color: #2c3450 !important;
  box-shadow: 0 18px 34px -26px #000 !important;
  transform: translateY(-2px) !important;
}
body.games-mode #gamesPage .games-community-grid .games-card-main {
  min-height: 132px !important;
  padding: 14px 50px 14px 14px !important;
  gap: 10px !important;
}
body.games-mode #gamesPage .games-community-grid .games-card-topline { font-size: 9px !important; letter-spacing: .12em !important; }
body.games-mode #gamesPage .games-community-grid .games-card-copy strong { font-size: 16px !important; line-height: 1.15 !important; }
body.games-mode #gamesPage .games-community-grid .games-card-copy small { font-size: 11px !important; }
body.games-mode #gamesPage .games-community-grid .games-card:after { font-size: 32px !important; right: 12px !important; bottom: 8px !important; }
body.games-mode #gamesPage .games-favorite {
  top: 10px !important;
  right: 10px !important;
  width: 30px !important;
  height: 30px !important;
  border: 1px solid #262d42 !important;
  border-radius: 9px !important;
  background: #0d111a !important;
  color: #b9c0d2 !important;
  font-size: 14px !important;
}
body.games-mode #gamesPage .games-favorite:hover { border-color: #3a4463 !important; color: #fff !important; background: #141a27 !important; }
body.games-mode #gamesPage .games-card-arrow { color: #9aa4bb !important; }

body.games-mode #gamesPage .games-empty {
  margin: 0 !important;
  padding: 26px 18px !important;
  border: 1px dashed #232a3c !important;
  border-radius: 14px !important;
  background: var(--gx-panel) !important;
  color: #7d879c !important;
  font-size: 12.5px !important;
  text-align: center !important;
}

/* ---------- modo foco (jogo aberto) ---------- */
body.games-mode #gamesPage.ab-focus .gx-header,
body.games-mode #gamesPage.dm-focus .gx-header {
  display: block !important;
  min-height: 0 !important;
  margin: 0 0 6px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.games-mode #gamesPage.ab-focus .gx-brand,
body.games-mode #gamesPage.ab-focus .gx-account,
body.games-mode #gamesPage.dm-focus .gx-brand,
body.games-mode #gamesPage.dm-focus .gx-account { display: none !important; }
body.games-mode #gamesPage.ab-focus .gx-originals,
body.games-mode #gamesPage.dm-focus .gx-originals { display: none !important; }
body.games-mode #gamesPage.ab-focus .gx-nav,
body.games-mode #gamesPage.dm-focus .gx-nav { margin: 0 !important; }
body.games-mode #gamesPage.ab-focus .gx-stage,
body.games-mode #gamesPage.dm-focus .gx-stage { min-height: 0 !important; }

/* ---------- tema claro ---------- */
html[data-theme="light"] body.games-mode {
  --gx-line: #e4e1ec;
  --gx-line-soft: #eceaf3;
  --gx-panel: #ffffff;
  --gx-panel-2: #f7f5fb;
  --gx-text: #191621;
  --gx-muted: #6f6a7c;
}
html[data-theme="light"] body.games-mode .gx-header {
  background: linear-gradient(180deg, #fff, #f8f6fd) !important;
  box-shadow: 0 20px 42px -36px #2d1f46 !important;
}
html[data-theme="light"] body.games-mode .gx-brand-copy b { color: #17141f; }
html[data-theme="light"] body.games-mode #gamesPage .gx-nav { background: #f1eef8 !important; border-color: #e4e1ec !important; }
html[data-theme="light"] body.games-mode #gamesPage .gx-nav button { color: #6f6a7c !important; }
html[data-theme="light"] body.games-mode #gamesPage .gx-nav button:hover { background: #e8e4f3 !important; color: #191621 !important; }
html[data-theme="light"] body.games-mode #gamesPage .gx-nav button.active {
  background: #e6e0fb !important;
  color: #3b2fa8 !important;
  box-shadow: inset 0 0 0 1px #c9c0f0 !important;
}
html[data-theme="light"] body.games-mode .gx-account .games-account-card { background: #fff !important; border-color: #e4e1ec !important; }
html[data-theme="light"] body.games-mode .gx-account .games-account-copy strong { color: #1a1723 !important; }
html[data-theme="light"] body.games-mode .gx-account .games-account-card button { background: #f5f3fa !important; border-color: #e0dceb !important; color: #565064 !important; }
html[data-theme="light"] body.games-mode .gx-originals-head h2 { color: #17141f; }
html[data-theme="light"] body.games-mode .gx-originals-head p { color: #6f6a7c; }
html[data-theme="light"] body.games-mode .gx-tile {
  background: linear-gradient(165deg, #fff, #f5f3fa 74%) !important;
  border-color: #e4e1ec !important;
  color: #1a1723 !important;
}
html[data-theme="light"] body.games-mode .gx-tile strong { color: #17141f; }
html[data-theme="light"] body.games-mode .gx-tile-desc { color: #6f6a7c; }
html[data-theme="light"] body.games-mode .gx-tile-cta { background: #f2eff8; border-color: #e0dceb; color: #3a3448; }
html[data-theme="light"] body.games-mode .gx-tile-badge { background: #fff; border-color: #e4e1ec; color: #6f6a7c; }
html[data-theme="light"] body.games-mode .gx-season { background: linear-gradient(120deg, #fdf2f9, #f7f4fb 78%) !important; border-color: #efd9e8 !important; }
html[data-theme="light"] body.games-mode .gx-season-copy strong { color: #33172b; }
html[data-theme="light"] body.games-mode #afterDevPortal { background: #fff !important; border-color: #e4e1ec !important; }
html[data-theme="light"] body.games-mode #afterDevPortal .after-dev-head h3 { color: #1a1723 !important; }
html[data-theme="light"] body.games-mode #afterDevPortal .after-dev-head button { background: #f4f1fb !important; border-color: #e0dceb !important; color: #4a4160 !important; }
html[data-theme="light"] body.games-mode #gamesPage .gx-toolbar select,
html[data-theme="light"] body.games-mode #gamesPage .gx-toolbar button { background-color: #fff !important; border-color: #e4e1ec !important; color: #1d1a26 !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-hero {
  background: linear-gradient(135deg, #f6f2ff, #fff 72%) !important;
  border-color: #e4e1ec !important;
}
html[data-theme="light"] body.games-mode #gamesContent .arcade-hero h2 { color: #17141f !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-hero p { color: #6f6a7c !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-picker button { background: #fff !important; border-color: #e4e1ec !important; color: #26212f !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-picker button:hover { background: #f5f2fc !important; border-color: #cfc7e6 !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-picker button.selected { background: #ece6fb !important; border-color: #a898e8 !important; color: #2f2570 !important; }
html[data-theme="light"] body.games-mode #gamesContent .arcade-play { background: #faf8fd !important; border-color: #e7e4ef !important; }
html[data-theme="light"] body.games-mode #gamesPage .games-community-grid .games-card { background: #fff !important; border-color: #e7e4ef !important; }
html[data-theme="light"] body.games-mode #gamesPage .games-favorite { background: #fff !important; border-color: #e7e4ef !important; color: #6a6478 !important; }
html[data-theme="light"] body.games-mode #gamesPage .games-empty { background: #faf8fd !important; border-color: #e4e1ec !important; color: #6f6a7c !important; }
html[data-theme="light"] body.games-mode #gamesContent > h3 { color: #6f6a7c !important; }

/* ---------- telas menores ---------- */
@media (max-width: 900px) {
  body.games-mode .gx-header {
    gap: 9px !important;
    padding: 10px 11px !important;
    margin-bottom: 14px !important;
    border-radius: 14px !important;
  }
  body.games-mode .gx-brand { flex: 1 1 140px; }
  body.games-mode .gx-account { display: none !important; }
  body.games-mode #gamesPage .gx-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  }
  body.games-mode .gx-originals-head { flex-direction: column; align-items: flex-start; gap: 5px; }
  body.games-mode .gx-originals-head h2 { font-size: 18px; }
  body.games-mode .gx-originals-head p { max-width: none; text-align: left; }
  body.games-mode .gx-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.games-mode .gx-tile { min-height: 168px !important; padding: 13px !important; }
  body.games-mode .gx-season { flex-direction: column; align-items: flex-start; gap: 10px; }
  body.games-mode .gx-season-side { align-items: flex-start; }
  body.games-mode .gx-season-side small { white-space: normal; }
  body.games-mode #gamesPage .gx-toolbar select { flex: 0 1 300px !important; max-width: 340px; }
  body.games-mode .games-community-grid { gap: 10px !important; }
  body.games-mode #gamesPage .games-community-grid .games-card,
  body.games-mode #gamesPage .games-community-grid .games-card-main { min-height: 118px !important; }
  body.games-mode #gamesPage .games-community-grid .games-card-main { padding: 12px 44px 12px 12px !important; gap: 8px !important; }
  body.games-mode #gamesPage .games-community-grid .games-card-copy strong { font-size: 15px !important; }
  body.games-mode #gamesPage .games-favorite { top: 8px !important; right: 8px !important; width: 27px !important; height: 27px !important; font-size: 12px !important; }
  body.games-mode #gamesPage .games-community-grid .games-card:after { font-size: 26px !important; right: 8px !important; bottom: 6px !important; }
}

@media (max-width: 520px) {
  body.games-mode .gx-rail { grid-template-columns: minmax(0, 1fr); }
  body.games-mode .games-community-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body.games-mode #gamesPage .gx-toolbar select { flex: 1 1 auto !important; max-width: none; font-size: 16px !important; }
}

/* ---------- mobile: tela enxuta (sem jogos de PC, temporada e portal de criadores) ---------- */
@media (max-width: 820px), (pointer: coarse) {
  body.games-mode .gx-tile-dominio,
  body.games-mode .gx-tile-abismo,
  body.games-mode #gamesPage .games-tabs [data-game-view="dominio"],
  body.games-mode #gamesPage .games-tabs [data-game-view="abismo"],
  body.games-mode .gx-season,
  body.games-mode #afterDevPortal { display: none !important; }
}

/* Mobile: dá para assistir as Lives, mas iniciar transmissão é só no PC. */
@media (max-width: 820px), (pointer: coarse) {
  body.games-mode #gamesPage .after-live-hero button { display: none !important; }
}


/* Cada aba com o seu assunto. Os blocos fixos da página pertencem a uma view só:
   Plataformas e Jogos da casa vivem em "Meus Jogos"; o portal de criadores pertence ao Arcade.
   Sem :has() o navegador simplesmente mantém o comportamento antigo - nao quebra nada. */
body.games-mode #gamesPage:not(:has(.gx-nav [data-game-view="mine"].active)) .gx-account,
body.games-mode #gamesPage:not(:has(.gx-nav [data-game-view="mine"].active)) .gx-originals,
body.games-mode #gamesPage:not(:has(.gx-nav [data-game-view="arcade"].active)) #afterDevPortal {
  display: none !important;
}

/* O seletor de jogo e o "Publicar" só fazem sentido em Comunidades; em Lives fica apenas o filtro. */
body.games-mode #gamesPage:not(:has(.gx-nav [data-game-view="communities"].active)):not(:has(.gx-nav [data-game-view="live"].active)) .games-toolbar {
  display: none !important;
}
