/**
 * WP GameHub Player & Frontend Components CSS
 */

:root {
	--wgh-bg-dark: #0a0b10;
	--wgh-card-bg: #12141c;
	--wgh-card-hover: #1b1e2a;
	--wgh-accent-cyan: #00f0ff;
	--wgh-accent-pink: #ff0055;
	--wgh-accent-amber: #ffb800;
	--wgh-accent-green: #00ff88;
	--wgh-text-main: #f1f5f9;
	--wgh-text-muted: #94a3b8;
	--wgh-border-color: rgba(255, 255, 255, 0.08);
	--wgh-radius-sm: 8px;
	--wgh-radius-md: 12px;
	--wgh-radius-lg: 16px;
}

/* Fallback Container for 3rd Party Themes */
.wgh-fallback-wrapper {
	background: var(--wgh-bg-dark);
	color: var(--wgh-text-main);
	min-height: 80vh;
	padding: 30px 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.wgh-fallback-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Breadcrumbs */
.wgh-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--wgh-text-muted);
	margin-bottom: 20px;
}
.wgh-breadcrumbs a {
	color: var(--wgh-text-muted);
	text-decoration: none;
	transition: color 0.2s;
}
.wgh-breadcrumbs a:hover {
	color: var(--wgh-accent-cyan);
}
.wgh-crumb-sep {
	opacity: 0.4;
}
.wgh-crumb-current {
	color: var(--wgh-text-main);
	font-weight: 600;
}

/* Single Game Header */
.wgh-single-header {
	margin-bottom: 20px;
}
.wgh-single-title {
	font-size: 2.2rem;
	font-weight: 800;
	margin: 0 0 10px;
	color: #fff;
	text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.wgh-single-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.wgh-meta-pill {
	background: rgba(255, 255, 255, 0.06);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wgh-text-muted);
	border: 1px solid var(--wgh-border-color);
}
.wgh-cat-pill {
	color: var(--wgh-accent-cyan);
	border-color: rgba(0, 240, 255, 0.3);
}

/* ==========================================================================
   GAME PLAYER CORE COMPONENT
   ========================================================================== */
.wgh-player-wrapper {
	position: relative;
	background: #000;
	border-radius: var(--wgh-radius-md);
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.1);
	margin-bottom: 20px;
	border: 1px solid var(--wgh-border-color);
}
.wgh-player-container {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Theatre Mode */
.wgh-player-wrapper.wgh-theatre-active {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	border-radius: 0;
	margin: 0;
}
.wgh-player-wrapper.wgh-theatre-active .wgh-player-container {
	height: calc(100vh - 54px);
	aspect-ratio: auto;
}

/* Splash Overlay */
.wgh-player-splash {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 10;
}
.wgh-splash-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 11, 16, 0.85);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
}
.wgh-splash-title {
	font-size: 2rem;
	color: #fff;
	margin-bottom: 20px;
	font-weight: 800;
}
.wgh-btn-play-trigger {
	background: linear-gradient(135deg, var(--wgh-accent-cyan), #0099ff);
	color: #050811;
	font-weight: 900;
	font-size: 1.2rem;
	padding: 16px 36px;
	border-radius: 40px;
	border: none;
	cursor: pointer;
	box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
	transition: transform 0.2s, box-shadow 0.2s;
}
.wgh-btn-play-trigger:hover {
	transform: scale(1.06);
	box-shadow: 0 0 35px rgba(0, 240, 255, 0.9);
}

/* Loading Spinner */
.wgh-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.1);
	border-top-color: var(--wgh-accent-cyan);
	border-radius: 50%;
	animation: wgh-spin 0.8s linear infinite;
	margin: 0 auto 12px;
}
@keyframes wgh-spin {
	to { transform: rotate(360deg); }
}

/* Iframe Holder */
.wgh-iframe-holder {
	width: 100%;
	height: 100%;
	display: flex;
}
.wgh-game-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

/* Mobile Orientation Notice */
.wgh-orientation-notice {
	position: absolute;
	inset: 0;
	background: rgba(10, 11, 16, 0.95);
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
}
.wgh-orientation-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 12px;
}

/* Player Control Bar */
.wgh-player-controls-bar {
	background: #0d0f17;
	border-top: 1px solid var(--wgh-border-color);
	padding: 10px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.wgh-ctrl-btn {
	background: transparent;
	border: 1px solid var(--wgh-border-color);
	color: var(--wgh-text-main);
	padding: 6px 14px;
	border-radius: var(--wgh-radius-sm);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.wgh-ctrl-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--wgh-accent-cyan);
	border-color: var(--wgh-accent-cyan);
}

/* Action Bar (Favorite, Rating, Share) */
.wgh-action-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--wgh-card-bg);
	border: 1px solid var(--wgh-border-color);
	border-radius: var(--wgh-radius-md);
	padding: 14px 20px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}
.wgh-action-left, .wgh-action-right {
	display: flex;
	align-items: center;
	gap: 16px;
}
.wgh-action-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--wgh-border-color);
	color: var(--wgh-text-main);
	padding: 8px 16px;
	border-radius: 20px;
	cursor: pointer;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s;
}
.wgh-action-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}
.wgh-action-btn.active .wgh-fav-icon {
	color: var(--wgh-accent-pink);
}

/* Star Rating Widget */
.wgh-star-rating-box {
	display: flex;
	align-items: center;
	gap: 8px;
}
.wgh-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 4px;
}
.wgh-star {
	font-size: 20px;
	color: rgba(255, 255, 255, 0.2);
	cursor: pointer;
	transition: color 0.15s;
}
.wgh-star:hover,
.wgh-star:hover ~ .wgh-star {
	color: var(--wgh-accent-amber);
}

/* Details Layout */
.wgh-details-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 24px;
	margin-bottom: 40px;
}
@media (max-width: 860px) {
	.wgh-details-layout {
		grid-template-columns: 1fr;
	}
}
.wgh-box {
	background: var(--wgh-card-bg);
	border: 1px solid var(--wgh-border-color);
	border-radius: var(--wgh-radius-md);
	padding: 24px;
	margin-bottom: 24px;
}
.wgh-box h2 {
	font-size: 1.3rem;
	margin-top: 0;
	margin-bottom: 16px;
	color: #fff;
	border-bottom: 1px solid var(--wgh-border-color);
	padding-bottom: 10px;
}
.wgh-content-body {
	color: var(--wgh-text-muted);
	line-height: 1.7;
}

/* ==========================================================================
   GAME CARD & GRID COMPONENT
   ========================================================================== */
.wgh-game-grid {
	display: grid;
	gap: 20px;
}
.wgh-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}
.wgh-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) {
	.wgh-grid-cols-4 {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 768px) {
	.wgh-grid-cols-4, .wgh-grid-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 480px) {
	.wgh-grid-cols-4, .wgh-grid-cols-3 {
		grid-template-columns: 1fr;
	}
}

.wgh-game-card {
	background: var(--wgh-card-bg);
	border: 1px solid var(--wgh-border-color);
	border-radius: var(--wgh-radius-md);
	overflow: hidden;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
}
.wgh-game-card:hover {
	transform: translateY(-6px);
	border-color: rgba(0, 240, 255, 0.4);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.15);
}
.wgh-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}
.wgh-card-thumb-holder,
.wgh-card-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #181b26;
	overflow: hidden;
	border-radius: 12px;
}
.wgh-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.wgh-game-card:hover .wgh-card-thumb {
	transform: scale(1.06);
}
.wgh-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	background: linear-gradient(135deg, #181b26, #242938);
}
.wgh-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(10, 11, 16, 0.8);
	backdrop-filter: blur(4px);
	color: var(--wgh-accent-cyan);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	border: 1px solid rgba(0, 240, 255, 0.3);
}
.wgh-card-badge.wgh-badge-premium {
	background: #ffd700;
	color: #000;
	font-weight: 800;
	border-color: #ffd700;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.wgh-game-card.is-premium {
	border: 1px solid rgba(255, 215, 0, 0.35);
}
.wgh-game-card.is-premium:hover {
	border-color: #ffd700;
	box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.wgh-game-card.is-elite {
	border: 1px solid #a855f7;
	box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}
.wgh-game-card.is-elite .wgh-badge-premium {
	background: linear-gradient(135deg, #a855f7, #ffd700);
	color: #fff;
	border: none;
}
.wgh-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 240, 255, 0.25);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}
.wgh-game-card:hover .wgh-card-overlay {
	opacity: 1;
}
.wgh-card-play-btn {
	width: 48px;
	height: 48px;
	background: var(--wgh-accent-cyan);
	color: #050811;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: bold;
	box-shadow: 0 0 20px var(--wgh-accent-cyan);
}
.wgh-card-info {
	padding: 14px 16px;
}
.wgh-card-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgh-card-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--wgh-text-muted);
}

/* Category Pills Bar */
.wgh-categories-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 20px 0;
}
.wgh-cat-pill {
	background: var(--wgh-card-bg);
	border: 1px solid var(--wgh-border-color);
	color: var(--wgh-text-main);
	padding: 8px 16px;
	border-radius: 20px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s;
}
.wgh-cat-pill:hover, .wgh-cat-pill.active {
	background: rgba(0, 240, 255, 0.12);
	border-color: var(--wgh-accent-cyan);
	color: var(--wgh-accent-cyan);
}
.wgh-cat-count {
	font-size: 11px;
	opacity: 0.6;
	background: rgba(255, 255, 255, 0.1);
	padding: 2px 6px;
	border-radius: 10px;
}

/* Leaderboard Widget */
.wgh-leaderboard-box {
	background: var(--wgh-card-bg);
	border: 1px solid var(--wgh-border-color);
	border-radius: var(--wgh-radius-md);
	padding: 20px;
}
.wgh-leaderboard-title {
	font-size: 1.1rem;
	margin: 0 0 16px;
	color: #fff;
	border-bottom: 1px solid var(--wgh-border-color);
	padding-bottom: 10px;
}
.wgh-scores-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wgh-score-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 4px;
}
.wgh-score-item:nth-child(odd) {
	background: rgba(255, 255, 255, 0.02);
}
.wgh-podium-1 {
	color: var(--wgh-accent-amber);
	font-weight: bold;
}
.wgh-podium-2 {
	color: #cbd5e1;
	font-weight: bold;
}
.wgh-podium-3 {
	color: #d97706;
	font-weight: bold;
}

/* Ads Slot */
.wgh-ad-container {
	margin: 20px 0;
	text-align: center;
}
.wgh-ad-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--wgh-text-muted);
	margin-bottom: 4px;
}
