/**
 * PlayRox — Mobile home stack (Classic dashboard).
 *
 * Balance card, featured game carousel, top games grid. Everything here is
 * scoped to `.pxm` and only shown under 720px; above that the desktop
 * dashboard renders exactly as before.
 */

:root {
	--pxm-green: #2ee65f;
	--pxm-violet: #6b4dff;
	--pxm-violet-soft: #8b6bff;
	--pxm-ink: #ffffff;
	--pxm-ink-2: #a9b2c6;
	--pxm-face: #0d1020;
	--pxm-face-2: #121734;
	--pxm-line: rgba(255, 255, 255, 0.08);
	--pxm-rad: 20px;
	--pxm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Desktop keeps the existing dashboard; the mobile stack is hidden. */
.pxm { display: none; }

@media (max-width: 720px) {

	.pxm {
		display: block;
		margin: 0 0 4px;
	}

	/* Desktop blocks the mobile stack replaces: the identity hero (now the
	   balance card) and the mid row. Achievements and Recently Played stay
	   below Top Games. */
	.plxd__panel[data-plxd-panel="dashboard"] > .plxd__row--hero,
	.plxd__panel[data-plxd-panel="dashboard"] > .plxd__row--mid { display: none; }

	/* ------------------------------------------------------------------
	   Balance card
	   ------------------------------------------------------------------ */

	.pxm-card {
		position: relative;
		overflow: hidden;
		border: 1px solid rgba(139, 107, 255, 0.28);
		border-radius: 24px;
		background:
			radial-gradient(120% 130% at 88% -20%, rgba(107, 77, 255, 0.45) 0%, rgba(107, 77, 255, 0) 58%),
			linear-gradient(160deg, #171a3d 0%, var(--pxm-face) 62%);
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
	}

	.pxm-card__glow {
		position: absolute;
		inset: -40% -20% auto auto;
		width: 220px;
		height: 220px;
		border-radius: 50%;
		background: radial-gradient(circle, rgba(139, 107, 255, 0.42), transparent 68%);
		pointer-events: none;
	}

	.pxm-card__body {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 22px 20px;
	}

	.pxm-card__left { min-width: 0; }

	.pxm-card__eyebrow {
		margin: 0 0 10px;
		color: #a08bff;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}

	.pxm-card__amount {
		display: inline-flex;
		align-items: center;
		gap: 12px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--pxm-ink);
		cursor: pointer;
		font: inherit;
		-webkit-tap-highlight-color: transparent;
		transition: opacity 0.18s var(--pxm-ease);
	}

	.pxm-card__amount:active { opacity: 0.7; }

	.pxm-card__coin { display: inline-flex; flex: none; }
	.pxm-card__coin .plx-icoimg { width: auto; height: 36px; object-fit: contain; display: block; }
	.pxm-card__coin i { font-size: 30px; color: #f5b93b; }

	.pxm-card__amount b {
		font-size: 38px;
		font-weight: 800;
		line-height: 1;
		letter-spacing: -0.01em;
		font-variant-numeric: tabular-nums;
	}

	.pxm-card__delta {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		margin: 16px 0 0;
		padding: 8px 14px;
		border-radius: 999px;
		background: rgba(107, 77, 255, 0.24);
		color: #e7e3ff;
		font-size: 14px;
		font-weight: 700;
	}

	.pxm-card__delta i { color: var(--pxm-green); font-size: 13px; }

	.pxm-card__av {
		position: relative;
		flex: none;
		width: 88px;
		height: 88px;
		display: grid;
		place-items: center;
		border-radius: 50%;
		border: 2px solid var(--pxm-green);
		box-shadow: 0 0 18px rgba(46, 230, 95, 0.28);
	}

	.pxm-card__av img,
	.pxm-card__av .avatar {
		width: 76px;
		height: 76px;
		border-radius: 50%;
		object-fit: cover;
		display: block;
	}

	.pxm-card__online {
		position: absolute;
		right: 2px;
		bottom: 6px;
		width: 18px;
		height: 18px;
		border-radius: 50%;
		background: var(--pxm-green);
		box-shadow: 0 0 0 3px var(--pxm-face), 0 0 10px rgba(46, 230, 95, 0.7);
	}

	/* ------------------------------------------------------------------
	   Section headers
	   ------------------------------------------------------------------ */

	.pxm-sec { margin-top: 28px; }

	.pxm-sec__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin-bottom: 14px;
	}

	.pxm-sec__title {
		display: inline-flex;
		align-items: flex-start;
		gap: 3px;
		margin: 0;
		color: var(--pxm-ink);
		font-size: 22px;
		font-weight: 800;
		letter-spacing: -0.01em;
	}

	.pxm-sec__spark {
		width: 9px;
		height: 9px;
		margin-top: 2px;
		background: var(--pxm-green);
		clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
	}

	.pxm-sec__all {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		padding: 4px 2px;
		border: 0;
		background: none;
		color: var(--pxm-green);
		font-size: 15px;
		font-weight: 600;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.pxm-sec__all i { font-size: 12px; }
	.pxm-sec__all:active { opacity: 0.7; }

	/* ------------------------------------------------------------------
	   Featured carousel
	   ------------------------------------------------------------------ */

	.pxm-feat { position: relative; }

	.pxm-feat__track {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.pxm-feat__track::-webkit-scrollbar { display: none; }

	.pxm-feat__slide {
		position: relative;
		flex: 0 0 100%;
		scroll-snap-align: center;
		min-height: 260px;
		display: flex;
		align-items: center;
		overflow: hidden;
		border: 1px solid rgba(139, 107, 255, 0.22);
		border-radius: var(--pxm-rad);
		background: linear-gradient(120deg, #241a52 0%, #150f33 55%, #0f0b26 100%);
	}

	.pxm-feat__art {
		position: absolute;
		inset: 0 0 0 38%;
		background-image: var(--pxm-art);
		background-size: cover;
		background-position: center right;
		-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
		mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
	}

	.pxm-feat__body {
		position: relative;
		z-index: 1;
		max-width: 62%;
		padding: 24px 18px;
	}

	.pxm-feat__title {
		margin: 0 0 10px;
		font-size: 30px;
		font-weight: 800;
		line-height: 1.08;
		letter-spacing: -0.02em;
		color: var(--pxm-ink);
	}

	.pxm-feat__title span,
	.pxm-feat__title em { display: block; font-style: normal; }
	.pxm-feat__title em { color: var(--pxm-green); }

	.pxm-feat__blurb {
		margin: 0 0 18px;
		color: #cdd3e6;
		font-size: 15px;
		line-height: 1.45;
	}

	/* Styling now comes from .play-btn (playrox-playbtn.css); only the
	   spacing below the button belongs to this layout. */
	.pxm-feat__cta { margin-top: 2px; }



	.pxm-feat__dots {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin-top: 16px;
	}

	.pxm-feat__dot {
		width: 8px;
		height: 8px;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.22);
		cursor: pointer;
		transition: width 0.26s var(--pxm-ease), background-color 0.26s var(--pxm-ease);
	}

	.pxm-feat__dot.is-active {
		width: 26px;
		background: var(--pxm-green);
		box-shadow: 0 0 8px rgba(46, 230, 95, 0.5);
	}

	/* ------------------------------------------------------------------
	   Top games grid
	   ------------------------------------------------------------------ */

	.pxm-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.pxm-tile {
		position: relative;
		overflow: hidden;
		border: 1px solid var(--pxm-line);
		border-radius: var(--pxm-rad);
		background: var(--pxm-face);
	}

	.pxm-tile__cover {
		display: block;
		width: 100%;
		aspect-ratio: 1 / 1;
		padding: 0;
		border: 0;
		background-color: var(--pxm-face-2);
		background-size: cover;
		background-position: center;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: transform 0.3s var(--pxm-ease);
	}

	.pxm-tile__cover:active { transform: scale(0.98); }
	.pxm-tile__ph { font-size: 34px; color: rgba(255, 255, 255, 0.2); }

	.pxm-tile__fav {
		position: absolute;
		top: 10px;
		right: 10px;
		display: grid;
		place-items: center;
		width: 38px;
		height: 38px;
		padding: 0;
		border: 0;
		border-radius: 12px;
		background: rgba(10, 12, 24, 0.62);
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
		color: #fff;
		font-size: 15px;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: transform 0.16s var(--pxm-ease), color 0.2s var(--pxm-ease);
	}

	.pxm-tile__fav.is-on { color: #ff5a7a; }
	.pxm-tile__fav:active { transform: scale(0.9); }

	.pxm-tile__foot {
		display: flex;
		align-items: center;
		gap: 7px;
		padding: 11px 10px 9px;
	}

	.pxm-tile__ic {
		display: grid;
		place-items: center;
		flex: none;
		width: 30px;
		height: 30px;
		border-radius: 10px;
		background: rgba(107, 77, 255, 0.22);
		color: var(--pxm-violet-soft);
		font-size: 14px;
	}

	.pxm-tile__name {
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		color: var(--pxm-ink);
		font-size: 14px;
		font-weight: 700;
	}

	.pxm-tile__rate {
		flex: none;
		display: inline-flex;
		align-items: center;
		gap: 4px;
		color: var(--pxm-ink);
		font-size: 13px;
		font-weight: 700;
	}

	.pxm-tile__rate i { color: #f5b93b; font-size: 11px; }

	.pxm-tile__bar {
		height: 5px;
		margin: 0 12px 14px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.08);
		overflow: hidden;
	}

	.pxm-tile__bar span {
		display: block;
		height: 100%;
		border-radius: inherit;
		background: linear-gradient(90deg, var(--pxm-violet), var(--pxm-violet-soft));
	}

	/* Narrow phones: the two-up grid gets tight below ~340px. */
	@media (max-width: 340px) {
		.pxm-grid { grid-template-columns: 1fr; }
		.pxm-card__amount b { font-size: 32px; }
		.pxm-feat__title { font-size: 26px; }
		.pxm-feat__body { max-width: 70%; }
	}
}

@media (prefers-reduced-motion: reduce) {
	.pxm-feat__track { scroll-behavior: auto; }
	.pxm-tile__cover,
	.pxm-tile__fav,
	.pxm-feat__cta,
	.pxm-feat__dot { transition-duration: 0.01ms !important; }
}
