/**
 * GamePix RSS Integration Frontend Styles
 * High-Fidelity Gaming storefront theme (Steam / Epic Games / Xbox Store inspired)
 */

/* Dark Mode Theme Root & Wrappers */
.gamepix-dark-mode {
	--gamepix-bg: #0b0819;
	--gamepix-surface: rgba(18, 15, 38, 0.7);
	--gamepix-surface-border: rgba(255, 255, 255, 0.08);
	--gamepix-text: #f3f4f6;
	--gamepix-text-muted: #9ca3af;
	--gamepix-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
	--gamepix-glass: rgba(18, 15, 38, 0.55);
	--gamepix-glass-hover: rgba(255, 255, 255, 0.05);
	background-color: var(--gamepix-bg);
	color: var(--gamepix-text);
	padding: 24px;
	border-radius: 16px;
	font-family: 'Outfit', sans-serif;
}

.gamepix-public-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}

.gamepix-public-wrapper *, .gamepix-public-wrapper *::before, .gamepix-public-wrapper *::after {
	box-sizing: border-box;
}

/* Sections Title */
.gamepix-section-title {
	font-size: 26px;
	font-weight: 800;
	margin: 30px 0 20px 0;
	letter-spacing: -0.5px;
	text-transform: uppercase;
	color: #ffffff;
	border-left: 5px solid var(--gamepix-primary);
	padding-left: 14px;
}

/* 1. Hero Showcase Banner */
.gamepix-hero-banner {
	position: relative;
	border-radius: var(--gamepix-card-radius);
	background-size: cover;
	background-position: center;
	padding: 90px 50px 60px 50px;
	min-height: 480px;
	display: flex;
	align-items: flex-end;
	box-shadow: var(--gamepix-shadow);
	overflow: hidden;
	margin-bottom: 35px;
	border: 1px solid var(--gamepix-surface-border);
}

.gamepix-hero-content {
	position: relative;
	z-index: 2;
	max-width: 650px;
}

.gamepix-hero-badge {
	background: var(--gamepix-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 20px;
	letter-spacing: 1px;
	margin-bottom: 15px;
	display: inline-block;
}

.gamepix-hero-title {
	font-size: 48px;
	font-weight: 900;
	margin: 0 0 15px 0;
	line-height: 1.1;
	color: #ffffff;
	text-shadow: 0 3px 10px rgba(0, 0, 0, 0.85);
}

.gamepix-hero-desc {
	font-size: 16px;
	color: #e5e7eb;
	margin: 0 0 25px 0;
	line-height: 1.6;
	text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.gamepix-hero-meta {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 30px;
}

.gamepix-rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #ffb703;
	font-weight: 700;
}

.gamepix-rating .dashicons-star-filled {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #ffb703;
}

.gamepix-tag-pill {
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
	color: #ffffff;
}

.gamepix-hero-actions {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

/* Premium Buttons */
.gamepix-btn-primary {
	background: var(--gamepix-primary);
	border: none;
	color: #fff;
	padding: 14px 28px;
	border-radius: 10px;
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 6px 20px rgba(var(--gamepix-primary-rgb), 0.4);
}

.gamepix-btn-primary .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gamepix-btn-primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(var(--gamepix-primary-rgb), 0.6);
}

.gamepix-btn-secondary {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	color: #fff;
	padding: 14px 28px;
	border-radius: 10px;
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	text-transform: uppercase;
}

.gamepix-btn-secondary .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gamepix-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: translateY(-3px);
	border-color: rgba(255,255,255,0.3);
}

/* 2. Control/Filter Bar */
.gamepix-filter-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--gamepix-surface);
	border: 1px solid var(--gamepix-surface-border);
	padding: 18px 24px;
	border-radius: var(--gamepix-card-radius);
	backdrop-filter: blur(12px);
	margin-bottom: 30px;
	gap: 20px;
	box-shadow: var(--gamepix-shadow);
	position: relative !important;
	z-index: 999 !important;
}


.gamepix-search-box {
	position: relative;
	flex: 1;
	max-width: 450px;
}

.gamepix-search-box input {
	width: 100%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--gamepix-surface-border);
	padding: 12px 15px 12px 48px !important;
	border-radius: 10px;
	color: #fff;
	outline: none;
	font-size: 15px;
	transition: all 0.3s ease;
}

.gamepix-search-box input:focus {
	border-color: var(--gamepix-primary);
	box-shadow: 0 0 12px rgba(var(--gamepix-primary-rgb), 0.3);
	background: rgba(255, 255, 255, 0.09);
}

.gamepix-search-box .dashicons-search {
	position: absolute !important;
	left: 16px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: var(--gamepix-text-muted) !important;
	margin: 0 !important;
	pointer-events: none;
	z-index: 10;
}

.gamepix-filters-right {
	display: flex;
	gap: 15px;
	position: relative !important;
	z-index: 1000 !important;
}

.gamepix-category-selector {
	position: relative !important;
	z-index: 1001 !important;
}

.gamepix-dropdown-btn {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--gamepix-surface-border);
	color: #fff;
	padding: 12px 18px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 15px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.gamepix-dropdown-btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

.gamepix-dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	top: 50px;
	background: #191630;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	width: 500px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 999999 !important;
	box-shadow: var(--gamepix-shadow);
	padding: 10px;
}

.gamepix-category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
}

.gamepix-dropdown-content a {
	color: #e5e7eb;
	padding: 8px 12px;
	text-decoration: none;
	display: block;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.2s ease;
	border-radius: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gamepix-dropdown-content a:hover, .gamepix-dropdown-content a.active {

	background: rgba(var(--gamepix-primary-rgb), 0.15);
	color: var(--gamepix-primary);
}

.gamepix-sort-selector select {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--gamepix-surface-border);
	color: #fff;
	padding: 12px 18px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	outline: none;
}

.gamepix-sort-selector select option {
	background-color: #191630 !important;
	color: #ffffff !important;
}


/* 3. Game Card Components */
.gamepix-card {
	background: var(--gamepix-surface);
	border: 1px solid var(--gamepix-surface-border);
	border-radius: var(--gamepix-card-radius);
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	position: relative;
	display: flex;
	flex-direction: column;
}

.gamepix-card:hover {
	transform: translateY(-8px) scale(1.03);
	border-color: rgba(var(--gamepix-primary-rgb), 0.5);
}

.gamepix-card.gamepix-glow:hover {
	box-shadow: 0 12px 30px rgba(var(--gamepix-primary-rgb), 0.35);
}

.gamepix-card-thumb {
	position: relative;
	aspect-ratio: 16/10;
	overflow: hidden;
}

.gamepix-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.gamepix-card:hover .gamepix-card-thumb img {
	transform: scale(1.12);
}

.gamepix-card-hover-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(11, 8, 25, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2;
}

.gamepix-card:hover .gamepix-card-hover-overlay {
	opacity: 1;
}

.gamepix-play-icon-btn {
	background: var(--gamepix-primary);
	border: none;
	width: 55px;
	height: 55px;
	border-radius: 50%;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(var(--gamepix-primary-rgb), 0.6);
	transform: scale(0.8);
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gamepix-play-icon-btn .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.gamepix-card:hover .gamepix-play-icon-btn {
	transform: scale(1);
}

.gamepix-category-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(18, 15, 38, 0.9);
	backdrop-filter: blur(4px);
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #ffffff;
	border: 1px solid rgba(255,255,255,0.1);
	z-index: 3;
}

/* Card Info Details (Glassmorphism layout) */
.gamepix-card-info {
	padding: 18px;
	background: var(--gamepix-glass);
	backdrop-filter: blur(12px);
	border-top: 1px solid var(--gamepix-surface-border);
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.gamepix-card-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 12px 0;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gamepix-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.gamepix-rating-val {
	font-size: 14px;
	color: #ffb703;
}

.gamepix-card-actions {
	display: flex;
	gap: 8px;
}

.gamepix-fav-btn, .gamepix-share-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #d1d5db;
	cursor: pointer;
	transition: all 0.2s ease;
}

.gamepix-fav-btn:hover {
	color: #d94f5c;
	background: rgba(217, 79, 92, 0.15);
	border-color: rgba(217, 79, 92, 0.3);
}

.gamepix-fav-btn.active {
	color: #d94f5c;
	background: rgba(217, 79, 92, 0.25);
	border-color: rgba(217, 79, 92, 0.4);
}

.gamepix-share-btn:hover {
	color: var(--gamepix-primary);
	background: rgba(var(--gamepix-primary-rgb), 0.15);
}

/* 4. Layouts Config */
/* Grid Layout */
.gamepix-grid-layout {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
}

/* Carousel Layout */
.gamepix-carousel-container, .gamepix-slider-container {
	position: relative;
	overflow: hidden;
}

.gamepix-carousel-track, .gamepix-slider-track {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding-bottom: 20px;
	scrollbar-width: none;
}

.gamepix-carousel-track::-webkit-scrollbar, .gamepix-slider-track::-webkit-scrollbar {
	display: none;
}

.gamepix-carousel-track .gamepix-card {
	min-width: 250px;
	flex-shrink: 0;
}

.gamepix-carousel-nav, .gamepix-slider-nav, .gamepix-trend-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(18, 15, 38, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(6px);
	z-index: 5;
	transition: all 0.3s ease;
}

.gamepix-carousel-nav:hover, .gamepix-slider-nav:hover, .gamepix-trend-nav:hover {
	background: var(--gamepix-primary);
	border-color: var(--gamepix-primary);
	box-shadow: 0 4px 15px rgba(var(--gamepix-primary-rgb), 0.5);
}

.gamepix-carousel-nav.prev, .gamepix-slider-nav.prev, .gamepix-trend-nav.prev { left: 10px; }
.gamepix-carousel-nav.next, .gamepix-slider-nav.next, .gamepix-trend-nav.next { right: 10px; }


/* Masonry Layout */
.gamepix-masonry-layout {
	column-count: 4;
	column-gap: 24px;
}

.gamepix-masonry-layout .gamepix-card {
	break-inside: avoid;
	margin-bottom: 24px;
}

/* Trending Slider styling */
.gamepix-trending-slider {
	position: relative;
	margin-bottom: 40px;
	overflow: hidden;
}

.gamepix-slider-track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
}

.gamepix-slider-item {
	position: relative;
	min-width: 340px;
	height: 200px;
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	border: 1px solid var(--gamepix-surface-border);
	flex-shrink: 0;
}


.gamepix-slider-thumb {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	transition: transform 0.5s ease;
}

.gamepix-slider-item:hover .gamepix-slider-thumb {
	transform: scale(1.08);
}

.gamepix-slider-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	background: linear-gradient(0deg, rgba(11,8,25,0.98) 0%, rgba(11,8,25,0) 100%);
}

.gamepix-slider-info h4 {
	margin: 8px 0 0 0;
	font-size: 18px;
	font-weight: 800;
	color: #ffffff;
}

/* 5. Detail Popup Modal & Play Container */
.gamepix-modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(11, 8, 25, 0.9);
	backdrop-filter: blur(18px);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 30px;
}

.gamepix-modal-container {
	background: #14112c;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	width: 100%;
	max-width: 1100px;
	height: 85vh;
	position: relative;
	overflow-y: auto;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.gamepix-modal-close {
	position: absolute;
	top: 20px;
	right: 25px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 36px;
	cursor: pointer;
	z-index: 100;
	transition: color 0.2s ease;
}

.gamepix-modal-close:hover {
	color: var(--gamepix-primary);
}

.gamepix-modal-body {
	padding: 40px;
	height: 100%;
}

.gamepix-modal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.gamepix-loader-spinner {
	width: 60px;
	height: 60px;
	border: 5px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	border-top-color: var(--gamepix-primary);
	animation: spin 1s linear infinite;
}

/* Play View & Frame */
.gamepix-play-wrapper {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.gamepix-breadcrumbs {
	font-size: 14px;
	color: var(--gamepix-text-muted);
}

.gamepix-breadcrumbs a {
	color: var(--gamepix-primary);
	text-decoration: none;
}

.gamepix-play-flex {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.gamepix-play-viewport {
	flex: 2;
	min-width: 550px;
	display: flex;
	flex-direction: column;
}

.gamepix-iframe-container {
	position: relative;
	aspect-ratio: 16/9;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--gamepix-surface-border);
}

.gamepix-iframe-container iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.gamepix-splash-screen {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	text-align: center;
}

.gamepix-splash-info {
	max-width: 500px;
}

.gamepix-splash-info h3 {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 15px 0;
	color: #ffffff;
	text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.gamepix-splash-info p {
	font-size: 15px;
	color: #e5e7eb;
	margin: 0 0 25px 0;
	text-shadow: 0 2px 5px rgba(0,0,0,0.7);
}

.gamepix-play-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(255, 255, 255, 0.04);
	padding: 12px 20px;
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 12px;
	border: 1px solid var(--gamepix-surface-border);
	border-top: none;
}

.gamepix-control-btn {
	background: transparent;
	border: none;
	color: #d1d5db;
	font-size: 14px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.gamepix-control-btn:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.gamepix-play-sidebar {
	flex: 1;
	min-width: 280px;
}

.gamepix-sidebar-title {
	font-size: 28px;
	font-weight: 900;
	margin: 0 0 15px 0;
	color: #ffffff;
}

.gamepix-sidebar-category-badge {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 20px;
}

.gamepix-sidebar-desc {
	font-size: 15px;
	color: var(--gamepix-text-muted);
	line-height: 1.7;
	margin-bottom: 30px;
}

.gamepix-sidebar-tags h4 {
	font-size: 14px;
	text-transform: uppercase;
	margin: 0 0 12px 0;
	color: #ffffff;
}

.gamepix-tags-holder {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Related Games Inside Modal */
.gamepix-related-section {
	border-top: 1px solid var(--gamepix-surface-border);
	padding-top: 30px;
}

.gamepix-related-section h3 {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 800;
	color: #ffffff;
}

.gamepix-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.gamepix-related-card {
	display: flex;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--gamepix-surface-border);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.2s ease;
}

.gamepix-related-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(var(--gamepix-primary-rgb), 0.4);
}

.gamepix-related-card img {
	width: 80px;
	height: 80px;
	object-fit: cover;
}

.gamepix-related-info {
	padding: 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.gamepix-related-info h4 {
	margin: 0 0 6px 0;
	font-size: 14px;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 120px;
}

/* 6. Pagination & Loader styles */
.gamepix-pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 40px;
}

.gamepix-page-btn {
	background: var(--gamepix-surface);
	border: 1px solid var(--gamepix-surface-border);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	transition: all 0.3s ease;
}

.gamepix-page-btn:hover, .gamepix-page-btn.active {
	background: var(--gamepix-primary);
	border-color: var(--gamepix-primary);
	box-shadow: 0 5px 12px rgba(var(--gamepix-primary-rgb), 0.4);
}

.gamepix-page-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.gamepix-page-dots {
	display: flex;
	align-items: center;
	padding: 0 8px;
	color: var(--gamepix-text-muted);
}

.gamepix-infinite-anchor {
	display: flex;
	justify-content: center;
	padding: 30px 0;
}

/* Responsive configurations */
@media (max-width: 900px) {
	.gamepix-hero-banner {
		padding: 60px 30px;
		min-height: 380px;
	}
	.gamepix-hero-title {
		font-size: 36px;
	}
	.gamepix-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.gamepix-filters-right {
		justify-content: space-between;
	}
	.gamepix-masonry-layout {
		column-count: 3;
	}
}

@media (max-width: 768px) {
	.gamepix-play-flex {
		flex-direction: column;
	}
	.gamepix-play-viewport {
		min-width: 100%;
	}
	.gamepix-modal-container {
		height: 95vh;
		padding: 20px;
	}
}

@media (max-width: 600px) {
	.gamepix-masonry-layout {
		column-count: 2;
	}
	.gamepix-hero-actions {
		flex-direction: column;
	}
	.gamepix-filters-right {
		flex-direction: column;
		gap: 10px;
	}
}
