/* Editor-selected game categories displayed on the home page. */
body.home .arcade-dashboard .arcade-home-category {
  margin: 30px 0 38px;
}

body.home .arcade-dashboard .arcade-home-category__header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 17px;
}

body.home .arcade-dashboard .arcade-home-category__header h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #f7f8fc;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.025em;
}

body.home .arcade-dashboard .arcade-home-category__header h2:before {
  width: 4px;
  height: 24px;
  flex: 0 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff4d43, #ffa525);
  content: "";
}

body.home .arcade-dashboard .arcade-home-category__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(255, 194, 81, .24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,174,55,.15), rgba(239,76,66,.10));
  color: #ffc159;
  font-size: 20px;
}

body.home .arcade-dashboard .arcade-home-category__more {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #f1f3fa;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body.home .arcade-dashboard .arcade-home-category__more:hover {
  border-color: rgba(255,190,95,.55);
  background: rgba(255,176,70,.10);
  color: #fff;
}

body.home .arcade-dashboard .arcade-home-category__more span {
  font-size: 18px;
  line-height: 10px;
}

body.home .arcade-dashboard .arcade-home-category__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.home .arcade-dashboard .arcade-home-category__grid > li {
  min-width: 0;
  margin: 0;
}

body.home .arcade-dashboard .arcade-home-category__grid > li > a {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 17px;
  background: #171820;
  box-shadow: 0 8px 17px rgba(0,0,0,.14);
}

body.home .arcade-dashboard .arcade-home-category__grid img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  object-fit: cover;
  object-position: center;
  transition: transform .2s ease, filter .2s ease;
}

body.home .arcade-dashboard .arcade-home-category__grid > li > a:hover {
  border-color: rgba(255,174,65,.78);
  box-shadow: 0 10px 24px rgba(0,0,0,.28), 0 0 0 2px rgba(255,112,76,.13);
}

body.home .arcade-dashboard .arcade-home-category__grid > li > a:hover img {
  filter: saturate(1.06);
  transform: scale(1.045);
}

@media (max-width: 1240px) {
  body.home .arcade-dashboard .arcade-home-category__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
  body.home .arcade-dashboard .arcade-home-category__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 680px) {
  body.home .arcade-dashboard .arcade-home-category { margin: 24px 0 30px; }
  body.home .arcade-dashboard .arcade-home-category__header { gap: 10px; margin-bottom: 13px; }
  body.home .arcade-dashboard .arcade-home-category__header h2 { gap: 8px; font-size: 18px; }
  body.home .arcade-dashboard .arcade-home-category__header h2:before { width: 3px; height: 21px; flex-basis: 3px; }
  body.home .arcade-dashboard .arcade-home-category__icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 17px; }
  body.home .arcade-dashboard .arcade-home-category__more { min-height: 33px; padding: 7px 10px; font-size: 11px; }
  body.home .arcade-dashboard .arcade-home-category__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  body.home .arcade-dashboard .arcade-home-category__grid > li > a { border-radius: 13px; }
}

@media (max-width: 420px) {
  body.home .arcade-dashboard .arcade-home-category__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

html.arcade-light-mode body.home .arcade-dashboard .arcade-home-category__header h2 { color: #172033; }
html.arcade-light-mode body.home .arcade-dashboard .arcade-home-category__more { border-color: rgba(21,31,51,.16); color: #25334b; }
html.arcade-light-mode body.home .arcade-dashboard .arcade-home-category__more:hover { border-color: rgba(222,108,46,.5); background: rgba(247,140,72,.10); }
html.arcade-light-mode body.home .arcade-dashboard .arcade-home-category__grid > li > a { border-color: rgba(21,31,51,.10); background: #e9edf5; box-shadow: 0 8px 17px rgba(20,33,57,.10); }

/* Theme Options → Front Page Text. */
body.home .arcade-dashboard .arcade-front-page-text {
  margin: 44px 0 34px;
  padding: clamp(27px, 4vw, 48px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 19px;
  background: #19181f;
  box-shadow: 0 16px 34px rgba(0,0,0,.13);
}

body.home .arcade-dashboard .arcade-front-page-text > h2 {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 25px;
  color: #fbfbfd;
  font-size: clamp(23px, 2.1vw, 29px);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.025em;
}

body.home .arcade-dashboard .arcade-front-page-text > h2:before,
body.home .arcade-dashboard .arcade-front-page-text__content h1:before,
body.home .arcade-dashboard .arcade-front-page-text__content h2:before,
body.home .arcade-dashboard .arcade-front-page-text__content h3:before {
  width: 4px;
  min-height: 30px;
  align-self: stretch;
  flex: 0 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff493f, #ffc22c);
  content: "";
}

body.home .arcade-dashboard .arcade-front-page-text__content {
  max-width: 1180px;
  color: #e0e1e7;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.7;
}

body.home .arcade-dashboard .arcade-front-page-text__content > :first-child { margin-top: 0; }
body.home .arcade-dashboard .arcade-front-page-text__content > :last-child { margin-bottom: 0; }
body.home .arcade-dashboard .arcade-front-page-text__content p { margin: 0 0 22px; }
body.home .arcade-dashboard .arcade-front-page-text__content h1,
body.home .arcade-dashboard .arcade-front-page-text__content h2,
body.home .arcade-dashboard .arcade-front-page-text__content h3 {
  display: flex;
  align-items: stretch;
  gap: 15px;
  margin: 34px 0 19px;
  color: #fbfbfd;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: -.02em;
}

body.home .arcade-dashboard .arcade-front-page-text__content h1 { font-size: clamp(24px, 2.3vw, 32px); }
body.home .arcade-dashboard .arcade-front-page-text__content a { color: #f04b43; text-decoration: underline; text-decoration-color: rgba(240,75,67,.55); text-underline-offset: 3px; }
body.home .arcade-dashboard .arcade-front-page-text__content a:hover { color: #ff8278; }
body.home .arcade-dashboard .arcade-front-page-text__content strong { color: #fff; }
body.home .arcade-dashboard .arcade-front-page-text__content ul,
body.home .arcade-dashboard .arcade-front-page-text__content ol { margin: 0 0 22px 21px; }
body.home .arcade-dashboard .arcade-front-page-text__content li { margin: 7px 0; }

@media (max-width: 680px) {
  body.home .arcade-dashboard .arcade-front-page-text { margin: 31px 0 26px; padding: 24px 20px; border-radius: 15px; }
  body.home .arcade-dashboard .arcade-front-page-text > h2 { gap: 11px; margin-bottom: 19px; font-size: 21px; }
  body.home .arcade-dashboard .arcade-front-page-text > h2:before,
  body.home .arcade-dashboard .arcade-front-page-text__content h1:before,
  body.home .arcade-dashboard .arcade-front-page-text__content h2:before,
  body.home .arcade-dashboard .arcade-front-page-text__content h3:before { width: 3px; flex-basis: 3px; min-height: 25px; }
  body.home .arcade-dashboard .arcade-front-page-text__content { font-size: 16px; line-height: 1.65; }
  body.home .arcade-dashboard .arcade-front-page-text__content h1,
  body.home .arcade-dashboard .arcade-front-page-text__content h2,
  body.home .arcade-dashboard .arcade-front-page-text__content h3 { gap: 11px; margin: 27px 0 16px; font-size: 21px; }
}

html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text { border-color: rgba(21,31,51,.12); background: #fff; box-shadow: 0 14px 31px rgba(20,33,57,.09); }
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text > h2,
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text__content h1,
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text__content h2,
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text__content h3 { color: #172033; }
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text__content { color: #44536b; }
html.arcade-light-mode body.home .arcade-dashboard .arcade-front-page-text__content strong { color: #172033; }

/* Final sidebar override: keep the category rail independent from the legacy
   primary-navigation popup and enforce icon + label rows in every layout. */
#arcade-primary-nav,
#arcade-primary-nav.is-open { display: none !important; }

#arcade-rail.arcade-rail {
  display: block !important;
  position: fixed;
  z-index: 160;
  top: 82px;
  bottom: 0;
  left: 0;
  width: 72px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.10);
  background: #191820;
  box-shadow: 5px 0 18px rgba(0,0,0,.08);
  scrollbar-width: none;
  transition: width .22s ease, box-shadow .22s ease;
}

#arcade-rail.arcade-rail::-webkit-scrollbar { display: none; }
#arcade-rail.arcade-rail:hover,
#arcade-rail.arcade-rail:focus-within,
#arcade-rail.arcade-rail.is-open { width: 244px; box-shadow: 9px 0 24px rgba(0,0,0,.24); }
#arcade-rail.arcade-rail nav { border-top: 1px solid rgba(255,255,255,.09); }
#arcade-rail.arcade-rail ul { width: 100%; margin: 0; padding: 7px 0 16px; }
#arcade-rail.arcade-rail li { margin: 0; padding: 0; }

#arcade-rail.arcade-rail a.arcade-rail__link {
  display: flex !important;
  width: 226px !important;
  height: 38px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: row !important;
  gap: 8px !important;
  margin: 3px 9px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent;
  color: #b8b7c0;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: left !important;
  text-decoration: none;
  white-space: nowrap;
}

#arcade-rail.arcade-rail .arcade-rail__icon {
  display: grid !important;
  width: 43px !important;
  height: 34px !important;
  flex: 0 0 43px !important;
  place-items: center !important;
  border-radius: 9px;
  font-size: 18px !important;
  line-height: 1 !important;
}

#arcade-rail.arcade-rail .arcade-rail__label {
  display: block !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  opacity: 0;
  font-size: 15px !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-overflow: ellipsis;
  transform: translateX(-5px);
  transition: opacity .14s ease .04s, transform .18s ease .04s;
}

#arcade-rail.arcade-rail:hover .arcade-rail__label,
#arcade-rail.arcade-rail:focus-within .arcade-rail__label,
#arcade-rail.arcade-rail.is-open .arcade-rail__label { opacity: 1; transform: translateX(0); }

#arcade-rail.arcade-rail a.arcade-rail__link:hover,
#arcade-rail.arcade-rail a.arcade-rail__link:focus,
#arcade-rail.arcade-rail a.arcade-rail__link.is-current,
#arcade-rail.arcade-rail a.arcade-rail__home { background: #342128 !important; color: #f0b27e !important; }
#arcade-rail.arcade-rail a.arcade-rail__home { margin-top: 9px !important; margin-bottom: 9px !important; }

@media (max-width: 680px) {
  #arcade-rail.arcade-rail {
    top: 60px;
    width: 0;
    border-right: 0;
  }
  #arcade-rail.arcade-rail:hover,
  #arcade-rail.arcade-rail:focus-within,
  #arcade-rail.arcade-rail.is-open { width: min(244px, calc(100vw - 36px)); border-right: 1px solid rgba(255,255,255,.10); }
  #arcade-rail.arcade-rail .arcade-rail__label { opacity: 1; transform: none; }
  #arcade-rail.arcade-rail a.arcade-rail__link { width: calc(100% - 18px) !important; }
}

html.arcade-light-mode #arcade-rail.arcade-rail { border-color: rgba(21,31,51,.12); background: #fff; }
html.arcade-light-mode #arcade-rail.arcade-rail a.arcade-rail__link { color: #4a5870; }
html.arcade-light-mode #arcade-rail.arcade-rail a.arcade-rail__link:hover,
html.arcade-light-mode #arcade-rail.arcade-rail a.arcade-rail__link:focus,
html.arcade-light-mode #arcade-rail.arcade-rail a.arcade-rail__link.is-current,
html.arcade-light-mode #arcade-rail.arcade-rail a.arcade-rail__home { background: #f7ecee !important; color: #c34948 !important; }
