/* ==========================================================================
   2000sGaming — Games page: game grid (Aero style)
   Logo + menu bar, genre list, search, tiles, page numbers.
   ========================================================================== */

@font-face { font-family: "Nunito"; src: url("../fonts/nunito-var.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root { --navy: #142c57; --ink: #1d3a6b; --muted: #4f6c94; --line: #d6e6f8; --blue-1: #6fb8ff; --blue-2: #1f7ef0; --blue-3: #0b56d0; --font: "Nunito", "Trebuchet MS", system-ui, sans-serif; --ease: cubic-bezier(.2, .8, .2, 1); }
body.gh-page { margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased;
	background: radial-gradient(60% 40% at 15% 0%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), radial-gradient(50% 40% at 90% 10%, rgba(214,236,255,.9), rgba(214,236,255,0) 70%), linear-gradient(180deg, #f4f9ff 0%, #e6f1fd 55%, #d9eafc 100%); background-attachment: fixed; }
body.gh-page *, body.gh-page *::before, body.gh-page *::after { box-sizing: border-box; }
:where(.gh-page) img, :where(.gh-page) svg { display: block; max-width: 100%; }
:where(.gh-page) a { color: inherit; text-decoration: none; }
:where(.gh-page) button, :where(.gh-page) input, :where(.gh-page) select { font: inherit; color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); white-space: nowrap; }
.gh-page :focus { outline: none; }
.gh-page :focus-visible { outline: 3px solid #ffb800; outline-offset: 3px; }
.sg-skip { position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--blue-2); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-weight: 800; }
.sg-skip:focus { top: 1rem; }
.xp-i { width: 1em; height: 1em; flex-shrink: 0; }

.gh { position: relative; min-height: 100vh; min-height: 100svh; padding: 14px clamp(12px, 2vw, 32px) 96px; max-width: 1680px; margin: 0 auto; }
.gh-bg { position: fixed; inset: auto 0 0 0; height: 110px; z-index: -1; pointer-events: none; }
.gh-wave { width: 100%; height: 100%; max-width: none; }

/* ---------- Top: logo, menu bar, profile ---------- */
.gh-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 2vw, 32px); }
.gh-logo img { width: clamp(160px, 17vw, 290px); height: auto; filter: drop-shadow(0 3px 5px rgba(20,44,87,.25)); transition: transform 200ms var(--ease); }
.gh-logo:hover img { transform: scale(1.03) rotate(-1deg); }
.gh-nav ul { list-style: none; margin: 0; padding: 5px; display: flex; align-items: stretch; border-radius: 999px;
	background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 50%, #e3effc 100%); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #c9dcf3, 0 6px 16px rgba(30,80,150,.15); }
.gh-nav li { flex: 1; display: flex; }
.gh-nav li + li { border-left: 1px solid #d3e2f4; }
.gh-nav li:has(.is-current), .gh-nav li:has(.is-current) + li { border-left-color: transparent; }
.gh-nav__link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 14px; border-radius: 999px;
	font-size: clamp(15px, 1.3vw, 21px); font-weight: 800; color: var(--navy); white-space: nowrap; transition: background 200ms, color 200ms, transform 200ms var(--ease); }
.gh-nav__link .xp-i { font-size: 1.45em; color: var(--navy); }
.gh-nav__link--facebook .xp-i { color: #1877f2; }
.gh-nav__link:hover { background: rgba(31,126,240,.08); }
.gh-nav__link.is-current, .gh-genre.is-current, .gh-pg.is-current {
	color: #fff; background: linear-gradient(180deg, var(--blue-1) 0%, var(--blue-2) 48%, var(--blue-3) 52%, #2a86f5 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -2px 6px rgba(0,40,120,.25), 0 0 0 2px #fff, 0 0 14px 2px rgba(60,160,255,.55); text-shadow: 0 1px 2px rgba(0,30,90,.45); }
.gh-nav__link.is-current .xp-i { color: #fff; filter: drop-shadow(0 1px 1px rgba(0,30,90,.4)); }
.gh-profile { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; font-size: 34px; color: var(--navy);
	background: radial-gradient(circle at 40% 28%, #fff, #eef5ff 55%, #d4e5f8); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #c9dcf3, 0 6px 14px rgba(30,80,150,.2); transition: transform 200ms var(--ease); }
.gh-profile:hover { transform: scale(1.06); }

/* ---------- Body: genre list + main ---------- */
.gh-body { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: clamp(16px, 2vw, 32px); margin-top: 22px; align-items: start; }
.gh-side { position: sticky; top: 16px; padding: 12px; border-radius: 26px; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(240,247,255,.92)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #cfe0f4, 0 10px 26px rgba(30,80,150,.14); }
.gh-genres { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 210px); overflow-y: auto; scrollbar-width: thin; }
.gh-genres li + li { border-top: 1px solid var(--line); }
.gh-genres li:first-child { margin-bottom: 8px; border: 0; }
.gh-genres li:first-child + li { border-top: 0; }
.gh-genre { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 16px; border-radius: 16px; font-size: 19px; font-weight: 700; color: var(--navy); transition: background 200ms, transform 200ms var(--ease); }
.gh-genre__icon { width: 30px; height: 30px; flex-shrink: 0; color: #1c3560; }
.gh-genre__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-genre__count { margin-left: auto; color: var(--muted); font-weight: 700; }
.gh-genre:hover:not(.is-current) { background: rgba(31,126,240,.08); transform: translateX(3px); }
.gh-genre.is-current { border-radius: 18px; min-height: 58px; }
.gh-genre.is-current .gh-genre__icon, .gh-genre.is-current .gh-genre__count { color: #fff; }

.gh-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.gh-title { display: flex; align-items: center; gap: 14px; margin: 0; font-size: clamp(28px, 2.6vw, 44px); font-weight: 900; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.gh-title__icon { font-size: 1.7em; color: var(--blue-2); filter: drop-shadow(0 3px 4px rgba(20,80,180,.3)); }
.gh-title__count { font-weight: 700; color: #3f6e80; }
.gh-search { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 1 470px; min-width: 260px; min-height: 54px; padding: 4px 6px 4px 54px; border-radius: 999px;
	background: linear-gradient(180deg, #fff, #f3f8ff); box-shadow: inset 0 2px 4px rgba(30,80,150,.1), 0 0 0 1.5px #c3d8f1, 0 4px 10px rgba(30,80,150,.08); }
.gh-search:focus-within { box-shadow: inset 0 2px 4px rgba(30,80,150,.1), 0 0 0 2.5px var(--blue-2), 0 0 14px rgba(60,160,255,.35); }
.gh-search__icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--navy); }
.gh-search input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font-size: 19px; font-weight: 600; color: var(--navy); }
.gh-search input::placeholder { color: #6a82a3; }
.gh-search input:focus-visible { outline: none; }
.gh-search select { height: 40px; padding: 0 30px 0 14px; border: 0; border-radius: 999px; font-size: 15px; font-weight: 800; color: var(--navy); cursor: pointer; -webkit-appearance: none; appearance: none;
	background: #e7f1fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23142c57' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 14px no-repeat; }
.gh-search button { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; font-weight: 800; color: #fff; background: var(--blue-2); cursor: pointer; }

/* ---------- Tiles ---------- */
.gh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.3vw, 22px); }
.gh-cell[hidden] { display: none; }
.gh-tile { --h: 210; position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 22px; padding: 4px; isolation: isolate;
	background: linear-gradient(180deg, hsl(var(--h) 90% 82%), hsl(var(--h) 75% 48%) 50%, hsl(var(--h) 80% 30%));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1.5px hsl(var(--h) 60% 30% / .55), 0 6px 14px rgba(20,50,110,.25);
	transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); -webkit-tap-highlight-color: transparent; }
.gh-tile__art { position: absolute; inset: 4px; overflow: hidden; border-radius: 18px; background: #12233f; }
.gh-tile__art img, .gh-tile__art .sg-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; border-radius: 0; }
.gh-tile__art::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
	background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.08) 38%, rgba(255,255,255,0) 40%), linear-gradient(0deg, rgba(0,0,0,.28), rgba(0,0,0,0) 40%);
	box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), inset 0 -10px 18px rgba(0,0,0,.2); }
.gh-tile__name { position: absolute; left: 8%; right: 8%; bottom: 9%; z-index: 2; text-align: center; font-size: clamp(14px, 1.35vw, 24px); font-weight: 950; font-style: italic; line-height: 1; letter-spacing: -.02em; color: #fff;
	-webkit-text-stroke: 1px rgba(10,20,50,.6); text-shadow: 0 2px 0 rgba(10,20,50,.85), 0 4px 10px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-tile__badge { position: absolute; top: 9px; left: 9px; z-index: 2; padding: .15em .6em; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff;
	background: rgba(15,30,60,.62); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.gh-tile__art .sg-cover { padding: 16% 7% 8%; }
.gh-tile__art .sg-cover__title { font-size: clamp(11px, min(13.5cqi, 24cqh), 36px); }
.gh-tile__art .sg-cover.is-mid .sg-cover__title { font-size: clamp(10px, min(11cqi, 20cqh), 30px); }
.gh-tile__art .sg-cover.is-long .sg-cover__title { font-size: clamp(9px, min(9cqi, 16cqh), 26px); }
.gh-tile__badge.is-play { background: linear-gradient(180deg, #8de05a, #3d9e12); }
.gh-tile:hover, .gh-tile:focus-visible { transform: translateY(-4px) scale(1.03); outline: none;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 3px #ffd84a, 0 0 18px 5px rgba(255,200,40,.75), 0 12px 20px rgba(20,50,110,.3); }
.gh-tile:active { transform: translateY(-1px) scale(.99); }

.gh-tile.is-art { padding: 0; background: none; box-shadow: none; }
.gh-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; filter: drop-shadow(0 6px 8px rgba(20,50,110,.28)); transition: filter 220ms; }
.gh-tile.is-art:hover, .gh-tile.is-art:focus-visible { box-shadow: none; }
.gh-tile.is-art:hover .gh-tile__img, .gh-tile.is-art:focus-visible .gh-tile__img { filter: drop-shadow(0 0 3px #ffd84a) drop-shadow(0 0 12px rgba(255,200,40,.85)) drop-shadow(0 10px 12px rgba(20,50,110,.3)); }
.gh-tile.is-art .gh-tile__badge { top: 7%; left: 5%; }

.gh-empty { margin: 30px 0; padding: 24px; text-align: center; font-size: 19px; font-weight: 700; border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1px #cfe0f4; }
.gh-empty a { color: var(--blue-2); text-decoration: underline; }

/* ---------- Page numbers ---------- */
.gh-pages { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.gh-pages:empty { display: none; }
.gh-pg { display: grid; place-items: center; min-width: 54px; height: 46px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer; font-size: 20px; font-weight: 800; color: var(--navy);
	background: linear-gradient(180deg, #fff, #eaf3fe); box-shadow: inset 0 1px 0 #fff, 0 0 0 1.5px #c3d8f1, 0 3px 8px rgba(30,80,150,.12); transition: transform 200ms var(--ease); }
.gh-pg:hover:not(:disabled):not(.is-current) { transform: translateY(-2px); }
.gh-pg--arrow { min-width: 78px; color: var(--blue-2); }
.gh-pg--arrow svg { width: 26px; height: 26px; }
.gh-pg:disabled { opacity: .45; cursor: default; }
.gh-page-dots { padding: 0 4px; font-size: 22px; font-weight: 900; color: var(--navy); }
html:not(.gh-js) .gh-pages { display: none; }

/* Wide screens: closer to the reference proportions */
@media (min-width: 1280px) {
	.gh-logo img { width: clamp(240px, 19vw, 340px); }
	.gh-nav__link { min-height: clamp(64px, 5.4vw, 96px); font-size: clamp(18px, 1.5vw, 27px); }
	.gh-nav__link .xp-i { font-size: 1.5em; }
	.gh-profile { width: clamp(64px, 5.4vw, 92px); height: clamp(64px, 5.4vw, 92px); font-size: clamp(30px, 2.5vw, 44px); }
	.gh-body { grid-template-columns: minmax(260px, 21vw) minmax(0, 1fr); }
	.gh-genre { min-height: clamp(52px, 3.6vw, 64px); font-size: clamp(18px, 1.5vw, 26px); gap: 16px; }
	.gh-genre__icon { width: clamp(28px, 2.1vw, 38px); height: clamp(28px, 2.1vw, 38px); }
	.gh-genre.is-current { min-height: clamp(58px, 4vw, 70px); }
	.gh-title { font-size: clamp(36px, 2.9vw, 50px); }
	.gh-search { min-height: clamp(54px, 3.8vw, 64px); }
	.gh-search input { font-size: clamp(18px, 1.4vw, 24px); }
	.gh-genres { max-height: none; }
	.gh { padding-top: 10px; padding-bottom: 64px; }
	.gh-body { margin-top: 12px; }
	.gh-head { margin-bottom: 12px; }
	.gh-grid { gap: clamp(10px, 1vw, 18px); }
	.gh-pages { margin-top: 14px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1279px) {
	.gh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.gh-genre { font-size: 17px; min-height: 46px; }
}
@media (max-width: 1080px) {
	.gh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gh-body { grid-template-columns: 240px minmax(0, 1fr); }
	.gh-nav__link span { font-size: 15px; }
}

/* ---------- Phone ---------- */
@media (max-width: 899px) {
	.gh { padding: 10px 10px 80px; }
	.gh-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo profile" "nav nav"; gap: 10px; }
	.gh-logo { grid-area: logo; } .gh-logo img { width: 160px; }
	.gh-profile { grid-area: profile; width: 48px; height: 48px; font-size: 24px; }
	.gh-nav { grid-area: nav; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 4px 10px 6px; }
	.gh-nav::-webkit-scrollbar { display: none; }
	.gh-nav ul { width: max-content; min-width: 100%; }
	.gh-nav__link { min-height: 52px; padding: 4px 14px; font-size: 14px; }
	.gh-body { display: block; margin-top: 12px; }
	.gh-side { position: static; padding: 6px; border-radius: 999px; margin: 0 -2px 14px; overflow-x: auto; scrollbar-width: none; }
	.gh-side::-webkit-scrollbar { display: none; }
	.gh-genres { display: flex; gap: 4px; max-height: none; overflow: visible; width: max-content; }
	.gh-genres li, .gh-genres li + li, .gh-genres li:first-child { border: 0; margin: 0; }
	.gh-genre { min-height: 42px; padding: 6px 14px; gap: 8px; font-size: 15px; border-radius: 999px; white-space: nowrap; }
	.gh-genre.is-current { min-height: 42px; border-radius: 999px; }
	.gh-genre__icon { width: 20px; height: 20px; }
	.gh-genre__count { margin-left: 2px; }
	.gh-genre:hover:not(.is-current) { transform: none; }
	.gh-head { margin-bottom: 12px; gap: 10px; }
	.gh-title { font-size: 26px; gap: 10px; }
	.gh-search { flex: 1 1 100%; min-width: 0; min-height: 48px; padding-left: 46px; }
	.gh-search__icon { left: 16px; font-size: 20px; }
	.gh-search input { font-size: 16px; height: 40px; }
	.gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.gh-tile { border-radius: 18px; padding: 3px; }
	.gh-tile__art { inset: 3px; border-radius: 15px; }
	.gh-tile__name { font-size: 15px; }
	.gh-tile__badge { top: 7px; left: 7px; font-size: 10px; }
	.gh-pg { min-width: 42px; height: 42px; font-size: 17px; padding: 0 10px; }
	.gh-pg--arrow { min-width: 54px; }
	.gh-bg { height: 70px; }
}

@media (min-width: 600px) and (max-width: 899px) { .gh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.gh-page *, .gh-page *::before, .gh-page *::after { animation: none !important; transition-duration: .01ms !important; }
	.gh-tile:hover, .gh-tile:focus-visible { transform: none; }
}

/* Shared cover art (titles on tokens until licensed artwork is added) */
.sg-cover { --h: 210; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35em; width: 100%; height: 100%; overflow: hidden; text-align: center; color: #fff; container-type: size;
	background: radial-gradient(90% 70% at 22% 8%, hsl(var(--h) 95% 78% / .85), transparent 62%), radial-gradient(70% 60% at 100% 110%, hsl(calc(var(--h) + 35) 80% 30% / .9), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 5px, transparent 5px 13px), linear-gradient(165deg, hsl(var(--h) 68% 52%), hsl(calc(var(--h) + 28) 62% 24%)); }
.sg-cover__icon { position: absolute; right: -10%; bottom: -18%; width: 66%; height: auto; aspect-ratio: 1; max-width: none; color: #fff; opacity: .2; transform: rotate(-14deg); }
.sg-cover__title { position: relative; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; font-size: clamp(9px, min(14cqi, 26cqh), 40px); font-weight: 950; font-style: italic; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; overflow-wrap: break-word;
	text-shadow: 0 2px 0 hsl(calc(var(--h) + 28) 70% 18% / .9), 0 4px 10px rgba(0,0,0,.45); }
.sg-cover.is-mid .sg-cover__title { font-size: clamp(8px, min(11cqi, 20cqh), 34px); }
.sg-cover.is-long .sg-cover__title { font-size: clamp(7px, min(8.6cqi, 16cqh), 28px); line-height: 1.04; }
.sg-cover__sub { position: relative; padding: .25em .7em; border-radius: 999px; font-size: clamp(7px, min(5.4cqi, 9cqh), 13px); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.24); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Wii hand cursor (desktop mouse only) ---------- */
@media (hover: hover) and (pointer: fine) {
	body.gh-page, body.gh-page a, body.gh-page button, body.gh-page select, body.gh-page label, body.gh-page [role="button"] {
		cursor: url("../img/wii-cursor.png") 8 0, auto;
		cursor: -webkit-image-set(url("../img/wii-cursor.png") 1x, url("../img/wii-cursor@2x.png") 2x) 8 0, auto;
		cursor: image-set(url("../img/wii-cursor.png") 1x, url("../img/wii-cursor@2x.png") 2x) 8 0, auto;
	}
	body.gh-page input[type="search"], body.gh-page input[type="text"], body.gh-page textarea { cursor: text; }
	body.gh-page button:disabled { cursor: url("../img/wii-cursor.png") 8 0, not-allowed; }
}
