/*
Theme Name: Boh Arcade
Theme URI: https://en.asupergame.com/
Author: Asupergame
Author URI: https://en.asupergame.com/
Description: A fast, accessible dark arcade theme for free HTML5 browser games.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boh-arcade
Tags: entertainment, grid-layout, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* --------------------------------------------------------------------------
   Foundations
   -------------------------------------------------------------------------- */

:root {
  color-scheme: dark;
  --boh-bg: #090c13;
  --boh-bg-elevated: #101522;
  --boh-surface: #151b2a;
  --boh-surface-2: #1b2334;
  --boh-surface-3: #252f43;
  --boh-text: #f7f8fc;
  --boh-muted: #aeb7c9;
  --boh-border: rgba(255, 255, 255, 0.1);
  --boh-border-strong: rgba(255, 255, 255, 0.18);
  --boh-accent: var(--color-accent, #7c3aed);
  --boh-accent-action: color-mix(in srgb, var(--boh-accent) 82%, #000);
  --boh-accent-hover: color-mix(in srgb, var(--boh-accent) 92%, #000);
  --boh-accent-soft: #c4b5fd;
  --boh-danger: #fb7185;
  --boh-success: #4ade80;
  --boh-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  --boh-radius-sm: 0.55rem;
  --boh-radius: 0.9rem;
  --boh-radius-lg: 1.25rem;
  --boh-container: 106rem;
  --boh-gutter: clamp(0.8rem, 2.5vw, 2rem);
  --boh-header-offset: 11.5rem;
  --boh-transition: 180ms ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--boh-header-offset) + 1rem);
  scrollbar-color: var(--boh-surface-3) var(--boh-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--boh-bg);
  background:
    radial-gradient(circle at 15% -10%, color-mix(in srgb, var(--boh-accent) 18%, transparent), transparent 28rem),
    var(--boh-bg);
  color: var(--boh-text);
  font-size: 1rem;
  line-height: 1.65;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

img,
svg,
video,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[type="button"],
[type="submit"] {
  cursor: pointer;
}

a {
  color: var(--boh-accent-soft);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--boh-accent-soft);
  outline-offset: 3px;
}

::selection {
  background: var(--boh-accent);
  color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 0.65em;
  color: var(--boh-text);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
}

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

h3 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

p,
ul,
ol,
blockquote,
pre,
table {
  margin-block: 0 1.25rem;
}

hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: var(--boh-border);
}

.site,
#page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-main,
#primary {
  flex: 1 0 auto;
}

.site-content,
.site-main {
  width: 100%;
}

.container,
.site-container,
.wrap,
.shell,
.header-inner,
.footer-inner {
  width: min(100% - (2 * var(--boh-gutter)), var(--boh-container));
  margin-inline: auto;
}

.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 0.75rem;
  left: 0.75rem;
  width: auto !important;
  height: auto !important;
  padding: 0.75rem 1rem !important;
  margin: 0 !important;
  clip: auto !important;
  border-radius: var(--boh-radius-sm);
  background: #fff;
  color: #111827;
  box-shadow: var(--boh-shadow);
  font-weight: 700;
}

.button,
.wp-block-button__link,
.play-button,
.favorite-button,
.favourite-button,
.fullscreen-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--boh-accent-action);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background-color var(--boh-transition), border-color var(--boh-transition), color var(--boh-transition), transform var(--boh-transition);
}

.button {
  padding: 0.75rem 1.15rem;
}

.button:hover,
.wp-block-button__link:hover,
.play-button:hover,
.favorite-button:hover,
.favourite-button:hover,
.fullscreen-button:hover {
  background: var(--boh-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.button--secondary,
.button.secondary {
  border-color: var(--boh-border-strong);
  background: var(--boh-surface-2);
}

.icon-button {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--boh-border);
  border-radius: 999px;
  background: rgba(10, 13, 21, 0.78);
  color: #fff;
}

.empty-state,
.notice-panel,
.flash-unavailable,
.no-results {
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background: var(--boh-surface);
  text-align: center;
}

.empty-state > :last-child,
.notice-panel > :last-child,
.flash-unavailable > :last-child,
.no-results > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Sticky header, branding, search, and category navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--boh-border);
  background: rgba(9, 12, 19, 0.91);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.65rem, 2vw, 1.5rem);
  min-height: 4.5rem;
  padding-block: 0.65rem;
}

.site-branding {
  min-width: max-content;
  line-height: 1;
}

.site-title,
.site-branding .custom-logo-link,
.wordmark {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.site-title::first-letter {
  color: var(--boh-accent-soft);
}

.wordmark span {
  color: var(--boh-accent-soft);
}

.wordmark strong {
  color: #fff;
  font-weight: 900;
}

.custom-logo {
  width: auto;
  max-width: min(12rem, 32vw);
  max-height: 2.7rem;
}

.site-description {
  margin: 0.3rem 0 0;
  color: var(--boh-muted);
  font-size: 0.75rem;
}

.site-search,
.header-search,
.search-form {
  position: relative;
  width: 100%;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-field {
  width: 100%;
  min-width: 0;
  height: 2.8rem;
  padding: 0 3rem 0 2.75rem;
  border: 1px solid var(--boh-border-strong);
  border-radius: 999px;
  background: var(--boh-surface);
  color: var(--boh-text);
  appearance: none;
}

.search-field::placeholder {
  color: #8893a8;
  opacity: 1;
}

.search-field:focus {
  border-color: var(--boh-accent-soft);
  background: var(--boh-surface-2);
}

.search-submit {
  position: absolute;
  right: 0.3rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--boh-muted);
  font-size: 0;
}

.search-form__icon {
  position: absolute;
  z-index: 1;
  left: 0.85rem;
  color: var(--boh-muted);
  pointer-events: none;
}

.search-submit::before {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.search-submit::after {
  position: absolute;
  width: 0.5rem;
  height: 2px;
  margin: 0.85rem 0 0 0.85rem;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-submit:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-favourites {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--boh-border);
  border-radius: 999px;
  background: var(--boh-surface);
  color: var(--boh-text);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.header-favourites > [aria-hidden="true"] {
  color: var(--boh-danger);
  font-size: 1.05rem;
}

.header-favourites:hover {
  border-color: var(--boh-accent-soft);
  color: #fff;
}

.favourites-link,
.favorites-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--boh-border);
  border-radius: 999px;
  background: var(--boh-surface);
  color: var(--boh-text);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.favourites-link:hover,
.favorites-link:hover {
  border-color: var(--boh-accent-soft);
  color: #fff;
}

.category-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.primary-nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: max-content;
  padding: 0.1rem 0 0.45rem;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--boh-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: #fff;
}

.category-chips,
.category-list,
.game-categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.category-nav .category-chips,
.category-nav .category-list {
  width: min(100%, var(--boh-container));
  padding: 0.55rem var(--boh-gutter) 0.7rem;
  margin-inline: auto;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
  -webkit-overflow-scrolling: touch;
}

.category-chips > *,
.category-list > *,
.game-categories > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.category-chips a,
.category-list a,
.category-chip,
.game-categories a {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--boh-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--boh-muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.category-chips a:hover,
.category-list a:hover,
.category-chip:hover,
.game-categories a:hover,
.category-chips .current-cat > a,
.category-list .current-menu-item > a {
  border-color: color-mix(in srgb, var(--boh-accent) 75%, #fff);
  background: color-mix(in srgb, var(--boh-accent) 18%, transparent);
  color: #fff;
}

.category-chip.is-active {
  border-color: color-mix(in srgb, var(--boh-accent) 75%, #fff);
  background: color-mix(in srgb, var(--boh-accent) 18%, transparent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Advertising: stable, reserved boxes to avoid layout shift
   -------------------------------------------------------------------------- */

.ad-wrap,
.ad-slot,
.advertisement {
  display: grid;
  width: 100%;
  min-height: 6.25rem;
  place-items: center;
  overflow: hidden;
  contain: layout paint;
}

.ad-wrap::before,
.ad-slot::before,
.advertisement::before {
  grid-area: 1 / 1;
  align-self: start;
  margin-top: 0.25rem;
  color: #758096;
  content: attr(data-label);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.ad-wrap .adsbygoogle,
.ad-slot .adsbygoogle,
.advertisement .adsbygoogle {
  grid-area: 1 / 1;
  width: 100%;
  min-height: inherit;
}

.ad-slot {
  position: relative;
  padding-top: 1rem;
}

.ad-slot__label {
  position: absolute;
  z-index: 1;
  top: 0.3rem;
  left: 50%;
  color: #758096;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.site-ad-band {
  padding-block: 0.35rem;
}

.ad-slot--header {
  min-height: 6.25rem;
}

.ad-placement--header,
.header-ad,
.ad-under-header {
  min-height: 6.25rem;
  padding-block: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ad-placement--player,
.player-ad,
.ad-slot--player {
  min-height: 15.625rem;
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius);
  background: rgba(255, 255, 255, 0.018);
}

.game-grid > .ad-slot,
.game-grid > .ad-card,
.game-grid > .archive-ad {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius);
  background: var(--boh-bg-elevated);
}

/* --------------------------------------------------------------------------
   Sections, headings, archives, and game cards
   -------------------------------------------------------------------------- */

.site-main {
  padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(3rem, 7vw, 6rem);
}

.home .site-main {
  padding-top: clamp(1rem, 2vw, 1.75rem);
}

.game-section,
.archive-section,
.related-games,
.latest-games,
.favourites-section,
.favorites-section {
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

#new-games {
  scroll-margin-top: calc(var(--boh-header-offset) + 1rem);
}

.section-header,
.section-heading,
.archive-header,
.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.archive-header,
.page-header {
  align-items: center;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--boh-accent) 15%, transparent), transparent 55%),
    var(--boh-bg-elevated);
}

.section-header h1,
.section-header h2,
.section-heading h1,
.section-heading h2,
.archive-header h1,
.page-header h1,
.archive-title,
.page-title {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.section-heading > :first-child > :last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--boh-accent-soft);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.archive-header .eyebrow,
.archive-header h1,
.archive-header .archive-description {
  grid-column: 1;
}

.archive-header .archive-count {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  color: var(--boh-muted);
  font-weight: 700;
}

.archive-header .archive-description {
  margin-top: 0.8rem;
}

.section-kicker,
.archive-description,
.page-description,
.results-count {
  color: var(--boh-muted);
}

.archive-description > :last-child,
.page-description > :last-child {
  margin-bottom: 0;
}

.section-link,
.see-all {
  flex: 0 0 auto;
  color: var(--boh-accent-soft);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.section-link::after,
.see-all::after {
  content: " \2192";
}

.section-link:has([aria-hidden="true"])::after,
.see-all:has([aria-hidden="true"])::after {
  content: none;
}

.game-grid,
.games-grid,
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.8vw, 1.2rem);
}

.game-card {
  position: relative;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 14rem;
}

.game-card__link,
.game-card > a:first-child,
.game-card-link {
  display: block;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--boh-radius);
  background: var(--boh-bg-elevated);
  color: var(--boh-text);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
  text-decoration: none;
  transform: translateZ(0);
  transition: border-color var(--boh-transition), box-shadow var(--boh-transition), transform var(--boh-transition);
}

.game-card__media,
.game-card-thumbnail,
.game-card .post-thumbnail {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.08)),
    var(--boh-surface-2);
}

.game-card__media img,
.game-card-thumbnail img,
.game-card .post-thumbnail img,
.game-card__image,
.game-card > a:first-child > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.game-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at 25% 15%, color-mix(in srgb, var(--boh-accent) 62%, transparent), transparent 38%),
    linear-gradient(135deg, #18213a, #0e1321);
  background-position: center;
  background-size: cover;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 950;
  line-height: 1;
}

.game-card__body,
.game-card-content {
  display: flex;
  min-height: 3.9rem;
  align-items: center;
  padding: 0.68rem 0.72rem 0.75rem;
}

.game-card__link > .game-card__title {
  min-height: 3.9rem;
  padding: 0.68rem 0.72rem 0.75rem;
}

.game-card__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(9, 12, 19, 0.72);
  color: #fff;
  font-size: 0.8rem;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.9);
  transition: opacity var(--boh-transition), transform var(--boh-transition);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.game-card__link:hover .game-card__play,
.game-card__link:focus-visible .game-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.game-card__title,
.game-card-title,
.game-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--boh-text);
  font-size: clamp(0.82rem, 1.6vw, 0.98rem);
  font-weight: 750;
  letter-spacing: -0.012em;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.game-card__badge,
.desktop-only-badge,
.game-badge {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(9, 12, 19, 0.83);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.game-card .favorite-button,
.game-card .favourite-button,
.game-card [data-favourite],
.game-card [data-favorite] {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  width: 2.2rem;
  min-height: 2.2rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(9, 12, 19, 0.83);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.favorite-button[aria-pressed="true"],
.favourite-button[aria-pressed="true"],
[data-favourite][aria-pressed="true"],
[data-favorite][aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--boh-danger) 70%, white);
  background: var(--boh-danger);
  color: #19060a;
}

.game-card__link:hover,
.game-card > a:first-child:hover,
.game-card-link:hover {
  border-color: var(--boh-border-strong);
  color: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.game-card__link:hover img,
.game-card > a:first-child:hover img,
.game-card-link:hover img {
  transform: scale(1.045);
}

.game-card.is-removing {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity var(--boh-transition), transform var(--boh-transition);
}

/* --------------------------------------------------------------------------
   Single game and click-to-play surface
   -------------------------------------------------------------------------- */

.single-post .game-entry {
  width: min(100% - (2 * var(--boh-gutter)), var(--boh-container));
  margin-inline: auto;
}

.single-game {
  width: 100%;
}

.player-layout {
  display: grid;
  align-items: start;
  gap: clamp(0.8rem, 2vw, 1.25rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.player-stage,
.game-player-wrap {
  display: flex;
  min-width: 0;
  justify-content: center;
}

.player-shell,
.game-player,
[data-player] {
  position: relative;
  width: 100%;
  width: min(100%, calc((100svh - var(--boh-header-offset) - 2rem) * var(--game-aspect, 1.7778)));
  max-height: calc(100svh - var(--boh-header-offset) - 2rem);
  min-width: 0;
  overflow: hidden;
  aspect-ratio: var(--game-ratio, 16 / 9);
  border: 1px solid var(--boh-border-strong);
  border-radius: var(--boh-radius-lg);
  background: #03050a;
  box-shadow: var(--boh-shadow);
  isolation: isolate;
  justify-self: center;
}

.player-unavailable {
  display: grid;
  min-height: min(32rem, max(18rem, calc(100svh - var(--boh-header-offset) - 2rem)));
  place-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background: var(--boh-bg-elevated);
  text-align: center;
}

.player-unavailable__icon {
  color: var(--boh-accent-soft);
  font-size: 3rem;
}

.player-unavailable__title {
  margin-bottom: 0.65em;
  color: var(--boh-text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.player-unavailable > :last-child {
  margin-bottom: 0;
}

.player-shell:fullscreen,
.game-player:fullscreen,
[data-player]:fullscreen,
.player-shell:-webkit-full-screen,
.game-player:-webkit-full-screen,
[data-player]:-webkit-full-screen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.player-placeholder,
[data-player-placeholder],
.player-mount,
[data-player-mount],
.player-shell iframe,
.game-player iframe,
[data-player] iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder,
[data-player-placeholder] {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #060912;
}

.player-placeholder::after,
[data-player-placeholder]::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(3, 5, 10, 0.78), rgba(3, 5, 10, 0.04) 72%);
  content: "";
  pointer-events: none;
}

.player-placeholder img,
[data-player-placeholder] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) brightness(0.72);
  transform: scale(1.01);
}

.play-button,
[data-play-game] {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: inline-flex;
  min-width: clamp(5rem, 14vw, 8.5rem);
  min-height: clamp(5rem, 14vw, 8.5rem);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 0;
  border-radius: 50%;
  background: var(--boh-accent);
  color: #fff;
  box-shadow: 0 14px 45px color-mix(in srgb, var(--boh-accent) 50%, transparent);
  font-size: clamp(0.8rem, 2vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.1;
  transform: translate(-50%, -50%);
}

.play-button::before,
[data-play-game]::before {
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  border-top: 0.72rem solid transparent;
  border-bottom: 0.72rem solid transparent;
  border-left: 1.08rem solid currentColor;
  content: "";
}

.play-button:hover,
[data-play-game]:hover {
  background: var(--boh-accent-hover);
  transform: translate(-50%, -50%) scale(1.055);
}

.play-button:has(.play-button__icon)::before {
  display: none;
}

.play-button__icon {
  margin-left: 0.15rem;
  font-size: clamp(1.1rem, 3vw, 1.75rem);
}

.play-button > span:last-child {
  position: absolute;
  top: calc(100% + 0.65rem);
  width: max-content;
  color: #fff;
  font-size: 0.78rem;
  text-shadow: 0 2px 8px #000;
}

.play-button[disabled],
[data-play-game][disabled] {
  cursor: wait;
  opacity: 0.75;
}

.player-shell.is-playing .player-placeholder,
.game-player.is-playing .player-placeholder,
[data-player].is-playing [data-player-placeholder] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.player-controls {
  position: absolute;
  z-index: 6;
  right: 0.65rem;
  bottom: 0.65rem;
  display: flex;
  gap: 0.45rem;
}

.fullscreen-button,
[data-fullscreen] {
  display: inline-flex;
  width: auto;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.7rem;
  background: rgba(3, 5, 10, 0.78);
  color: #fff;
  font-size: 1rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.player-shell > .fullscreen-button,
.game-player > .fullscreen-button,
[data-player] > [data-fullscreen] {
  position: absolute;
  z-index: 6;
  right: 0.65rem;
  bottom: 0.65rem;
}

.fullscreen-button:hover,
[data-fullscreen]:hover {
  background: rgba(29, 36, 52, 0.94);
  transform: none;
}

.player-message,
[data-player-message] {
  position: absolute;
  z-index: 7;
  inset: auto 1rem 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--boh-radius-sm);
  background: rgba(9, 12, 19, 0.94);
  color: #fff;
  text-align: center;
}

.game-header,
.game-meta-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.game-header h1 {
  margin-bottom: 0.55rem;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.desktop-badge {
  display: inline-flex;
  min-height: 1.85rem;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--boh-border-strong);
  border-radius: 999px;
  background: var(--boh-surface);
  color: var(--boh-muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.game-header > .favourite-button,
.game-header > .favorite-button {
  min-width: max-content;
  padding: 0.72rem 1rem;
}

.game-title,
.entry-title {
  margin-bottom: 0.45rem;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.game-actions .favorite-button,
.game-actions .favourite-button,
.game-actions [data-favourite],
.game-actions [data-favorite] {
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--boh-border-strong);
  border-radius: 999px;
  background: var(--boh-surface);
  color: var(--boh-text);
  font-weight: 800;
}

.game-content-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.game-details-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.game-description,
.how-to-play,
.entry-content,
.game-info-panel {
  min-width: 0;
}

.game-description,
.how-to-play,
.game-instructions,
.game-info-panel {
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background: var(--boh-bg-elevated);
}

.content-panel {
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background: var(--boh-bg-elevated);
}

.shell--reading {
  max-width: 52rem;
}

.entry-content {
  overflow-wrap: anywhere;
}

.entry-content > :first-child,
.game-description > :first-child,
.how-to-play > :first-child {
  margin-top: 0;
}

.entry-content > :last-child,
.game-description > :last-child,
.how-to-play > :last-child {
  margin-bottom: 0;
}

.breadcrumbs {
  margin-bottom: 1rem;
  color: var(--boh-muted);
  font-size: 0.78rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  margin-right: 0.4rem;
  color: #69758b;
  content: "/";
}

.breadcrumbs a {
  color: var(--boh-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Pagination, content, WordPress defaults
   -------------------------------------------------------------------------- */

.navigation.pagination,
.pagination,
.posts-navigation,
.post-navigation {
  margin-top: clamp(2rem, 5vw, 4rem);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.pagination > ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  list-style: none;
}

.pagination > ul.page-numbers > li {
  margin: 0;
}

a.page-numbers,
span.page-numbers {
  display: inline-grid;
  min-width: 2.65rem;
  min-height: 2.65rem;
  padding: 0.5rem;
  place-items: center;
  border: 1px solid var(--boh-border);
  border-radius: 0.7rem;
  background: var(--boh-surface);
  color: var(--boh-text);
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

a.page-numbers:hover,
span.page-numbers.current {
  border-color: var(--boh-accent);
  background: var(--boh-accent);
  color: #fff;
}

span.page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

.entry-content a:not(.button):not(.wp-block-button__link) {
  overflow-wrap: break-word;
}

.entry-content img,
.wp-caption {
  max-width: 100%;
  border-radius: var(--boh-radius-sm);
}

.wp-caption-text,
.gallery-caption {
  margin-top: 0.4rem;
  color: var(--boh-muted);
  font-size: 0.8rem;
}

.alignleft {
  float: left;
  margin: 0.25rem 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0.25rem 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.alignwide {
  width: min(100%, var(--boh-container));
}

.sticky {
  border-color: color-mix(in srgb, var(--boh-accent) 55%, transparent);
}

.bypostauthor {
  outline: 1px solid var(--boh-border);
}

blockquote {
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 4px solid var(--boh-accent);
  color: var(--boh-muted);
}

pre,
code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-sm);
  background: #050810;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.65rem;
  border: 1px solid var(--boh-border);
  text-align: left;
}

/* --------------------------------------------------------------------------
   Favourites loading states and 404
   -------------------------------------------------------------------------- */

.favourites-grid[aria-busy="true"],
.favorites-grid[aria-busy="true"],
[data-favourites-grid][aria-busy="true"] {
  min-height: 18rem;
  opacity: 0.68;
}

.favourites-status {
  margin-bottom: 1rem;
  color: var(--boh-muted);
  text-align: center;
}

[hidden] {
  display: none !important;
}

.favourites-grid[aria-busy="true"]::before,
.favorites-grid[aria-busy="true"]::before,
[data-favourites-grid][aria-busy="true"]::before {
  grid-column: 1 / -1;
  width: 2.4rem;
  height: 2.4rem;
  margin: 4rem auto;
  border: 3px solid var(--boh-surface-3);
  border-top-color: var(--boh-accent-soft);
  border-radius: 50%;
  content: "";
  animation: boh-spin 700ms linear infinite;
}

.error-404,
.not-found-page {
  text-align: center;
}

.error-404 .page-header,
.not-found-page .page-header {
  display: block;
  padding-block: clamp(2rem, 8vw, 5rem);
}

.error-code {
  display: block;
  color: var(--boh-accent-soft);
  font-size: clamp(4rem, 16vw, 10rem);
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 0.85;
}

.not-found-hero {
  padding: clamp(2rem, 7vw, 5rem) var(--boh-gutter);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  border: 1px solid var(--boh-border);
  border-radius: var(--boh-radius-lg);
  background: var(--boh-bg-elevated);
}

.not-found-search {
  width: min(100%, 34rem);
  margin: 1.5rem auto 0;
}

@keyframes boh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  flex: 0 0 auto;
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-top: 1px solid var(--boh-border);
  background: #070a11;
  color: var(--boh-muted);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-widgets,
.footer-content {
  display: grid;
  gap: 2rem;
}

.footer-title {
  color: var(--boh-text);
  font-size: 1rem;
}

.footer-menu,
.footer-categories ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-brand p,
.site-info p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--boh-muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-info,
.copyright {
  padding-top: 1.25rem;
  margin: 0;
  border-top: 1px solid var(--boh-border);
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Responsive layout: 2 columns on phones through 7 on wide desktops
   -------------------------------------------------------------------------- */

@media (min-width: 34rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-content-grid,
  .game-details-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.7fr);
  }

  .footer-widgets,
  .footer-content,
  .footer-grid {
    grid-template-columns: minmax(14rem, 1.2fr) repeat(2, minmax(10rem, 1fr));
  }
}

@media (min-width: 64rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .player-layout.has-player-ad,
  .player-layout:has(.player-ad),
  .player-layout:has(.ad-placement--player),
  .player-layout:has(.ad-slot--player) {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  }

  .ad-slot--player {
    width: 100%;
    min-height: min(37.5rem, calc(100svh - var(--boh-header-offset) - 2rem));
  }
}

@media (min-width: 82rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 100rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 47.99rem) {
  :root {
    --boh-header-offset: 13rem;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-search,
  .header-search,
  .header-inner > .search-form {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-description,
  .favourites-link span,
  .favorites-link span,
  .header-favourites__label {
    display: none;
  }

  .favourites-link,
  .favorites-link,
  .header-favourites {
    width: 2.65rem;
    padding-inline: 0;
    justify-content: center;
  }

  .player-shell > .fullscreen-button,
  .game-player > .fullscreen-button,
  [data-player] > [data-fullscreen] {
    width: 2.75rem;
    padding: 0;
  }

  [data-fullscreen-label] {
    display: none;
  }

  .favourites-link::before,
  .favorites-link::before {
    content: "\2665";
    font-size: 1.1rem;
  }

  .archive-header,
  .page-header,
  .game-header,
  .game-meta-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .archive-header .archive-count,
  .archive-header .archive-description {
    grid-column: 1;
    grid-row: auto;
  }

  .section-header {
    align-items: center;
  }

}

@media (max-width: 23rem) {
  .game-grid,
  .games-grid,
  .posts-grid {
    gap: 0.55rem;
  }

  .game-card__body,
  .game-card-content {
    padding-inline: 0.55rem;
  }
}

/* --------------------------------------------------------------------------
   Motion, forced-colour, and print preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .game-card__link,
  .game-card > a:first-child,
  .player-shell,
  .game-player,
  [data-player],
  .button,
  .category-chip,
  .category-chips a {
    border: 1px solid CanvasText;
  }

  .player-placeholder::after,
  [data-player-placeholder]::after {
    display: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ad-wrap,
  .ad-slot,
  .advertisement,
  .player-controls,
  .game-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}

/* Home intro (SEO: real H1 + descriptive copy above the grids) */
.home-intro {
  max-width: 52rem;
  margin: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}

.home-intro__title {
  margin-bottom: 0.4rem;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
}

.home-intro__text {
  margin: 0;
  color: var(--boh-muted);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.55;
}

/* Brand logo (Asupergame, 2026-10-02) */
.brand-logo {
  display: inline-flex;
  align-items: center;
  border-radius: var(--boh-radius-sm);
}

.brand-logo img {
  display: block;
  width: auto;
  height: clamp(2rem, 4.2vw, 2.6rem);
  max-width: min(14rem, 46vw);
}
