/* ==========================================================================
   FunGame custom theme - Candy Pop (light, pastel)
   Overrides the default html5games / Famobi palette and typography
   ========================================================================== */

:root {
	--c-bg: #fff6ee;
	--c-bg-2: #ffeef6;
	--c-surface: #ffffff;
	--c-surface-2: #fff3e6;
	--c-line: #f3e3ef;
	--c-ink: #3a2b52;
	--c-muted: #9b8bb3;
	--c-pink: #ff5c8a;
	--c-mint: #21c7b8;
	--c-lemon: #ffc93c;
	--c-lilac: #9b6be8;
	--c-radius: 24px;
	--c-radius-sm: 16px;
	--c-shadow: 0 14px 30px rgba(155, 107, 232, .16);
	--c-shadow-lg: 0 22px 44px rgba(255, 92, 138, .22);
}

/* ---------- Base ---------- */
html {
	background-color: var(--c-bg);
}

body {
	background:
		radial-gradient(760px 460px at 8% -6%, rgba(255, 201, 60, .38), transparent 62%),
		radial-gradient(720px 460px at 96% 4%, rgba(33, 199, 184, .30), transparent 62%),
		radial-gradient(900px 520px at 50% 108%, rgba(255, 92, 138, .24), transparent 62%),
		linear-gradient(170deg, var(--c-bg) 0%, var(--c-bg-2) 55%, #fff2e4 100%);
	background-attachment: fixed;
	color: var(--c-ink);
	font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", Arial, Verdana, sans-serif;
}

/* Background candy blobs */
body:before,
body:after {
	content: "";
	position: fixed;
	z-index: 0;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(2px);
}

body:before {
	width: 320px;
	height: 320px;
	left: -110px;
	top: 30%;
	background: radial-gradient(circle at 35% 35%, rgba(155, 107, 232, .30), rgba(255, 92, 138, .12) 60%, transparent 70%);
}

body:after {
	width: 280px;
	height: 280px;
	right: -100px;
	top: 62%;
	background: radial-gradient(circle at 60% 40%, rgba(33, 199, 184, .30), rgba(255, 201, 60, .14) 60%, transparent 70%);
}

#app {
	position: relative;
	z-index: 1;
}

.content {
	background-color: transparent;
}

.content .main-section {
	margin-top: 48px;
	margin-bottom: 48px;
}

.main-section {
	width: 1080px;
}

img {
	border-radius: 8px;
}

p a {
	color: var(--c-pink);
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

::-webkit-scrollbar-track {
	background: rgba(255, 92, 138, .07);
}

::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, var(--c-pink), var(--c-lilac));
	border-radius: 10px;
	border: 3px solid transparent;
	background-clip: padding-box;
}

/* ---------- Top navigation ---------- */
header.main {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 3px solid #ffe3ee;
	box-shadow: 0 8px 26px rgba(155, 107, 232, .13);
}

header.main .main-section {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 92px;
	padding: 14px 20px;
}

header.main .menuHolder {
	left: 20px;
	top: 24px;
}

header.main .menuHolder label[for="navigationTrigger"] {
	height: 48px;
	padding: 13px;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--c-pink), var(--c-lilac));
	border: none;
	box-shadow: 0 8px 18px rgba(255, 92, 138, .35);
	transition: transform .2s ease, box-shadow .2s ease;
}

header.main .menuHolder label[for="navigationTrigger"]:hover {
	transform: translateY(-2px) rotate(-3deg);
	box-shadow: 0 12px 24px rgba(255, 92, 138, .45);
}

header.main .menuHolder label[for="navigationTrigger"] svg {
	height: 22px;
	fill: #fff;
}

header.main .menuHolder nav.main {
	top: 62px;
	left: -6px;
	float: none;
	margin-top: 0;
	width: auto;
	min-height: 0;
	background: var(--c-surface);
	border: 3px solid var(--c-line);
	border-radius: 22px;
	box-shadow: var(--c-shadow-lg);
	padding: 12px 18px;
	min-width: 250px;
	max-height: 70vh;
	overflow-y: auto;
}

header.main .menuHolder nav.main ul:after {
	border-bottom-color: var(--c-surface);
}

header.main .menuHolder nav.main ul > li a {
	color: var(--c-ink);
	border-bottom: 2px dashed #f0e3f2;
	font-weight: 700;
}

header.main .menuHolder nav.main ul > li a:hover {
	color: var(--c-pink);
}

header.main .menuHolder nav.main ul > li a i {
	color: var(--c-mint);
}

/* Language switcher */
.language-select {
	right: 20px;
	top: 26px;
	height: 42px;
	width: 74px;
	border-radius: 18px;
	border: 3px solid var(--c-line);
	background-color: #fff;
	box-shadow: 0 6px 14px rgba(155, 107, 232, .16);
}

.language-select .value {
	background-color: transparent;
	color: var(--c-lilac);
	line-height: 18px;
	padding: 9px 12px;
	font-weight: 800;
}

.language-select .value:before {
	border-top-color: var(--c-lilac);
}

.language-select select {
	height: 40px;
}

/* ---------- Brand logo ---------- */
header.main .logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex: 0 0 auto;
	text-decoration: none;
}

header.main .logo svg {
	display: none;
}

header.main .logo::before {
	content: "";
	width: 50px;
	height: 50px;
	background: url("/assets/theme/logo.svg") center / contain no-repeat;
	filter: drop-shadow(0 8px 14px rgba(255, 92, 138, .38));
	transition: transform .25s ease;
}

header.main .logo:hover::before {
	transform: rotate(-10deg) scale(1.06);
}

header.main .logo::after {
	content: "FunGame";
	display: inline-flex;
	align-items: center;
	padding: 8px 26px;
	border-radius: 999px;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: 1px;
	background: linear-gradient(90deg, var(--c-pink) 0%, var(--c-lilac) 50%, var(--c-mint) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 5px 12px rgba(155, 107, 232, .32));
}

@media only screen and (max-width: 750px) {
	header.main .logo::after {
		font-size: 20px;
		padding: 6px 16px;
	}

	header.main .logo::before {
		width: 36px;
		height: 36px;
	}

	header.main .main-section {
		min-height: 70px;
	}

	header.main .menuHolder {
		left: 10px;
		top: 16px;
	}

	.language-select {
		right: 10px;
		top: 18px;
	}
}

/* ---------- Headings ---------- */
h1,
.h1 {
	color: var(--c-ink);
	text-transform: none;
	text-align: center;
	font-size: 2.4em;
	letter-spacing: -.5px;
	position: relative;
}

h1 a,
.h1 a {
	color: var(--c-ink);
}

/* No accent bar on the detail page title */
.game header h1::before {
	display: none;
}

/* Section headings (h2.h1 generated by script) */
h2.h1,
h2.h2 {
	text-align: left;
	position: relative;
	padding-left: 20px;
	font-size: 1.7em;
	color: var(--c-ink);
}

h2,
.h2 {
	color: var(--c-ink);
	text-transform: none;
	text-align: left;
	font-size: 1.6em;
	letter-spacing: .2px;
	padding-left: 18px;
	position: relative;
}

h2 a,
.h2 a {
	color: var(--c-ink);
}

h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%) rotate(-6deg);
	width: 10px;
	height: 72%;
	border-radius: 8px;
	background: linear-gradient(180deg, var(--c-pink), var(--c-lemon));
}

h1::before {
	content: "";
	position: absolute;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-3deg);
	top: -14px;
	width: 54px;
	height: 8px;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--c-mint), var(--c-lilac));
}

/* Category icons */
header.main .menuHolder nav.main ul > li a img,
h1 img,
h2 img,
footer.main .footer-content section.tags nav.main ul li a img {
	opacity: .9;
	transition: opacity .2s ease, transform .2s ease;
}

header.main .menuHolder nav.main ul > li a:hover img,
h1:hover img,
h2:hover img,
footer.main .footer-content section.tags nav.main ul li a:hover img {
	opacity: 1;
	transform: translateY(-2px) scale(1.08);
}

p a.highlight {
	background-color: var(--c-lemon);
	color: var(--c-ink);
	border-radius: 8px;
	padding: 3px 6px;
}

/* ---------- Game grid ---------- */
ul.games {
	margin-left: -16px;
	margin-top: -16px;
}

ul.games li {
	padding-left: 16px;
	margin-top: 16px;
	width: 25%;
}

ul.games li .icon {
	border: 4px solid #fff;
	border-radius: var(--c-radius);
	box-shadow: var(--c-shadow);
	overflow: hidden;
	background: var(--c-surface);
	transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}

ul.games li .icon img {
	border-radius: calc(var(--c-radius) - 4px);
	transition: transform .35s ease;
}

/* Rotate the candy border colour every four cards */
ul.games li:nth-child(4n+1) .icon {
	border-color: #ffe3ee;
}

ul.games li:nth-child(4n+2) .icon {
	border-color: #d8f6f2;
}

ul.games li:nth-child(4n+3) .icon {
	border-color: #fff2c9;
}

ul.games li:nth-child(4n+4) .icon {
	border-color: #ecdefb;
}

ul.games li a:hover .icon {
	transform: translateY(-8px) rotate(-1.5deg);
	box-shadow: 0 26px 44px rgba(255, 92, 138, .28);
}

ul.games li a:hover .icon img {
	transform: scale(1.08);
}

ul.games li .name-container {
	height: 46px;
	padding: 10px 6px;
}

ul.games li .name {
	color: var(--c-ink);
	font-size: 15px;
	line-height: 18px;
	font-weight: 700;
}

ul.games li a:hover .name {
	color: var(--c-pink);
}

ul.games li .btn-block {
	height: 48px;
	border-radius: 999px;
}

/* Detail page hero image */
.game header .background {
	border-radius: 0 0 32px 32px;
	box-shadow: var(--c-shadow-lg);
}

.game header .background .backgroundDarken {
	background-color: rgba(58, 43, 82, .42);
}

.game header .icon {
	border: 6px solid #fff;
	border-radius: 26px;
	box-shadow: var(--c-shadow-lg);
}

.game header h1 {
	font-size: 2.2em;
	text-transform: none;
	color: #fff;
}

.game .play-btn-container .play-btn {
	border-radius: 999px;
	background: linear-gradient(90deg, var(--c-pink), var(--c-lemon));
	color: var(--c-ink);
	box-shadow: 0 14px 30px rgba(255, 92, 138, .4);
	transition: transform .2s ease, box-shadow .2s ease;
}

.game .play-btn-container .play-btn:hover {
	transform: translateY(-4px) scale(1.03);
	box-shadow: 0 20px 38px rgba(255, 92, 138, .5);
}

.game .game-categories ul li {
	background-color: #d8f6f2;
	border-radius: 999px;
}

.game .game-categories ul li a {
	color: #14857a;
	font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn,
.btn-highlight,
.btn-primary,
.btn-neutral,
.btn-transparent {
	border-radius: 999px;
	padding: 12px 28px;
	font-weight: 800;
	box-shadow: none;
	transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary {
	background: linear-gradient(90deg, var(--c-pink), var(--c-lilac));
	color: #fff;
	box-shadow: 0 10px 22px rgba(155, 107, 232, .32);
}

.btn-highlight {
	background: linear-gradient(90deg, var(--c-lemon), var(--c-pink));
	color: var(--c-ink);
	box-shadow: 0 10px 22px rgba(255, 201, 60, .38);
}

.btn-neutral {
	background-color: #d8f6f2;
	color: #14857a;
}

.btn-container {
	margin: 28px 0 60px;
}

.btn-container .btn-primary:hover,
.btn-container .btn-highlight:hover {
	transform: translateY(-3px);
}

/* ---------- Footer ---------- */
footer.main {
	background:
		radial-gradient(circle at 12px 12px, rgba(255, 92, 138, .12) 3px, transparent 4px) 0 0 / 26px 26px,
		#fff1e6;
	border-top: 4px solid #ffe3ee;
	color: var(--c-ink);
	padding: 54px 0;
	box-shadow: inset 0 14px 26px rgba(255, 201, 60, .14);
}

footer.main a {
	color: var(--c-ink);
}

footer.main .footer-content section.tags nav.main ul li a {
	background-color: #fff;
	border: 3px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-ink);
	box-shadow: 0 6px 14px rgba(155, 107, 232, .12);
	transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

footer.main .footer-content section.tags nav.main ul li a:hover {
	background: linear-gradient(90deg, var(--c-pink), var(--c-lilac));
	color: #fff;
	transform: translateY(-3px);
}

footer.main .copyright {
	color: var(--c-muted);
}

footer.main .copyright a {
	color: var(--c-pink) !important;
	font-weight: 700;
}

footer.main .footer-content nav.meta a {
	color: var(--c-muted);
}

footer.main .footer-content nav.meta a:hover {
	color: var(--c-pink);
}

/* Tiles in footer / menu */
.tile-neutral,
footer.main .footer-content section.tags nav.main .tile-list li .tile-neutral,
nav.main .tile-list li .tile-neutral {
	background-color: #fff !important;
	color: var(--c-ink);
	border: 3px solid var(--c-line);
	border-radius: var(--c-radius-sm);
}

.tile-neutral header {
	color: var(--c-ink);
}

.tile-neutral:hover {
	border-color: var(--c-pink);
	color: var(--c-pink);
}

/* Plain links in the drawer navigation */
nav.main ul > li a {
	color: var(--c-ink);
	border-bottom-color: #f0e3f2;
}

nav.main ul > li a:before {
	background-color: transparent;
}

nav.main ul > li a:hover,
nav.main ul > li a.active {
	color: var(--c-pink);
}

nav.main ul > li a:hover:before,
nav.main ul > li a.active:before {
	background-color: var(--c-pink);
}

/* Footer legal links */
.consent-box-links a {
	color: var(--c-lilac) !important;
	font-weight: 700;
}

/* ---------- Detail page extras ---------- */
.similarGames h2 {
	margin-bottom: 22px;
}

.static .content a {
	color: var(--c-pink);
}

section.externalTeaser {
	background-color: #fff1e6;
}

/* ---------- Legal pages ---------- */
.privacy_box {
	max-width: 820px;
	margin: 0 auto;
	padding: 40px 24px 70px;
	background: #fff;
	border: 4px solid var(--c-line);
	border-radius: 28px;
	box-shadow: var(--c-shadow);
	color: var(--c-ink);
	font-size: 15px;
	line-height: 1.85;
}

.privacy_box b {
	color: var(--c-pink);
}

.privacy_box a {
	color: var(--c-lilac);
}

.privacy_box .page-heading {
	margin-top: 18px;
	padding-left: 14px;
	border-left: 6px solid var(--c-pink);
	color: var(--c-ink);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.privacy_box p {
	margin-top: 14px;
	color: var(--c-muted);
	font-size: 13px;
}

/* ---------- Detail page: more games list ---------- */
.game_box {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin: 30px 0;
}

.game_item {
	display: block;
	background: #fff;
	border: 4px solid var(--c-line);
	border-radius: var(--c-radius-sm);
	overflow: hidden;
	text-decoration: none;
	transition: transform .22s ease, box-shadow .22s ease;
}

.game_item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.game_name {
	display: block;
	padding: 10px 8px;
	font-size: 14px;
	color: var(--c-ink);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 700;
}

.game_item:hover {
	transform: translateY(-6px) rotate(1.5deg);
	box-shadow: 0 20px 34px rgba(255, 92, 138, .26);
}

.game_item:hover .game_name {
	color: var(--c-pink);
}

@media only screen and (max-width: 750px) {
	.game_box {
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
	}
}

@media only screen and (min-width: 751px) and (max-width: 1100px) {
	.main-section {
		width: 100%;
		padding: 0 16px;
	}
}

/* Mobile */
@media only screen and (max-width: 750px) {
	.main-section {
		width: 100%;
		padding: 0 12px;
	}

	h1,
	.h1 {
		font-size: 1.7em;
	}

	h2,
	.h2 {
		font-size: 1.25em;
	}

	ul.games li {
		width: 50%;
		margin-top: 10px;
		padding-left: 10px;
	}

	ul.games {
		margin-left: -10px;
	}
}
