/* ---------------------------------------------------------------- base */
.rpp-arcade { padding: 10px 0; }
.rpp-arcade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.rpp-card {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	background: #171927; color: #fff; border-radius: 12px; padding: 26px 16px;
	text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
	border: 2px solid rgba(255,255,255,.08);
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
.rpp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.35); color: #ffd76a; }
.rpp-card:active { transform: translateY(0) scale(.97); }
.rpp-card-icon { font-size: 44px; }
.rpp-card-cover { display: flex; width: 100%; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: #0c0e18; }
.rpp-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.rpp-card-name { font-weight: 700; font-size: 17px; text-align: center; }
.rpp-card-play { background: #ffd76a; color: #171927; border-radius: 999px; padding: 6px 22px; font-weight: 700; font-size: 14px; margin-top: 6px; }
.rpp-leaderboard { margin-top: 34px; }
.rpp-leaderboard h2 { font-size: 22px; }
.rpp-leaderboard ol { list-style: none; padding: 0; max-width: 520px; }
.rpp-leaderboard li { display: flex; justify-content: space-between; padding: 8px 12px; background: #f4f4f4; border-radius: 8px; margin-bottom: 6px; }
.rpp-lb-score { font-weight: 700; }
.rpp-game { position: relative; margin: 20px 0; }
.rpp-iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000; }
#rpp-game-root { width: 100%; background: #000; border-radius: 10px; overflow: hidden; }
.rpp-game-hud { display: flex; gap: 16px; align-items: center; margin-top: 10px; padding: 8px 12px; background: #171927; color: #fff; border-radius: 8px; font-size: 15px; }
.rpp-game-hud .rpp-hud-profile { margin-left: auto; background: #ffd76a; color: #171927; border: 0; border-radius: 999px; padding: 5px 14px; font-weight: 700; cursor: pointer; }
.rpp-profile { background: #fff; border: 1px solid #e2e2e2; border-radius: 12px; padding: 20px; margin: 20px 0; }
.rpp-wallet { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.rpp-coin { background: #f4f4f4; border-radius: 999px; padding: 5px 14px; font-weight: 600; }
.rpp-coin-img { width: 22px; height: 22px; object-fit: cover; border-radius: 50%; vertical-align: -5px; margin-right: 2px; }
.rpp-badges { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; padding: 0; }
.rpp-badges li { background: #fdf3d8; border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.rpp-profile-note { color: #646970; font-size: 13px; }
.rpp-game-info { margin-top: 30px; padding: 22px; background: #f7f7f7; border-radius: 12px; }
.rpp-cta { margin-top: 14px; }
.rpp-game-title { font-size: 28px; }
.rpp-recommended { margin-top: 36px; }
.rpp-recommended h2 { font-size: 22px; margin-bottom: 14px; }
.rpp-recommended .rpp-arcade-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.rpp-recommended .rpp-card { padding: 16px 12px; }
.rpp-recommended .rpp-card-icon { font-size: 36px; }
.rpp-recommended .rpp-card-name { font-size: 15px; }
.rpp-recommended .rpp-card-play { font-size: 13px; padding: 5px 16px; }

/* game page shell (overrides the inline template styles) */
.rpp-page {
	max-width: 1000px; margin: 0 auto; padding: 30px 20px;
}
.rpp-page .rpp-game-title { word-break: break-word; }
.rpp-page .rpp-game-desc { font-size: 16px; line-height: 1.5; }
.rpp-page .rpp-game-long { margin-top: 30px; line-height: 1.6; }
.rpp-page .rpp-game-howto, .rpp-page .rpp-game-faq { margin-top: 30px; line-height: 1.6; }
.rpp-page .rpp-game-howto ol { padding-left: 22px; }
.rpp-page .rpp-game-howto li, .rpp-page .rpp-game-faq p { margin-bottom: 10px; }
.rpp-page .rpp-game-faq h3 { font-size: 17px; margin: 18px 0 6px; }
.rpp-page .rpp-cta a { word-break: break-word; }

/* generic game HUDs (all builtin games) shrink and wrap on small screens */
#rpp-game-root [class*="-hud"] {
	flex-wrap: wrap;
	gap: 4px 10px;
}

/* ----------------------------------------------------------------- media */
@media (max-width: 640px) {
	.rpp-arcade-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
	.rpp-card { padding: 18px 10px; gap: 6px; }
	.rpp-card-icon { font-size: 38px; }
	.rpp-card-name { font-size: 15px; }
	.rpp-card-play { font-size: 13px; padding: 5px 16px; }
	.rpp-recommended .rpp-arcade-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.rpp-game-info { padding: 16px; }
	.rpp-page { padding: 20px 12px; }
	.rpp-page .rpp-game-title { font-size: 24px; }
	.rpp-game-hud { gap: 10px; font-size: 13px; }
	#rpp-game-root [class*="-hud"] { font-size: 13px; padding: 6px 10px; }
	#rpp-game-root [class*="-hint"] { font-size: 11px; }
}

@media (max-width: 400px) {
	.rpp-arcade-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.rpp-recommended .rpp-arcade-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.rpp-card { padding: 14px 8px; }
	.rpp-card-icon { font-size: 32px; }
	.rpp-card-name { font-size: 14px; }
	.rpp-card-play { font-size: 12px; padding: 4px 12px; }
	.rpp-leaderboard ol { max-width: 100%; }
}
