/* Kids Games playful styles — used by kids.html and included in index.html */

#kids-include-content {
	font-family: 'Comic Neue', cursive, sans-serif;
	padding: 0 0 30px;
}

#kids-include-content .hero-logo {
	display: flex;
	justify-content: center;
	margin: 0;
}

#kids-include-content .hero-logo svg {
	width: min(100%, 320px);
	height: auto;
	display: block;
}

#kids-include-content h1 {
	font-family: 'Fredoka', sans-serif;
	text-align: center;
	font-size: 2.6em;
	color: #ff6f61;
	text-shadow: 2px 2px 0px #fff, 4px 4px 0px #ffd54f;
	margin-bottom: 8px;
}

#kids-include-content .subtitle {
	text-align: center;
	font-size: 1.1em;
	color: #888;
	margin: -2px 0 10px;
}

#kids-include-content .offline-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
	gap: 18px;
	align-items: center;
	max-width: 1000px;
	margin: 0 auto 24px;
	border: 4px solid #ffcc80;
	border-radius: 24px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 8px 0 rgba(0,0,0,0.08), 0 12px 24px rgba(0,0,0,0.06);
}

#kids-include-content .offline-card.complete {
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 24px;
	border-width: 3px;
}

#kids-include-content .offline-card.complete #offlineStatus {
	font-size: 1.05rem;
	margin-bottom: 0;
}

#kids-include-content .offline-card.complete #offlineDetail,
#kids-include-content .offline-card.complete .offline-track {
	display: none;
}

#kids-include-content .offline-card.complete .offline-version,
#kids-include-content .offline-card.complete #offlineCount {
	display: inline-block;
	margin-top: 0;
	font-size: 0.78rem;
}

#kids-include-content .offline-card.complete .offline-meter {
	justify-items: end;
	gap: 2px;
}

#kids-include-content .offline-kicker {
	font-family: 'Fredoka', sans-serif;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff6f61;
	margin: 0 0 4px;
}

#kids-include-content .offline-card h2 {
	font-family: 'Fredoka', sans-serif;
	font-size: clamp(1.25rem, 3vw, 1.65rem);
	color: #444;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
}

#kids-include-content .offline-card p {
	color: #666;
	line-height: 1.35;
	margin: 0;
}

#kids-include-content .offline-version {
	margin-top: 8px;
	font-family: 'Fredoka', sans-serif;
	font-size: 0.85rem;
	font-weight: 600;
	color: #ff6f61;
}

#kids-include-content .offline-meter {
	display: grid;
	gap: 8px;
}

#kids-include-content .offline-track {
	height: 16px;
	border-radius: 999px;
	background: #fff3e0;
	overflow: hidden;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

#kids-include-content .offline-track span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #ff6f61, #ffd54f, #66bb6a);
	transition: width 0.2s ease;
}

#kids-include-content #offlineCount {
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	color: #555;
}

#kids-include-content #offlineRetry {
	justify-self: start;
	border: 0;
	border-radius: 999px;
	padding: 0.55rem 0.85rem;
	background: #ff6f61;
	color: #fff;
	font: inherit;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	cursor: pointer;
}

#kids-include-content .age-section {
	max-width: 1000px;
	margin: 0 auto 34px;
}

#kids-include-content .age-section:last-child {
	margin-bottom: 0;
}

#kids-include-content .section-kicker {
	font-family: 'Fredoka', sans-serif;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff6f61;
	text-align: center;
	margin: 0 0 4px;
}

#kids-include-content .section-heading {
	font-family: 'Fredoka', sans-serif;
	font-size: clamp(1.45rem, 4vw, 2rem);
	color: #444;
	text-align: center;
	padding-bottom: 0;
	border-bottom: 0;
	margin: 0 0 18px;
}

#kids-include-content .games-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	margin: 0 auto;
}

#kids-include-content .game-card {
	position: relative;
	background: #fff;
	border-radius: 24px;
	padding: 26px 18px;
	font-size: 1rem;
	text-align: center;
	box-shadow: 0 8px 0 rgba(0,0,0,0.08), 0 12px 24px rgba(0,0,0,0.06);
	transition: transform 0.2s, box-shadow 0.2s;
	border: 4px solid transparent;
	text-decoration: none;
	color: inherit;
	display: block;
}

#kids-include-content .game-card:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 12px 0 rgba(0,0,0,0.1), 0 18px 32px rgba(0,0,0,0.1);
}

#kids-include-content .game-card:nth-child(1) { border-color: #f48fb1; }
#kids-include-content .game-card:nth-child(2) { border-color: #ff8a80; }
#kids-include-content .game-card:nth-child(3) { border-color: #81d4fa; }
#kids-include-content .game-card:nth-child(4) { border-color: #a5d6a7; }
#kids-include-content .game-card:nth-child(5) { border-color: #fff176; }
#kids-include-content .game-card:nth-child(6) { border-color: #ce93d8; }

#kids-include-content .early-kids .game-card {
	background: linear-gradient(180deg, #ffffff 0%, #f7fff1 100%);
}

#kids-include-content .early-kids .game-card:nth-child(1) { border-color: #61c469; }
#kids-include-content .early-kids .game-card:nth-child(2) { border-color: #ef6b43; }
#kids-include-content .early-kids .game-card:nth-child(3) { border-color: #63e6ff; }

#kids-include-content .older-kids .game-card {
	background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

#kids-include-content .older-kids .game-card:nth-child(1) { border-color: #68e1fd; }
#kids-include-content .older-kids .game-card:nth-child(2) { border-color: #f97316; }
#kids-include-content .older-kids .game-card:nth-child(3) { border-color: #43d17a; }
#kids-include-content .older-kids .game-card:nth-child(4) { border-color: #ffe66d; }
#kids-include-content .older-kids .game-card:nth-child(5) { border-color: #63e6ff; }
#kids-include-content .older-kids .game-card:nth-child(6) { border-color: #ffd166; }

#kids-include-content .teen-challenges .game-card {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#kids-include-content .teen-challenges .game-card:nth-child(1) { border-color: #5cffd6; }
#kids-include-content .teen-challenges .game-card:nth-child(2) { border-color: #60a5fa; }
#kids-include-content .teen-challenges .game-card:nth-child(3) { border-color: #b91c1c; }
#kids-include-content .teen-challenges .game-card:nth-child(4) { border-color: #4ade80; }
#kids-include-content .teen-challenges .game-card:nth-child(5) { border-color: #38bdf8; }

#kids-include-content .early-kids .game-card::before,
#kids-include-content .older-kids .game-card::before,
#kids-include-content .teen-challenges .game-card::before {
	content: 'Beta';
	position: absolute;
	top: 14px;
	left: 14px;
	border-radius: 999px;
	padding: 0.32rem 0.58rem;
	background: #111827;
	color: #fff;
	font-family: 'Fredoka', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#kids-include-content .older-kids .game-card:nth-child(2)::before,
#kids-include-content .older-kids .game-card:nth-child(6)::before {
	content: none;
}

#kids-include-content .early-kids .game-card:nth-child(1)::before,
#kids-include-content .early-kids .game-card:nth-child(2)::before,
#kids-include-content .early-kids .game-card:nth-child(3)::before,
#kids-include-content .early-kids .game-card:nth-child(5)::before {
	content: none;
}

#kids-include-content .age-section:not(.early-kids):not(.older-kids):not(.teen-challenges) .game-card.beta-card::before {
	content: 'Beta';
	position: absolute;
	top: 14px;
	left: 14px;
	border-radius: 999px;
	padding: 0.32rem 0.58rem;
	background: #111827;
	color: #fff;
	font-family: 'Fredoka', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#kids-include-content .game-card.no-beta::before {
	content: none !important;
}

#kids-include-content .icon {
	width: 90px;
	height: 90px;
	margin: 0 auto 14px;
}

#kids-include-content .icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

#kids-include-content .game-card h2 {
	font-family: 'Fredoka', sans-serif;
	font-size: 1.4em;
	padding-bottom: 0;
	border-bottom: 0;
	margin: 0 0 8px;
	color: #444;
}

#kids-include-content .game-card p {
	font-size: 0.95em;
	color: #666;
	margin: 0;
	line-height: 1.4;
}

#kids-include-content .kids-footer-links {
	max-width: 1000px;
	margin: 12px auto 0;
	text-align: center;
}

#kids-include-content .kids-footer-links a,
#kids-include-content .credits-card a {
	color: #ff6f61;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
}

#kids-include-content.credits-page {
	max-width: 900px;
	margin: 0 auto;
}

#kids-include-content .credits-card {
	margin: 0 0 24px;
	border: 4px solid #ffcc80;
	border-radius: 24px;
	padding: 22px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 0 rgba(0,0,0,0.08), 0 12px 24px rgba(0,0,0,0.06);
}

#kids-include-content .credits-card h2 {
	margin: 0 0 10px;
	font-family: 'Fredoka', sans-serif;
	color: #444;
}

#kids-include-content .credits-card p {
	margin: 0 0 12px;
	color: #555;
	line-height: 1.5;
}

#kids-include-content .credits-card p:last-child {
	margin-bottom: 0;
}

#kids-include-content .license-text {
	max-height: 260px;
	overflow: auto;
	border-radius: 16px;
	padding: 14px;
	background: #fff8ed;
	color: #4b5563;
	font: 0.85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
}

.game-loading-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 1.5rem;
	background: rgba(255, 246, 214, 0.72);
	backdrop-filter: blur(8px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.16s ease;
}

.game-loading-overlay.visible {
	opacity: 1;
	pointer-events: auto;
}

.game-loading-card {
	width: min(92vw, 420px);
	border: 4px solid #ffcc80;
	border-radius: 24px;
	padding: 22px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 10px 0 rgba(0,0,0,0.08), 0 22px 44px rgba(0,0,0,0.12);
	font-family: 'Comic Neue', cursive, sans-serif;
	text-align: center;
}

.game-loading-kicker {
	margin: 0 0 4px;
	font-family: 'Fredoka', sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff6f61;
}

.game-loading-card h2 {
	margin: 0 0 14px;
	font-family: 'Fredoka', sans-serif;
	font-size: clamp(1.35rem, 5vw, 1.9rem);
	color: #444;
}

.game-loading-card p {
	margin: 10px 0 0;
	color: #666;
}

.game-loading-track {
	height: 16px;
	border-radius: 999px;
	background: #fff3e0;
	overflow: hidden;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.game-loading-track span {
	display: block;
	width: 42%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #ff6f61, #ffd54f, #66bb6a);
	animation: game-loading-slide 0.9s ease-in-out infinite alternate;
}

@keyframes game-loading-slide {
	from { transform: translateX(-55%); }
	to { transform: translateX(140%); }
}

.kids-back-link {
	display: block;
	text-align: center;
	margin-top: 30px;
	font-family: 'Fredoka', sans-serif;
	font-size: 1em;
	color: #ff6f61;
	text-decoration: none;
}
.kids-back-link:hover {
	text-decoration: underline;
}

/* Standalone kids.html page background */
body.kids-page {
	margin: 0;
	padding: 40px 20px;
	background: linear-gradient(135deg, #ffe6f0 0%, #e0f7fa 50%, #fff9c4 100%);
	min-height: 100vh;
}

#kids-include-content .favorites-section {
	background: linear-gradient(180deg, #ffffff 0%, #f0fffe 100%);
	border-radius: 24px;
	padding: 24px 20px;
	border: 4px solid #06b6d4;
}

#kids-include-content .favorites-placeholder {
	grid-column: 1 / -1;
	text-align: center;
	font-style: italic;
	color: #888;
	padding: 20px;
}

#kids-include-content .star-btn {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #06b6d4;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: transform 0.15s, background 0.15s;
	box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

#kids-include-content .star-btn:hover {
	transform: scale(1.15);
}

#kids-include-content .star-btn .star-outline {
	width: 20px;
	height: 20px;
	color: #06b6d4;
}

#kids-include-content .star-btn .star-filled {
	display: none;
	width: 20px;
	height: 20px;
	color: #fff;
}

#kids-include-content .star-btn.favorited {
	background: #06b6d4;
}

#kids-include-content .star-btn.favorited .star-outline {
	display: none;
}

#kids-include-content .star-btn.favorited .star-filled {
	display: block;
}

#kids-include-content .star-btn.favorited:hover {
	background: #0891b2;
}

@media (prefers-reduced-motion: reduce) {
	#kids-include-content .star-btn {
		transition: none;
	}
	#kids-include-content .star-btn:hover {
		transform: none;
	}
}

@media (max-width: 720px) {
	#kids-include-content .offline-card {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.game-loading-overlay,
	.game-loading-track span {
		animation: none;
		transition: none;
	}

	.game-loading-track span {
		width: 100%;
		transform: none;
	}
}
