/**
 * PlayRox games library + signup bonus.
 */

/* ==========================================================================
   Games library
   ========================================================================== */

.playrox-library {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.playrox-library.is-open {
	opacity: 1;
	visibility: visible;
}

.playrox-library__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 22, 12, 0.82);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.playrox-library__sheet {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	max-height: calc(100dvh - 40px);
	margin: 20px;
	border-radius: 22px;
	overflow: hidden;
	background: #0f1622;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	transform: translateY(18px) scale(0.98);
	transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.playrox-library.is-open .playrox-library__sheet {
	transform: none;
}

.playrox-library__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background: linear-gradient(135deg, #124a24 0%, #0d3a1c 100%);
	color: #fff;
}

.playrox-library__title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
}

.playrox-library__title i {
	color: #6fcf6f;
	margin-right: 6px;
}

.playrox-library__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.16s ease;
}

.playrox-library__close:hover {
	background: rgba(255, 92, 114, 0.85);
}

.playrox-library__tabs {
	display: flex;
	gap: 8px;
	padding: 14px 20px 0;
	background: #0f1622;
}

.playrox-library__tab {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 11px 14px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px 12px 0 0;
	border-bottom: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.16s ease, color 0.16s ease;
}

.playrox-library__tab.is-active {
	background: #171f2e;
	color: #fff;
}

.playrox-library__tab i {
	color: #6fcf6f;
}

.playrox-library__tab[data-playrox-tab="paid"] i {
	color: #ffc531;
}

.playrox-library__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 20px 24px;
	background: #171f2e;
	-webkit-overflow-scrolling: touch;
}

.playrox-library__panel {
	display: none;
}

.playrox-library__panel.is-active {
	display: block;
}

.playrox-library__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.playrox-library__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	text-align: left;
	cursor: pointer;
}

.playrox-library__thumb {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 14px;
	overflow: hidden;
	background: #0f1622;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.playrox-library__card:hover .playrox-library__thumb {
	transform: translateY(-3px);
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

.playrox-library__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.playrox-library__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, 0.3);
	font-size: 30px;
}

.playrox-library__badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
}

.playrox-library__badge.is-price {
	background: linear-gradient(135deg, #ffd75e, #f4b731);
	color: #3a2a06;
}

.playrox-library__badge.is-owned {
	background: rgba(47, 158, 68, 0.95);
	color: #fff;
}

.playrox-library__name {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.playrox-library__card.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.playrox-library__empty {
	padding: 40px 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.55);
	font-size: 14px;
}

.playrox-library__loading {
	display: flex;
	justify-content: center;
	padding: 50px 0;
}

.playrox-library__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(255, 255, 255, 0.16);
	border-top-color: #6fcf6f;
	border-radius: 50%;
	animation: playrox-lib-spin 0.8s linear infinite;
}

@keyframes playrox-lib-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
	.playrox-library__sheet {
		max-width: none;
		max-height: 100dvh;
		margin: 0;
		border-radius: 0;
	}

	.playrox-library__grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 12px;
	}
}

/* ==========================================================================
   Signup bonus
   ========================================================================== */

.playrox-bonus {
	position: fixed;
	inset: 0;
	z-index: 1000001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.playrox-bonus.is-open {
	opacity: 1;
	visibility: visible;
}

.playrox-bonus__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 22, 12, 0.85);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.playrox-bonus__card {
	position: relative;
	width: 100%;
	max-width: 340px;
	padding: 34px 26px 28px;
	border-radius: 26px;
	text-align: center;
	background: linear-gradient(180deg, #1a5a2e 0%, #0d3a1c 100%);
	color: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	overflow: hidden;
	transform: translateY(20px) scale(0.9);
	transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

.playrox-bonus.is-open .playrox-bonus__card {
	transform: none;
}

.playrox-bonus__burst {
	position: absolute;
	top: -60px;
	left: 50%;
	width: 260px;
	height: 260px;
	margin-left: -130px;
	background: radial-gradient(circle, rgba(255, 197, 49, 0.35) 0%, rgba(255, 197, 49, 0) 68%);
	pointer-events: none;
}

.playrox-bonus__coin {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: linear-gradient(145deg, #ffe07a, #f4b731);
	color: #7a5410;
	font-size: 38px;
	box-shadow: 0 10px 26px rgba(244, 183, 49, 0.5);
	animation: playrox-bonus-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5) both;
}

@keyframes playrox-bonus-pop {
	0% { transform: scale(0) rotate(-25deg); }
	100% { transform: scale(1) rotate(0); }
}

.playrox-bonus__title {
	margin: 0 0 6px;
	font-size: 23px;
	font-weight: 800;
}

.playrox-bonus__sub {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78);
}

.playrox-bonus__amount {
	margin: 0 0 22px;
	font-size: 38px;
	font-weight: 800;
	color: #ffd75e;
	text-shadow: 0 2px 10px rgba(244, 183, 49, 0.4);
}

.playrox-bonus__amount span {
	font-size: 16px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.8);
}

.playrox-bonus__claim {
	display: block;
	width: 100%;
	padding: 15px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #ffe07a, #f4b731);
	color: #5a3d08;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
	box-shadow: 0 8px 22px rgba(244, 183, 49, 0.4);
}

.playrox-bonus__claim:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(244, 183, 49, 0.55);
}

.playrox-bonus__claim.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

.playrox-bonus.is-claimed .playrox-bonus__coin {
	animation: playrox-bonus-spin 0.7s ease;
}

@keyframes playrox-bonus-spin {
	100% { transform: rotate(360deg) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
	.playrox-bonus__coin,
	.playrox-bonus.is-claimed .playrox-bonus__coin {
		animation: none;
	}
}

/* ==========================================================================
   Main-site games launcher (floating action button)
   ========================================================================== */

.playrox-games-fab {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99996;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 18px 12px 15px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #1a7a2e, #0d3a1c);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(13, 58, 28, 0.45);
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.playrox-games-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(13, 58, 28, 0.6);
	color: #fff;
}

.playrox-games-fab i {
	font-size: 17px;
	color: #6fe06f;
}

/* Keep the launcher clear of the player dock (which sits bottom-right). */
@media (max-width: 480px) {
	.playrox-games-fab__label {
		display: none;
	}

	.playrox-games-fab {
		padding: 14px;
	}

	.playrox-games-fab i {
		font-size: 19px;
	}
}

/* Hide the launcher while any popup is open. */
#viral-slider-popup.active ~ .playrox-games-fab,
.playrox-library.is-open ~ .playrox-games-fab {
	display: none;
}

/* Play / Continue overlay on library cards */
.playrox-library__play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	opacity: 0;
	transition: opacity 0.16s ease, transform 0.16s ease;
	pointer-events: none;
}

.playrox-library__play.is-continue {
	background: #2f9e44;
}

.playrox-library__card:hover .playrox-library__play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* On touch devices, show the Continue badge for played games always. */
@media (hover: none) {
	.playrox-library__play.is-continue {
		opacity: 1;
		top: auto;
		bottom: 8px;
		left: 8px;
		transform: none;
		padding: 4px 10px;
		font-size: 11px;
	}
}
