/* ==========================================================================
   2000sGaming: Xbox 360-style game-case carousel (Games page, default view).
   Clean stage: dark menu bar, search top-right, big looping carousel,
   controller hints bottom-left, position dots bottom-right.
   ========================================================================== */
.gh-page #gh-grid, .gh-page #gh-pages { display: none; }

/* ---------- Decluttered page in carousel view ---------- */
.gh-page .gh-side, .gh-page .gh-title, .gh-page .gh-empty { display: none; }
.gh-page .gh-body { display: block; margin-top: 8px; }
.gh-page .gh-head { justify-content: flex-end; gap: 10px; margin-bottom: 0; }
.gh-page .gh-search { flex: 0 1 380px; min-width: 0; min-height: 42px; padding-left: 44px; background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.gh-page .gh-search input { color: #fff; }
.gh-page .gh-search input::placeholder { color: rgba(255,255,255,.7); }
.gh-page .gh-search .gh-search__icon { color: #fff; }
.gh-page .gh-search select, .gh-page .gh-search .gh-sort { display: none; }
/* dark, slim menu bar like the console dashboard */
.gh-page .gh-top { margin: -1px calc(50% - 50vw) 0; padding: 6px max(16px, calc(50vw - 50% + 16px)); background: linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.62));
	box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--stg-c, #7dff2a) 45%, transparent); }
.gh-page .gh-logo img { width: clamp(150px, 13vw, 230px); }
.gh-page .gh-nav ul { background: transparent; box-shadow: none; padding: 0; }
.gh-page .gh-nav li + li { border-left-color: transparent; }
.gh-page .gh-nav__link { color: #fff; background: transparent; min-height: 40px; }
.gh-page .gh-nav__link .xp-i { color: #fff; }
.gh-page .gh-nav__link:hover { background: rgba(255,255,255,.1); }
.gh-page .gh-nav__link.is-current { background: rgba(255,255,255,.12); box-shadow: none; color: #fff; text-shadow: none; }
.gh-page .gh-nav__link--grid { box-shadow: inset 0 0 0 2px var(--stg-c, #7dff2a), 0 0 14px color-mix(in srgb, var(--stg-c, #7dff2a) 60%, transparent) !important; }
.gh-page .gh-profile { width: 42px; height: 42px; color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }

.cf { --cf-ring: var(--stg-c, #7dff2a); position: relative; margin-top: 4px; color: #fff; }
.cf[hidden] { display: none; }
.cf__now { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Stage ---------- */
.cf__stage { position: relative; height: clamp(420px, 62vh, 640px); margin: 0 calc(50% - 50vw); perspective: 1500px; perspective-origin: 50% 45%; overflow-x: hidden; overflow-x: clip; }
.cf__track { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; transform-style: preserve-3d; touch-action: pan-y; outline: none; user-select: none; -webkit-user-select: none;
	transform: rotateX(var(--lean-x, 0deg)) rotateY(var(--lean-y, 0deg)); transition: transform 600ms cubic-bezier(.22,.8,.24,1); }
.cf__item { --w: clamp(230px, 21vw, 360px); position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: .72; margin: calc(var(--w) / -.72 / 2) 0 0 calc(var(--w) / -2);
	transform-style: preserve-3d; transition: transform 620ms cubic-bezier(.22,.8,.24,1), opacity 420ms ease; cursor: pointer; will-change: transform; -webkit-tap-highlight-color: transparent; }
.cf__face { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; background: #15191c;
	transform: translateZ(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--grow, 1));
	transition: transform 260ms cubic-bezier(.2,.8,.3,1), box-shadow 320ms ease, filter 320ms ease; filter: brightness(.86);
	box-shadow: 0 0 0 2.5px var(--cf-ring), 0 0 14px color-mix(in srgb, var(--cf-ring) 55%, transparent); }
.cf__item.is-current .cf__face { filter: none; box-shadow: 0 0 0 4px var(--cf-ring), 0 0 0 6px rgba(255,255,255,.45), 0 0 46px 12px color-mix(in srgb, var(--cf-ring) 60%, transparent); }
.cf__item.is-hover .cf__face { --lift: 30px; --grow: 1.04; filter: brightness(1.06); transition: transform 120ms linear, box-shadow 320ms ease, filter 320ms ease; }
.cf__glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 260ms;
	background: radial-gradient(circle at var(--gx, 50%) var(--gy, 20%), rgba(255,255,255,.35), rgba(255,255,255,0) 45%); }
.cf__item.is-hover .cf__glare { opacity: 1; }
.cf__face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 32%); }
/* soft shadow under each case (no reflections) */
.cf__shadow { position: absolute; left: 6%; right: 6%; top: 100%; height: 14%; margin-top: 4%; border-radius: 50%; pointer-events: none;
	background: radial-gradient(closest-side, rgba(0,0,0,.75), rgba(0,0,0,0)); filter: blur(6px); transform: translateZ(-1px); transition: transform 260ms, opacity 260ms; }
.cf__item.is-hover .cf__shadow { transform: scale(.9) translateY(10%); opacity: .7; }

/* ---------- Case ---------- */
.cf__case { position: absolute; inset: 0; display: grid; grid-template-rows: 18% 1fr; }
.cf__case-top { display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; padding: 0 5%; background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 60%, #dfe3e7 100%); border-bottom: 3px solid var(--cf-ring);
	box-shadow: inset 0 -6px 10px rgba(0,0,0,.06); }
.cf__case-top img { display: block; width: 92%; height: auto; max-height: 86%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.cf__case-body { position: relative; overflow: hidden; background: #2a2e33; }
.cf__case-blur { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(16px) brightness(.62) saturate(1.25); }
.cf__case-art { position: absolute; left: 3%; top: 50%; width: 94%; height: auto; max-width: none; transform: translateY(-50%); filter: drop-shadow(0 8px 12px rgba(0,0,0,.55)); }
.cf__case-body.is-placeholder { display: grid; place-items: center; align-content: center; gap: 6%; background: linear-gradient(180deg, #3a3f45, #24282c); }
.cf__ph { width: 50%; color: #8d939a; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.cf__case-name { max-width: 86%; text-align: center; font-size: clamp(12px, 1.1vw, 17px); font-weight: 900; color: #eceef0; line-height: 1.15; text-transform: uppercase; }
.cf__item.is-fav .cf__case-top::after { content: "★"; position: absolute; right: 6%; top: 1.5%; color: #ffc400; font-size: clamp(14px, 1.2vw, 20px); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cf__case-top { position: relative; }

/* arrows at the screen edges */
.cf__arrow { position: absolute; top: 50%; z-index: 300; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
	background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); transition: background 160ms, transform 160ms; }
.cf__arrow svg { width: 24px; height: 24px; }
.cf__arrow:hover, .cf__arrow:focus-visible { background: rgba(0,0,0,.7); transform: scale(1.08); }
.cf__arrow--prev { left: max(12px, calc(50vw - 50% - 4px)); } .cf__arrow--next { right: max(12px, calc(50vw - 50% - 4px)); }
.cf__stage .cf__arrow--prev { left: 18px; } .cf__stage .cf__arrow--next { right: 18px; }
.cf.is-empty .cf__arrow { display: none; }

/* ---------- Bottom bar: controller hints + position dots ---------- */
.cf__hints { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 6px; padding: 6px 2px; font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cf__hint { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; border-radius: 8px; }
.cf__hint:hover { text-decoration: underline; }
.cf__dots { display: flex; gap: 6px; margin-left: auto; }
.cf__dots i { width: 30px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); transition: background 300ms, box-shadow 300ms; }
.cf__dots i.is-on { background: var(--cf-ring); box-shadow: 0 0 8px var(--cf-ring); }

/* Grid View toggle next to search */
.gh-view { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-weight: 800; font-size: 14px; color: #1d2c66; cursor: pointer;
	background: rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff, 0 0 0 1.5px rgba(80,110,200,.35); }
.gh-page .gh-view { color: #fff; background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.gh-view[hidden] { display: none; }
.gh-view__icon { font-size: 16px; }

/* ---------- Phones ---------- */
@media (max-width: 599px) {
	.cf__stage { height: 112vw; max-height: 560px; }
	.cf__item { --w: 54vw; }
	.cf__arrow { width: 40px; height: 40px; margin-top: -20px; }
	.cf__stage .cf__arrow--prev { left: 6px; } .cf__stage .cf__arrow--next { right: 6px; }
	.cf__hints { font-size: 13.5px; gap: 8px 14px; justify-content: center; }
	.cf__dots { margin: 4px auto 0; width: 100%; justify-content: center; }
	.gh-page .gh-head { flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .cf__item, .cf__face, .cf__track { transition: none; } }
@media (max-width: 599px) { .gh-view__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .gh-view { padding: 0 12px; } }
/* plain clickable links (no controller badges) */
.cf__hint { padding: 7px 16px; border-radius: 999px; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); font-size: 15px; transition: background 160ms, box-shadow 160ms; }
.cf__hint:hover, .cf__hint:focus-visible { text-decoration: none; background: rgba(0,0,0,.6); box-shadow: inset 0 0 0 1.5px var(--cf-ring), 0 0 12px color-mix(in srgb, var(--cf-ring) 50%, transparent); }
#cf-play { color: #0d1f00; text-shadow: none; background: var(--cf-ring); box-shadow: 0 0 14px color-mix(in srgb, var(--cf-ring) 60%, transparent); }

/* ==========================================================================
   Crisp game cases: cover art fills the whole case under the logo strip
   (stretched if needed), bright bevelled rim with a glow on every case.
   ========================================================================== */
.cf__face { border-radius: 9px; background: var(--cf-ring); filter: none;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 0 0 1px color-mix(in srgb, var(--cf-ring) 70%, #000), 0 0 12px 1px color-mix(in srgb, var(--cf-ring) 70%, transparent), 0 0 26px color-mix(in srgb, var(--cf-ring) 35%, transparent); }
.cf__item:not(.is-current) .cf__face { filter: brightness(.88); }
.cf__item.is-current .cf__face { box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 0 0 1.5px color-mix(in srgb, var(--cf-ring) 70%, #000), 0 0 18px 3px color-mix(in srgb, var(--cf-ring) 85%, transparent), 0 0 54px 10px color-mix(in srgb, var(--cf-ring) 45%, transparent); }
/* the rim: a bright lime frame with a lighter bevel line inside */
.cf__case { inset: 6px; border-radius: 4px; overflow: hidden; grid-template-rows: 15% 1fr; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 0 2.5px color-mix(in srgb, var(--cf-ring) 55%, #fff); }
.cf__item.is-current .cf__case { inset: 7px; }
.cf__face::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
	background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,0) 18%, rgba(0,0,0,0) 80%, rgba(0,0,0,.25)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 6px; }
.cf__case-top { padding: 0 6%; border-bottom: 0; background: linear-gradient(180deg, #ffffff 0%, #f4f6f7 55%, #dde1e4 100%); box-shadow: inset 0 -1px 0 rgba(0,0,0,.18); }
.cf__case-top img { width: 86%; max-height: 82%; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.3)); }
.cf__case-body { background: #111; }
.cf__case-art { position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; max-width: none; transform: none; object-fit: fill; filter: none; image-rendering: auto; }
.cf__case-blur { display: none; }
.cf__face::after { z-index: 1; background: linear-gradient(120deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 28%); }
/* the current tile images have a rounded frame baked in; zoom past it so the art fills edge to edge */
.cf__case-art.is-tile { transform: scale(1.13); }
/* the 3D cases sit behind the track's own plane, so let pointer events pass through to them */
.cf__track { pointer-events: none; }
.cf__item { pointer-events: auto; }
/* placeholder case: controller + title, crisp and readable */
.cf__case-body.is-placeholder { gap: 8%; background: radial-gradient(120% 80% at 50% 30%, #4a5057 0%, #2b3035 60%, #1d2125 100%); }
.cf__ph { width: 54%; color: #9aa1a8; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.cf__item.is-current .cf__ph { color: #b9c0c7; }
.cf__case-name { font-size: clamp(12px, 1.15vw, 18px); color: #f3f5f6; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.5); padding: 0 4%; }

/* fluid motion is driven per frame by JS: no CSS transition fighting it */
.cf__item { transition: none; }
/* info box under the hovered case */
.cf__tip { position: absolute; left: 0; top: 0; z-index: 2000; width: min(340px, 86vw); padding: 12px 14px 12px; border-radius: 14px; pointer-events: none; color: #fff; text-align: left;
	background: rgba(8,14,10,.92); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cf-ring) 70%, transparent), 0 0 18px color-mix(in srgb, var(--cf-ring) 35%, transparent), 0 14px 30px rgba(0,0,0,.5);
	opacity: 0; transition: opacity 180ms ease; will-change: transform, opacity; display: grid; gap: 4px; }
.cf__tip.is-on { opacity: 1; }
.cf__tip[hidden] { display: none; }
.cf__tip::before { content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: rgba(8,14,10,.92); box-shadow: -1.5px -1.5px 0 color-mix(in srgb, var(--cf-ring) 70%, transparent); }
.cf__tip-title { font-size: 18px; font-weight: 900; line-height: 1.15; }
.cf__tip-tags { font-size: 12.5px; font-weight: 800; color: var(--cf-ring); text-transform: uppercase; letter-spacing: .04em; }
.cf__tip-tags:empty, .cf__tip-status:empty, .cf__tip-desc:empty { display: none; }
.cf__tip-desc { font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.85); }
.cf__tip-status { justify-self: start; margin-top: 2px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 900; color: #0d1f00; background: var(--cf-ring); }
.cf__stage { overflow-y: visible; }
/* phones: the info box sits in the page flow under the carousel */
.cf__tip.is-inline { position: relative; width: auto; margin: 0 4px 8px; transform: none !important; }
.cf__tip.is-inline::before { left: 50%; }

/* carousel-only page: the game list and paging are data, never shown */
.gh-page #gh-grid, .gh-page #gh-pages, .gh-page .gh-side { display: none !important; }
.gh-page .gh-empty { color: #fff; text-align: center; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
