/* GB-prelaunch 2026-09-26: small pre-launch fixes, included from main.tpl.php. Keep blocks small and marked. */

/* GB-prelaunch 2026-09-26: forum section/category header (/forum/<section>) - icon tile + title aligned left
   (was: flex space-between pushed the title to the right, bare unstyled gamepad icon on the left) */
.gc-html .nx-forum-head--section {
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
}
.gc-html .nx-forum-head--section .forum-section-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  color: #65d0f5;
  background: rgba(54, 169, 215, 0.12);
  border: 1px solid rgba(101, 208, 245, 0.18);
  place-items: center;
}
.gc-html .nx-forum-head--section .forum-section-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gc-html .nx-forum-head--section .forum-section-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.gc-html .nx-forum-head--section .nx-forum-head__text {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 575.98px) {
  .gc-html .nx-forum-head--section { align-items: flex-start; gap: 12px; }
  .gc-html .nx-forum-head--section .forum-section-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 11px; }
  .gc-html .nx-forum-head--section .forum-section-icon svg { width: 22px; height: 22px; }
}

/* GB-prelaunch 2026-09-26: game page empty-rating state (no votes) shows a muted dash instead of green 0% */
.gc-review-score strong.gb-empty { opacity: .45; }

/* GB design fix 2026-09-27: download launcher hash overflow */
@media (max-width: 980px) {
  .gc-html .launcher-verify__card {
    flex-direction: column;
    align-items: stretch;
  }
  .gc-html .launcher-hash {
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .gc-html .launcher-hash code,
  .gc-html .launcher-hash code[data-file-hash] {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: download/activity row overflow */
body.gc-dl-page section.container > main.row,
body.gc-sec-activity section.container > main.row,
body.gc-dl-page main.row,
body.gc-sec-activity main.row {
  display: block;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: auth breadcrumbs */
body.auth-page .gc-crumbs,
body.auth-page nav.gc-crumbs {
  display: none;
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: board inner width and heading order */
.nx-body.board-page .nx-ctype.nx-ctype--board,
.nx-body.board-page .icms-body-toolbox {
  width: min(1220px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}
.nx-body.board-page .nx-ctype.nx-ctype--board {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.nx-body.board-page .nx-ctype--board > section.gc-feed-head {
  order: -1;
}
.nx-body.board-page .nx-ctype--board > .category_description {
  display: none;
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: search filter selects clip */
.nx-body.nx-search-page .nx-search select.form-control {
  box-sizing: border-box;
  height: 48px;
  min-height: 48px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  line-height: 1.4;
  overflow: visible;
}
@media (max-width: 576px) {
  .nx-body.nx-search-page .nx-search .form-row {
    flex-wrap: wrap;
  }
  .nx-body.nx-search-page .nx-search .form-row > .col-auto {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }
  .nx-body.nx-search-page .nx-search select.form-control {
    width: 100%;
  }
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: forum hero contrast */
.forum-hero__shade {
  background:
    linear-gradient(90deg, rgba(6, 15, 23, 0.88), rgba(6, 15, 23, 0.72) 38%, rgba(6, 15, 23, 0.38) 72%, rgba(6, 15, 23, 0.22)),
    linear-gradient(0deg, #071019 0%, rgba(7, 16, 25, 0.78) 38%, transparent 68%);
}
.forum-hero__title > div:first-child > p,
.forum-hero__stats span {
  color: #e8f0f6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
.forum-hero__stats strong,
.forum-hero h1 {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}
@media (max-width: 576px) {
  .forum-hero__title {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .forum-hero__stats {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: comments heading indent */
.nx-body.comments-page .activity-heading h1 {
  width: auto;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.nx-body.comments-page .activity-heading__row {
  align-items: center;
}
.nx-body.comments-page .activity-heading__row a.gc-popular__all {
  align-self: center;
}
@media (max-width: 576px) {
  .nx-body.comments-page .activity-heading__row {
    align-items: flex-start;
    gap: 12px;
  }
  .nx-body.comments-page .activity-heading__row a.gc-popular__all {
    margin-top: 4px;
    padding-right: 0;
  }
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: article hero 100vw overflow */
body.article-page:not(.news-page) section.article-hero {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: games category heading */
body.gc-catalog-page:has(.gc-catalog-list--cat) .gc-crumbs,
body.gc-catalog-page:has(.gc-catalog-list--cat) nav.gc-crumbs,
body.gc-catalog-page:has(.gc-catalog-list--cat) .icms-breadcrumbs,
body.gc-catalog-page:has(.gc-catalog-list--cat) .icms-widget-breadcrumbs {
  display: flex !important;
}
.gc-catalog-list--cat .gc-hero__eyebrow {
  text-decoration: none;
}
.gc-catalog-list--cat .gc-popular__head h1 {
  margin: 0;
  color: #e8eef3;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.gc-catalog-list--cat .gc-popular__head .category_description {
  margin: 8px 0 0;
  color: #8fa3b5;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}
@media (max-width: 576px) {
  .gc-catalog-list--cat .gc-popular__head h1 {
    font-size: 26px;
  }
}
/* /GB design fix 2026-09-27 */

/* GB design fix 2026-09-27: mobile menu polish */
@media (max-width: 991.98px) {
  .gc-nav-backdrop {
    transition: opacity 200ms ease;
  }
  .nx-body > header .navbar-toggler {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    place-items: center;
  }
  .nx-body > header #target-main,
  .nx-body > header #target-main.collapsing,
  .nx-body > header #target-main.show {
    padding: 16px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: #0c1822 !important;
    max-height: calc(100dvh - 80px) !important;
  }
  .nx-body > header #target-main.collapsing {
    display: flex !important;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease !important;
  }
  .nx-body > header #target-main.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms ease, transform 200ms ease !important;
  }
  .nx-body > header #target-main form.icms-navbar-form__show_on_hide {
    margin: 0 0 8px !important;
    padding: 0 !important;
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown::after,
  .nx-body > header #target-main .menu-main > .nav-item > a.nav-link::before,
  .nx-body > header #target-main .menu-main > .nav-item > a.nav-link::after {
    display: none !important;
    content: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .nx-body > header #target-main .menu-main > .nav-item > a.nav-link {
    display: flex !important;
    min-height: 48px;
    padding: 0 !important;
    align-items: center;
    color: #e8eef3 !important;
    font-size: 16px;
    font-weight: 600;
    background: transparent !important;
    border-radius: 10px;
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown > a.dropdown-toggle {
    width: 100%;
    gap: 8px;
  }
  .nx-body > header #target-main .menu-main > .nav-item > a.nav-link,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown > a.dropdown-toggle {
    width: calc(100% + 24px) !important;
    margin: 0 -12px !important;
    padding: 0 12px !important;
  }
  .nx-body > header #target-main .menu-main .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main .gc-nav-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: #8fa3b5;
    stroke: #8fa3b5;
    fill: none;
    transform: none;
    transition: transform 200ms ease;
  }
  .nx-body > header #target-main .menu-main .gc-nav-caret-icon path,
  .nx-body > header #target-main .menu-main .gc-nav-chevron path {
    fill: none !important;
    stroke: #8fa3b5;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-expanded > a .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-open > a .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-expanded > a .gc-nav-chevron,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-open > a .gc-nav-chevron {
    transform: rotate(180deg);
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown:hover > a .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown:hover > a .gc-nav-chevron {
    transform: none;
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-expanded:hover > a .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-open:hover > a .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-expanded:hover > a .gc-nav-chevron,
  .nx-body > header #target-main .menu-main > .nav-item.dropdown.is-open:hover > a .gc-nav-chevron {
    transform: rotate(180deg);
  }
  .nx-body > header #target-main .menu-main > .nav-item.is-expanded:not(.active) > a.nav-link:not(.active) {
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none;
  }
  .nx-body > header #target-main .menu-main > .nav-item.active > a.nav-link,
  .nx-body > header #target-main .menu-main > .nav-item > a.nav-link.active {
    color: #fff !important;
    background: rgba(32, 168, 243, 0.12) !important;
    box-shadow: inset 3px 0 0 #20a8f3;
    border-radius: 10px;
  }
  .nx-body > header #target-main .menu-main > .nav-item.dropdown > .dropdown-menu.gc-nav-panel {
    margin: 4px 0 8px !important;
    padding: 4px 0 4px 12px !important;
    border: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .nx-body > header #target-main .menu-main .dropdown-item.gc-nav-row {
    min-height: 48px;
    gap: 12px;
    padding: 0 8px !important;
  }
  .nx-body > header #target-main .menu-main .gc-nav-ico {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    color: #62c9ff;
    background: rgba(32, 168, 243, 0.1);
  }
  .nx-body > header #target-main .menu-main .gc-nav-ico svg {
    width: 16px;
    height: 16px;
  }
  .nx-body > header #target-main .menu-main .gc-nav-copy .nav-item-text {
    color: #e8eef3;
    font-size: 14px;
    font-weight: 600;
  }
  .nx-body > header #target-main .menu-main .gc-nav-copy small {
    color: #8fa3b5;
    font-size: 12px;
    font-weight: 400;
  }
  .nx-body > header #target-main .menu-main .dropdown-item.active,
  .nx-body > header #target-main .menu-main .nav-item.is-active > .dropdown-item {
    color: #fff !important;
    background: rgba(32, 168, 243, 0.12) !important;
    box-shadow: inset 3px 0 0 #20a8f3;
    border-radius: 10px;
  }
  .nx-body > header #target-main .gc-nav-panel > li > a.dropdown-item:not(.gc-nav-row) {
    min-height: 44px;
    margin: 0;
    padding: 0 8px 0 52px !important;
    border: 0;
    border-top: 0 !important;
    color: #62c9ff !important;
    font-size: 13px;
    font-weight: 600;
    background: transparent !important;
    box-shadow: none !important;
  }
  .nx-body > header #target-main .gc-nav-panel > li > a.dropdown-item:not(.gc-nav-row)::after {
    content: " \2192";
  }
  .nx-body > header #target-main > div.ml-auto {
    display: flex !important;
    width: 100%;
    margin: 8px 0 0 !important;
    padding: 16px 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
  }
  .nx-body > header #target-main > div.ml-auto > ul:has(> li.key, > li.user_add) {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px;
  }
  .nx-body > header #target-main > div.ml-auto li.nav-item.key,
  .nx-body > header #target-main > div.ml-auto li.nav-item.user_add {
    flex: 1 1 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  .nx-body > header #target-main > div.ml-auto li.nav-item.key > a.nav-link,
  .nx-body > header #target-main > div.ml-auto li.nav-item.user_add > a.nav-link {
    display: flex !important;
    width: 100%;
    min-height: 44px;
    padding: 0 12px !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }
  .nx-body > header #target-main > div.ml-auto li.nav-item.key > a.nav-link svg,
  .nx-body > header #target-main > div.ml-auto li.nav-item.user_add > a.nav-link svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0 !important;
  }
  .nx-body > header #target-main > div.ml-auto li.nav-item.key > a.nav-link {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #e8eef3 !important;
    background: rgba(255, 255, 255, 0.03) !important;
  }
  .nx-body > header #target-main > div.ml-auto li.nav-item.user_add > a.nav-link {
    border: 0 !important;
    color: #071019 !important;
    background: linear-gradient(115deg, #65d0f7, #3bb3e8) !important;
  }
  .nx-body > header #target-main a:focus-visible,
  .nx-body > header #target-main button:focus-visible,
  .nx-body > header .navbar-toggler:focus-visible {
    outline: 2px solid #62c9ff;
    outline-offset: 2px;
  }
}
@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .gc-nav-backdrop,
  .nx-body > header #target-main.collapsing,
  .nx-body > header #target-main.show,
  .nx-body > header #target-main .menu-main .gc-nav-caret-icon,
  .nx-body > header #target-main .menu-main .gc-nav-chevron {
    transition: none !important;
  }
}
/* /GB design fix 2026-09-27 */
