/* ==========================================================================
   GameFolio — Modern Light  (indigo / blue accent, editorial)
   ========================================================================== */

:root {
	--gg-bg:        #f7f8fc;
	--gg-surface:   #ffffff;
	--gg-text:      #0f1222;
	--gg-muted:     #5b6178;
	--gg-border:    #e7e9f2;
	--gg-border-2:  #eef0f6;

	--gg-primary:   #4f46e5;   /* indigo */
	--gg-primary-d: #4338ca;
	--gg-orange:    #6366f1;
	--gg-pink:      #2563eb;
	--gg-green:     #16a34a;   /* success */
	--gg-green-d:   #15803d;

	--gg-grad:      linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
	--gg-grad-soft: linear-gradient(135deg, #eef0fe 0%, #eaf1ff 100%);
	--gg-soft:      #eef0fe;

	--gg-radius:    14px;
	--gg-radius-sm: 10px;
	--gg-shadow:        0 1px 2px rgba(15,18,34,.04), 0 8px 24px rgba(15,18,34,.06);
	--gg-shadow-hover:  0 12px 30px rgba(79,70,229,.12), 0 22px 46px rgba(15,18,34,.08);
	--gg-shadow-accent: 0 8px 20px rgba(79,70,229,.30);

	--gg-container: 1180px;
	--gg-font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--gg-display: 'Sora', var(--gg-font);
}

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

body {
	margin: 0;
	font-family: var(--gg-font);
	color: var(--gg-text);
	background: var(--gg-bg);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
html { overflow-x: hidden; max-width: 100%; }

/* Mobile-safety: nothing should force horizontal scroll. */
img, video, iframe, table, pre { max-width: 100%; }
.entry-content { overflow-wrap: anywhere; }
.entry-content pre { overflow-x: auto; }
.gg-details__table, .gg-downloads__table { table-layout: fixed; }
.gg-details__table th, .gg-details__table td,
.gg-downloads__table th, .gg-downloads__table td { overflow-wrap: anywhere; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gg-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gg-primary-d); }
::selection { background: rgba(79,70,229,.16); }
h1, h2, h3, h4 { font-family: var(--gg-display); letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--gg-container); margin: 0 auto; padding: 0 22px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 14px; z-index: 1000; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255,255,255,.82);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--gg-border);
	transition: box-shadow .2s ease, background .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 26px rgba(26,19,32,.08); background: rgba(255,255,255,.94); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 74px; }
.site-title {
	font-family: var(--gg-display); font-size: 23px; font-weight: 800; letter-spacing: -.03em;
	background: var(--gg-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
	white-space: nowrap;
}
.custom-logo, .gg-logo { max-height: 42px; width: auto; display: block; }
.site-branding { display: flex; align-items: center; }

.main-nav { margin-left: auto; }
.main-nav__menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav__menu a {
	display: block; padding: 9px 15px; border-radius: 11px;
	color: var(--gg-text); font-weight: 600; font-size: 15px; position: relative;
	white-space: nowrap;   /* keep each menu item on one line on desktop */
}
.main-nav__menu a:hover, .main-nav__menu .current-menu-item > a { color: var(--gg-primary); background: #eef0fe; }

/* dropdown sub-menus */
.main-nav__menu li { position: relative; }
.main-nav__menu .menu-item-has-children > a::after { content: "\25BE"; margin-left: 6px; font-size: 11px; opacity: .6; }
.main-nav__menu .sub-menu {
	list-style: none; margin: 0; padding: 8px;
	position: absolute; top: calc(100% + 4px); left: 0; min-width: 210px;
	background: #fff; border: 1px solid var(--gg-border); border-radius: 14px;
	box-shadow: var(--gg-shadow-hover); z-index: 200;
	display: flex; flex-direction: column; gap: 2px;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.main-nav__menu li:hover > .sub-menu,
.main-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav__menu .sub-menu a { font-size: 14.5px; padding: 8px 12px; }
.main-nav__menu .sub-menu .menu-item-has-children > a::after { content: "\203A"; } /* nested */

.site-header__actions { display: flex; align-items: center; gap: 12px; margin-left: 6px; }
.site-header__actions .search-form { width: 230px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; padding: 9px; border-radius: 11px; }
.nav-toggle:hover { background: #eef0fe; }
.nav-toggle span { display: block; height: 2.5px; background: var(--gg-text); margin: 4px 0; border-radius: 3px; transition: .2s; }

/* ---------- Search form ---------- */
.search-form { position: relative; display: flex; }
.search-form__field {
	width: 100%; padding: 11px 44px 11px 16px;
	border: 1.5px solid var(--gg-border); border-radius: 999px;
	background: #fff; font: inherit; font-size: 14px; color: var(--gg-text);
	transition: border-color .15s, box-shadow .15s;
}
.search-form__field::placeholder { color: #a79ea8; }
.search-form__field:focus { outline: none; border-color: var(--gg-primary); box-shadow: 0 0 0 4px rgba(79,70,229,.14); }
.search-form__submit {
	position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
	background: var(--gg-grad); color: #fff; border: 0; border-radius: 999px;
	width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; transition: transform .15s, filter .15s;
}
.search-form__submit:hover { filter: brightness(1.05); transform: translateY(-50%) scale(1.06); }

/* ---------- Layout ---------- */
.site-content { padding: 30px 0 54px; }
.layout--with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.layout__main { min-width: 0; }   /* allow the column to shrink so content never overflows */
.layout__main--wide { max-width: 840px; margin: 0 auto; min-width: 0; }

/* ---------- Hero (Modern Light, left-aligned editorial) ---------- */
.hero { position: relative; margin: 8px 0 6px; padding: 52px 0 20px; text-align: left; }
.hero__inner { position: relative; max-width: 720px; margin: 0; }
.hero__title {
	font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; margin: 0 0 14px;
	line-height: 1.08; letter-spacing: -.03em; color: var(--gg-text);
}
.hero__title span, .hero__title em {
	font-style: normal;
	background: var(--gg-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { font-size: clamp(16px, 2.2vw, 20px); color: var(--gg-muted); margin: 0 0 26px; font-weight: 400; max-width: 560px; }
.hero__search .search-form { max-width: 560px; margin: 0; }
.hero__search .search-form__field { padding: 16px 56px 16px 20px; font-size: 16px; border: 1px solid var(--gg-border); background: var(--gg-surface); box-shadow: var(--gg-shadow); }
.hero__search .search-form__submit { width: 42px; height: 42px; }
/* Popular category chips under the hero search */
.hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.hero__chips-label { color: var(--gg-muted); font-size: 14px; font-weight: 700; }
.hero__chip { background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; color: var(--gg-muted); transition: .15s; }
.hero__chip:hover { border-color: var(--gg-primary); color: var(--gg-primary); background: var(--gg-soft); }

/* ---------- Homepage intro (before grid) ---------- */
.home-intro { margin: 6px 0 30px; padding: 28px 30px; background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); box-shadow: var(--gg-shadow); }
.home-intro__title { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.home-intro__content { color: #3a3340; font-size: 16px; }
.home-intro__content p { margin: 0 0 .8em; }
.home-intro__content p:last-child { margin-bottom: 0; }
.home-intro__content a { color: var(--gg-primary); font-weight: 600; }

/* ---------- Home sections ---------- */
.home-section { padding: 16px 0 36px; }
.home-section--alt { background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); padding: 28px; box-shadow: var(--gg-shadow); margin-bottom: 36px; }
.home-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.home-section__title {
	font-size: 25px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 12px;
}
.home-section__title::before { content: ""; width: 6px; height: 26px; border-radius: 6px; background: var(--gg-grad); }
.home-section__more {
	font-weight: 700; font-size: 14px; color: var(--gg-primary); white-space: nowrap;
	padding: 7px 15px; border-radius: 999px; background: #eef0fe; transition: .15s;
}
.home-section__more:hover { background: var(--gg-primary); color: #fff; }

/* ---------- Card grid ---------- */
.gg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gg-grid--4 { grid-template-columns: repeat(4, 1fr); }

.gg-card {
	background: var(--gg-surface); border: 1px solid var(--gg-border);
	border-radius: var(--gg-radius); overflow: hidden;
	box-shadow: var(--gg-shadow); transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
	display: flex; flex-direction: column;
}
.gg-card { min-width: 0; }
.gg-card__title, .gg-card__meta span, .gg-card__cat { overflow-wrap: anywhere; }
.gg-card:hover { transform: translateY(-6px); box-shadow: var(--gg-shadow-hover); border-color: #c7ccf5; }
.gg-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: #eef0f6; overflow: hidden; }
.gg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gg-card:hover .gg-card__media img { transform: scale(1.07); }
.gg-card__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(26,19,32,.34) 0%, rgba(26,19,32,0) 42%);
	opacity: 0; transition: opacity .22s;
}
.gg-card:hover .gg-card__media::after { opacity: 1; }
.gg-card__placeholder {
	position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center;
	background: var(--gg-grad-soft); color: #4f46e5; font-family: var(--gg-display); font-weight: 700; font-size: 16px;
}
.gg-card__badge {
	position: absolute; top: 11px; right: 11px; z-index: 2;
	background: rgba(255,255,255,.92); color: #1a1320; backdrop-filter: blur(6px);
	font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.gg-card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.gg-card__cat {
	align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
	color: var(--gg-primary); background: #eef0fe; padding: 4px 9px; border-radius: 7px;
}
.gg-card__title { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0; font-family: var(--gg-display); }
.gg-card__title a { color: var(--gg-text); }
.gg-card__title a:hover { color: var(--gg-primary); }
.gg-card__meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.gg-card__meta span { font-size: 12px; font-weight: 600; color: var(--gg-muted); background: #eef0f6; padding: 4px 9px; border-radius: 7px; }

/* ---------- Star rating ---------- */
.gg-stars { --gg-rating: 0; position: relative; display: inline-block; font-size: 14px; line-height: 1; white-space: nowrap; vertical-align: middle; }
.gg-stars::before { content: "★★★★★"; color: #d7dae8; }
.gg-stars__fill { position: absolute; top: 0; left: 0; overflow: hidden; width: calc(var(--gg-rating) / 5 * 100%); }
.gg-stars__fill::before { content: "★★★★★"; color: #ffab00; }

/* ---------- Card stats (downloads + rating) ---------- */
.gg-card__stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--gg-border-2); }
.gg-card__rating { display: inline-flex; align-items: center; gap: 6px; }
.gg-card__rating b { font-size: 13px; font-weight: 700; color: #b9820a; }
.gg-dlstat { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--gg-muted); }
.gg-dlstat__icon { color: var(--gg-primary); }
.gg-dlstat__label { font-weight: 600; }
.js-gg-dlcount { transition: transform .2s ease, color .2s ease; display: inline-block; }
.js-gg-dlcount.gg-bump { transform: scale(1.25); color: var(--gg-green); }

/* ---------- Category cloud ---------- */
.cat-cloud { display: flex; flex-wrap: wrap; gap: 13px; }
.cat-cloud__item {
	display: flex; align-items: center; gap: 9px; padding: 11px 18px;
	background: var(--gg-surface); border: 1.5px solid var(--gg-border); border-radius: 999px;
	box-shadow: var(--gg-shadow); font-weight: 700; color: var(--gg-text); transition: .18s;
}
.cat-cloud__item:hover { border-color: transparent; background: var(--gg-grad); color: #fff; transform: translateY(-3px); box-shadow: var(--gg-shadow-accent); }
.cat-cloud__count { font-size: 12px; color: var(--gg-primary); background: #eef0fe; border-radius: 999px; padding: 2px 9px; transition: .18s; }
.cat-cloud__item:hover .cat-cloud__count { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- Page header / archive ---------- */
.page-header { margin-bottom: 26px; }
.page-title { font-size: 32px; font-weight: 800; margin: 0 0 6px; }
.page-title span { background: var(--gg-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.archive-description { color: var(--gg-muted); font-size: 16px; }

/* ---------- Single ---------- */
.single-game, .single-page {
	background: var(--gg-surface); border: 1px solid var(--gg-border);
	border-radius: var(--gg-radius); padding: 34px; box-shadow: var(--gg-shadow);
}
.single-game__cat {
	display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
	color: #fff; background: var(--gg-grad); padding: 5px 13px; border-radius: 999px; margin-bottom: 14px; box-shadow: var(--gg-shadow-accent);
}
.single-game__title { font-size: clamp(26px, 4.5vw, 38px); font-weight: 800; margin: 0 0 12px; line-height: 1.15; }
.gg-entry-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--gg-muted); font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.gg-entry-meta span { display: inline-flex; align-items: center; }
.single-game__cover { margin: 24px 0; border-radius: var(--gg-radius-sm); overflow: hidden; box-shadow: 0 14px 36px rgba(26,19,32,.14); }
.single-game__cover img, .single-page__cover img { width: 100%; }

/* developer / publisher chips */
.single-game__taxo { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; }
.single-game__taxo-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.single-game__taxo-label { color: var(--gg-muted); font-weight: 700; }
.single-game__taxo-item a {
	font-weight: 600; color: var(--gg-primary); background: #eef0fe;
	padding: 4px 11px; border-radius: 999px; transition: .15s;
}
.single-game__taxo-item a:hover { background: var(--gg-grad); color: #fff; }

/* details */
.gg-details { margin: 26px 0; }
.gg-details__title, .gg-downloads__title, .related__title { font-size: 21px; font-weight: 800; margin: 0 0 16px; display: flex; align-items: center; gap: 11px; }
.gg-details__title::before, .gg-downloads__title::before, .related__title::before { content: ""; width: 6px; height: 22px; border-radius: 6px; background: var(--gg-grad); }
.gg-details__table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--gg-border); border-radius: var(--gg-radius-sm); overflow: hidden; }
.gg-details__table th, .gg-details__table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--gg-border-2); font-size: 15px; }
.gg-details__table tr:last-child th, .gg-details__table tr:last-child td { border-bottom: 0; }
.gg-details__table th { width: 38%; background: #f4f5fb; color: var(--gg-muted); font-weight: 700; }
.gg-details__table td { font-weight: 600; }
.gg-details__table tr:hover td, .gg-details__table tr:hover th { background: #f4f5fb; }

/* content */
.entry-content { font-size: 17px; color: #2a2330; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { font-size: 25px; font-weight: 800; margin: 1.7em 0 .6em; }
.entry-content h3 { font-size: 20px; font-weight: 700; margin: 1.4em 0 .5em; }
.entry-content img { border-radius: var(--gg-radius-sm); margin: 1em 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.entry-content li { margin-bottom: .4em; }
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li { position: relative; padding-left: 1.6em; }
.entry-content ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--gg-grad); }
.entry-content blockquote { border-left: 4px solid var(--gg-primary); margin: 1.3em 0; padding: .6em 1.3em; background: var(--gg-grad-soft); border-radius: 0 12px 12px 0; color: #4a3f50; }
.entry-content a { color: var(--gg-primary); text-decoration: underline; text-underline-offset: 2px; }

/* downloads */
.gg-downloads { margin: 30px 0 8px; padding: 26px; background: var(--gg-grad-soft); border: 1px solid #e7e9f2; border-radius: var(--gg-radius); }
.gg-downloads__buttons { display: flex; flex-wrap: wrap; gap: 13px; }
.gg-downloads__note { font-size: 13px; color: var(--gg-muted); margin: 16px 0 0; }

/* download-box info fields */
.gg-downloads__table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 18px; background: #fff; border: 1px solid #e7e9f2; border-radius: var(--gg-radius-sm); overflow: hidden; }
.gg-downloads__table th, .gg-downloads__table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--gg-border-2); font-size: 15px; }
.gg-downloads__table tr:last-child th, .gg-downloads__table tr:last-child td { border-bottom: 0; }
.gg-downloads__table th { width: 32%; color: var(--gg-muted); font-weight: 700; background: #f7f8fc; }
.gg-downloads__table td { font-weight: 600; }

/* linked detail values */
.gg-details__table td a { color: var(--gg-primary); font-weight: 700; text-decoration: none; }
.gg-details__table td a:hover { text-decoration: underline; }

/* compact [game_rating] box */
.gg-ratingbox { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 18px 22px; margin: 22px 0; background: var(--gg-grad-soft); border: 1px solid #e7e9f2; border-radius: var(--gg-radius); }
.gg-ratingbox__item { display: inline-flex; align-items: center; gap: 9px; }
.gg-ratingbox__val { font-family: var(--gg-display); font-size: 20px; font-weight: 800; color: #b9820a; line-height: 1; }
.gg-ratingbox__val small { font-size: 13px; color: var(--gg-muted); font-weight: 600; }
.gg-ratingbox__dl .js-gg-dlcount { font-family: var(--gg-display); font-size: 20px; font-weight: 800; color: var(--gg-text); }
.gg-ratingbox__btn { margin-left: auto; }
@media (max-width: 520px) { .gg-ratingbox__btn { margin-left: 0; width: 100%; justify-content: center; } }

/* download-section stats */
.gg-downloads__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: 20px; }
.gg-rate { display: inline-flex; align-items: center; gap: 9px; }
.gg-rate__val { font-family: var(--gg-display); font-size: 22px; font-weight: 800; color: #b9820a; line-height: 1; }
.gg-rate__count { font-size: 14px; color: var(--gg-muted); font-weight: 600; }
.gg-dlbig { display: inline-flex; align-items: baseline; }
.gg-dlbig .gg-dlstat { font-size: 16px; }
.gg-dlbig .js-gg-dlcount { font-family: var(--gg-display); font-size: 22px; font-weight: 800; color: var(--gg-text); }
.gg-dlbig .gg-dlstat__icon { width: 18px; height: 18px; }
.gg-dlbig .gg-dlstat__label { font-size: 14px; color: var(--gg-muted); font-weight: 600; }

.gg-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 13px;
	background: var(--gg-grad); color: #fff !important; font-weight: 700; font-size: 15px; font-family: var(--gg-display);
	text-decoration: none !important; transition: transform .15s, box-shadow .15s, filter .15s; border: 0; cursor: pointer;
	box-shadow: var(--gg-shadow-accent);
}
.gg-btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 28px rgba(79,70,229,.42); }
.gg-btn--download { background: var(--gg-grad); box-shadow: var(--gg-shadow-accent); }
.gg-btn--download:hover { box-shadow: 0 12px 28px rgba(79,70,229,.42); }

/* tags */
.single-game__tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.single-game__tags span { color: var(--gg-muted); font-weight: 700; margin-right: 4px; }
.single-game__tags a { font-size: 13px; background: #eef0f6; padding: 5px 12px; border-radius: 999px; color: #4a3f50; font-weight: 600; transition: .15s; }
.single-game__tags a:hover { background: var(--gg-grad); color: #fff; }

/* related */
.related { margin-top: 40px; }

/* ---------- Top Downloads ---------- */
.gg-top { width: 100%; }
.gg-top__banner { position: relative; overflow: hidden; text-align: center; color: #fff; padding: 36px 24px 30px; border-radius: var(--gg-radius); background: var(--gg-grad); box-shadow: 0 18px 44px rgba(79,70,229,.28); margin-bottom: 30px; }
.gg-top__banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 220px at 80% 0%, rgba(255,255,255,.25), transparent 60%); pointer-events: none; }
.gg-top__trophy { position: relative; display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.18); margin-bottom: 12px; }
.gg-top__title { position: relative; font-size: clamp(24px, 4.5vw, 34px); font-weight: 800; margin: 0 0 8px; }
.gg-top__sub { position: relative; opacity: .95; margin: 0 auto 18px; max-width: 560px; font-size: 15px; }
.gg-top__total { position: relative; display: inline-block; background: rgba(255,255,255,.16); backdrop-filter: blur(4px); padding: 9px 20px; border-radius: 999px; font-size: 15px; }
.gg-top__total strong { font-family: var(--gg-display); font-weight: 800; font-size: 18px; }

/* podium */
.gg-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; margin-bottom: 34px; }
.gg-podium__card { position: relative; background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); padding: 16px; box-shadow: var(--gg-shadow); text-align: center; }
.gg-podium__card.is-1 { border-color: #ffd56a; box-shadow: 0 14px 34px rgba(255,171,0,.28); transform: translateY(-14px); }
.gg-podium__medal { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2; font-family: var(--gg-display); font-weight: 800; font-size: 14px; color: #fff; padding: 4px 14px; border-radius: 999px; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.is-1 .gg-podium__medal { background: linear-gradient(120deg,#ffb300,#ff8f00); }
.is-2 .gg-podium__medal { background: linear-gradient(120deg,#b9c2cc,#8fa0ad); }
.is-3 .gg-podium__medal { background: linear-gradient(120deg,#e08a4e,#b5662f); }
.gg-podium__media { display: block; aspect-ratio: 16/10; border-radius: var(--gg-radius-sm); overflow: hidden; background: #eef0f6; margin: 8px 0 12px; }
.gg-podium__media img { width: 100%; height: 100%; object-fit: cover; }
.gg-podium__title { font-family: var(--gg-display); font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; min-height: 2.4em; }
.gg-podium__title a { color: var(--gg-text); }
.gg-podium__title a:hover { color: var(--gg-primary); }
.gg-podium__rate { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.gg-podium__rate b { color: #b9820a; }
.gg-podium__dl { display: flex; justify-content: center; }

/* ranked list */
.gg-rank-list { list-style: none; counter-reset: none; margin: 0; padding: 0; background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); box-shadow: var(--gg-shadow); overflow: hidden; }
.gg-rank-row { display: grid; grid-template-columns: 44px 90px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--gg-border-2); }
.gg-rank-row:last-child { border-bottom: 0; }
.gg-rank-row:hover { background: #f4f5fb; }
.gg-rank-row__num { font-family: var(--gg-display); font-weight: 800; font-size: 18px; color: var(--gg-muted); text-align: center; }
.gg-rank-row__thumb { display: block; width: 90px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; background: #eef0f6; }
.gg-rank-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gg-rank-row__main { min-width: 0; }
.gg-rank-row__title { display: block; font-weight: 700; color: var(--gg-text); overflow-wrap: anywhere; }
.gg-rank-row__title:hover { color: var(--gg-primary); }
.gg-rank-row__rate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 3px; }
.gg-rank-row__rate b { color: #b9820a; }
.gg-rank-row__dl { font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) {
	.gg-podium { grid-template-columns: 1fr; gap: 26px; }
	.gg-podium__card.is-1 { transform: none; order: -1; }
	.gg-rank-row { grid-template-columns: 32px 64px 1fr; row-gap: 4px; }
	.gg-rank-row__thumb { width: 64px; }
	.gg-rank-row__dl { grid-column: 2 / -1; justify-self: start; }
}

/* ---------- Full ROMs List (A–Z) ---------- */
.gg-romlist { width: 100%; }
.gg-romlist__head { text-align: center; }
.gg-romlist__head .page-title { font-size: clamp(28px, 5vw, 42px); }
.gg-romlist__intro { color: var(--gg-muted); font-size: 17px; max-width: 680px; margin: 4px auto 0; }
.gg-romlist__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 36px; }
.gg-romlist__nav a, .gg-romlist__nav span {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px;
	border-radius: 11px; font-weight: 800; font-family: var(--gg-display); font-size: 15px;
	background: var(--gg-surface); border: 1.5px solid var(--gg-border); color: var(--gg-text); transition: .15s;
}
.gg-romlist__nav a:hover { background: var(--gg-grad); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: var(--gg-shadow-accent); }
.gg-romlist__nav span.is-empty { color: #cdc4cc; background: transparent; cursor: default; }
.gg-romlist__group { margin: 0 0 30px; scroll-margin-top: 90px; }
.gg-romlist__letter {
	font-family: var(--gg-display); font-size: 22px; font-weight: 800; color: var(--gg-text);
	margin: 0 0 16px; padding: 12px 18px; border-radius: var(--gg-radius-sm);
	background: var(--gg-grad-soft); border-left: 6px solid transparent;
	border-image: var(--gg-grad) 1; border-image-slice: 0 0 0 1; background-clip: padding-box;
	position: relative;
}
.gg-romlist__letter::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 6px 0 0 6px; background: var(--gg-grad); }
.gg-romlist__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 28px; }
.gg-romlist__items li { padding: 9px 0 9px 20px; position: relative; border-bottom: 1px solid var(--gg-border-2); }
.gg-romlist__items li::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--gg-grad); }
.gg-romlist__items li a { color: var(--gg-text); font-weight: 600; }
.gg-romlist__items li a:hover { color: var(--gg-primary); }

/* ---------- Sidebar / widgets ---------- */
.layout__sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.widget { background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); padding: 22px; box-shadow: var(--gg-shadow); }
.widget-title { font-size: 16px; font-weight: 800; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ""; width: 5px; height: 18px; border-radius: 5px; background: var(--gg-grad); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px solid var(--gg-border-2); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--gg-text); font-weight: 500; }
.widget ul li a:hover { color: var(--gg-primary); }

/* ---------- Pagination ---------- */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 13px;
	background: var(--gg-surface); border: 1.5px solid var(--gg-border); border-radius: 13px; color: var(--gg-text); font-weight: 700;
	transition: .15s;
}
.pagination .page-numbers.current { background: var(--gg-grad); color: #fff; border-color: transparent; box-shadow: var(--gg-shadow-accent); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--gg-primary); color: var(--gg-primary); transform: translateY(-2px); }

/* ---------- Empty / 404 ---------- */
.gg-empty { text-align: center; background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); padding: 56px 26px; box-shadow: var(--gg-shadow); }
.gg-empty .search-form { max-width: 400px; margin: 20px auto; }
.gg-empty--404 h1 { font-size: 88px; font-weight: 800; font-family: var(--gg-display); margin: 0; line-height: 1; background: var(--gg-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gg-empty .gg-btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #f1f3fa; border-top: 1px solid var(--gg-border); color: var(--gg-text); margin-top: 48px; padding: 46px 0 28px; }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.site-footer__brand { display: inline-block; margin-bottom: 14px; }
.site-footer__brand img { max-height: 56px; width: auto; }
.site-footer__name { font-family: var(--gg-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; background: var(--gg-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 0; margin: 4px 0 0; justify-content: center; }
.footer-menu a { color: var(--gg-text); font-weight: 600; }
.footer-menu a:hover { color: var(--gg-primary); }

.site-footer__ad { margin: 34px 0 4px; max-width: 640px; }
.site-footer__ad-title { font-family: var(--gg-display); font-size: 22px; font-weight: 800; margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.site-footer__ad-text { color: var(--gg-muted); margin: 0 0 18px; }
.site-footer__ad-btn { box-shadow: var(--gg-shadow-accent); }

.site-footer__about { max-width: 780px; margin: 34px auto 0; color: #3a3340; font-size: 16px; line-height: 1.7; }
.site-footer__about strong { color: var(--gg-text); font-weight: 800; }

.site-footer__social { display: flex; justify-content: center; gap: 12px; margin: 28px 0 4px; }
.site-footer__social-link { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: transform .15s ease, filter .15s ease; }
.site-footer__social-link:hover { transform: translateY(-3px); filter: brightness(1.05); }
.site-footer__social-link.is-facebook { background: #1877f2; }
.site-footer__social-link.is-youtube { background: #ff0000; }
.site-footer__social-link.is-twitter { background: #0f1419; }
.site-footer__social-link.is-instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 62%, #285aeb 90%); }

.site-footer__bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--gg-border); width: 100%; font-size: 14px; color: var(--gg-muted); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 36px; background: var(--gg-surface); border: 1px solid var(--gg-border); border-radius: var(--gg-radius); padding: 26px; box-shadow: var(--gg-shadow); }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; padding: 11px 15px; border: 1.5px solid var(--gg-border); border-radius: 11px; font: inherit; margin-bottom: 12px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--gg-primary); box-shadow: 0 0 0 4px rgba(79,70,229,.14); }
.comment-form input[type=submit], .comments-area .submit { background: var(--gg-grad); color: #fff; border: 0; padding: 12px 26px; border-radius: 12px; font-weight: 700; cursor: pointer; box-shadow: var(--gg-shadow-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.layout--with-sidebar { grid-template-columns: minmax(0, 1fr); }
	.layout__sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
	.layout__sidebar .widget { flex: 1 1 240px; min-width: 0; }
	.gg-grid--4 { grid-template-columns: repeat(3, 1fr); }

	/* Tablet + mobile: collapse the horizontal nav into the hamburger menu. */
	.site-header__actions .search-form { display: none; }
	.site-header__actions { margin-left: auto; }   /* push hamburger to the right */
	.nav-toggle { display: block; }
	.main-nav {
		position: fixed; top: 74px; left: 0; right: 0; background: #fff;
		border-bottom: 1px solid var(--gg-border); padding: 12px 22px;
		box-shadow: 0 16px 30px rgba(0,0,0,.1);
		opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none;
		transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	}
	.main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
	.main-nav__menu { flex-direction: column; gap: 2px; align-items: stretch; }
	.main-nav__menu a { white-space: normal; }   /* full-width rows can wrap fine in the panel */
	/* sub-menus expand inline inside the panel (no hover needed on touch) */
	.main-nav__menu .menu-item-has-children > a::after { display: none; }
	.main-nav__menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; background: transparent; min-width: 0; padding: 2px 0;
		margin: 2px 0 6px 12px; border-left: 2px solid var(--gg-border); border-radius: 0;
	}
	.main-nav__menu .sub-menu a { padding: 7px 12px; font-size: 14px; color: var(--gg-muted); }
}
@media (max-width: 860px) {
	.gg-grid { grid-template-columns: repeat(2, 1fr); }
	.gg-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.hero { border-radius: 0 0 28px 28px; padding: 56px 22px 64px; }
	.single-game, .single-page { padding: 24px; }
}
@media (max-width: 520px) {
	.container { padding: 0 16px; }
	.gg-grid, .gg-grid--4 { grid-template-columns: 1fr; }
	.single-game, .single-page { padding: 18px; }
	.gg-details__table th { width: 44%; }
	.gg-details__table th, .gg-details__table td,
	.gg-downloads__table th, .gg-downloads__table td { padding: 11px 13px; font-size: 14px; }
	.home-section--alt { padding: 20px; }
	.home-intro { padding: 22px 18px; }
	.hero { padding: 48px 18px 56px; }
}
