/*
═══════════════════════════════════════════════════════════════════════════
🎨 PROFESSIONAL WIDGETS STYLING - CLOUDARCADE
═══════════════════════════════════════════════════════════════════════════
✅ Game List Widget - Grid & Slider with animations
✅ Categories Widget - Professional responsive design
✅ Smooth hover effects & transitions
✅ Mobile responsive
Created: <?php echo date('Y-m-d') ?>
═══════════════════════════════════════════════════════════════════════════
*/

:root {
	--widget-primary: #6c5ce7;
	--widget-secondary: #00b894;
	--widget-dark-bg: #1a1a2e;
	--widget-card-bg: #16213e;
	--widget-border: rgba(255, 255, 255, 0.1);
	--widget-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	--widget-shadow-hover: 0 8px 24px rgba(108, 92, 231, 0.4);
	--widget-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════════════════════════════════════
   🎮 GAME LIST WIDGET - GRID LAYOUT (SIDEBAR)
   ══════════════════════════════════════════════════════════════════════ */

.wgt-list-game {
	position: relative;
	background: var(--widget-card-bg);
	border-radius: 12px;
	overflow: hidden;
	transition: var(--widget-transition);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	border: 1px solid var(--widget-border);
}

.wgt-list-game-grid .wgt-list-game {
	padding: 0;
	margin: 8px;
}

.wgt-list-game:hover {
	transform: translateY(-4px);
	box-shadow: var(--widget-shadow-hover);
	border-color: var(--widget-primary);
}

/* Game Thumbnail Container */
.wgt-list-thumbnail {
	position: relative;
	padding-top: 100%; /* 1:1 Aspect Ratio */
	overflow: hidden;
	background: #000;
}

.wgt-list-thumbnail::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
	opacity: 0;
	transition: var(--widget-transition);
	pointer-events: none;
}

.wgt-list-game:hover .wgt-list-thumbnail::after {
	opacity: 1;
}

.wgt-list-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--widget-transition);
}

.wgt-list-game:hover .wgt-list-thumbnail img {
	transform: scale(1.1);
}

/* Play Icon Overlay */
.wgt-list-thumbnail::before {
	content: '▶';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0);
	font-size: 32px;
	color: white;
	z-index: 10;
	background: var(--widget-primary);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(108, 92, 231, 0.6);
	transition: var(--widget-transition);
	padding-left: 4px;
}

.wgt-list-game:hover .wgt-list-thumbnail::before {
	transform: translate(-50%, -50%) scale(1);
}

/* Grid Container */
.wgt-list-game-grid {
	padding: 0 !important;
}

.widget .row {
	margin: 0 -8px;
}

/* ══════════════════════════════════════════════════════════════════════
   📋 GAME LIST WIDGET - VERTICAL LAYOUT (SIDEBAR)
   ══════════════════════════════════════════════════════════════════════ */

.wgt-list-game-vertical {
	margin-bottom: 12px;
	width: 100%;
	position: relative;
	padding: 0;
}

.wgt-list-game-vertical .wgt-list-game {
	display: flex;
	padding: 12px;
	background: var(--widget-card-bg);
	transition: var(--widget-transition);
	gap: 12px;
}

.wgt-list-game-vertical .wgt-list-game:hover {
	background: linear-gradient(135deg, rgba(108, 92, 231, 0.2) 0%, var(--widget-card-bg) 100%);
	transform: translateX(4px);
}

.wgt-list-game-vertical .wgt-list-thumbnail {
	flex: 0 0 100px;
	padding-top: 0;
	height: 100px;
	border-radius: 8px;
	overflow: hidden;
}

.wgt-list-game-vertical .wgt-list-thumbnail img {
	position: static;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.wgt-list-game-vertical .wgt-list-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1;
	min-width: 0;
}

.wgt-list-game-vertical .wgt-list-title {
	font-weight: bold;
	margin-bottom: 6px;
	color: #FFFFFF;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 15px;
	transition: var(--widget-transition);
}

.wgt-list-game-vertical .wgt-list-game:hover .wgt-list-title {
	color: var(--widget-primary);
}

.wgt-list-game-vertical .wgt-list-category {
	color: #a8a8a8;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* RTL Support for Vertical */
[dir="rtl"] .wgt-list-game-vertical .wgt-list-game {
	flex-direction: row-reverse;
}

[dir="rtl"] .wgt-list-game-vertical .wgt-list-game:hover {
	transform: translateX(-4px);
}

/* ══════════════════════════════════════════════════════════════════════
   🎯 HORIZONTAL SLIDER (For Game Above/Below Player Only)
   ══════════════════════════════════════════════════════════════════════ */

/* Apply slider ONLY to game above/below player areas */
.game-above-player .widget .row,
.game-below-player .widget .row {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	gap: 16px;
	padding: 12px 8px;
	margin: 0;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--widget-primary) var(--widget-card-bg);
}

/* Horizontal Game Items */
.game-above-player .wgt-list-game-grid,
.game-below-player .wgt-list-game-grid {
	flex: 0 0 200px;
	max-width: 200px;
	padding: 0 !important;
}

/* Scrollbar Styling */
.game-above-player .widget .row::-webkit-scrollbar,
.game-below-player .widget .row::-webkit-scrollbar {
	height: 8px;
}

.game-above-player .widget .row::-webkit-scrollbar-track,
.game-below-player .widget .row::-webkit-scrollbar-track {
	background: var(--widget-card-bg);
	border-radius: 10px;
}

.game-above-player .widget .row::-webkit-scrollbar-thumb,
.game-below-player .widget .row::-webkit-scrollbar-thumb {
	background: var(--widget-primary);
	border-radius: 10px;
}

.game-above-player .widget .row::-webkit-scrollbar-thumb:hover,
.game-below-player .widget .row::-webkit-scrollbar-thumb:hover {
	background: var(--widget-secondary);
}

/* ══════════════════════════════════════════════════════════════════════
   📂 CATEGORIES WIDGET - HORIZONTAL CAROUSEL WITH ARROWS
   ══════════════════════════════════════════════════════════════════════ */

.category-wrapper {
	width: 100%;
	padding: 0;
	position: relative;
}

/* Carousel Container */
.category-item {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	gap: 12px;
	padding: 12px 50px; /* Space for arrows */
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--widget-primary) var(--widget-card-bg);
}

/* Hide scrollbar but keep functionality */
.category-item::-webkit-scrollbar {
	height: 6px;
}

.category-item::-webkit-scrollbar-track {
	background: var(--widget-card-bg);
	border-radius: 10px;
}

.category-item::-webkit-scrollbar-thumb {
	background: var(--widget-primary);
	border-radius: 10px;
}

.category-item::-webkit-scrollbar-thumb:hover {
	background: var(--widget-secondary);
}

.category-item a {
	text-decoration: none;
	display: block;
	transition: var(--widget-transition);
	flex-shrink: 0;
}

/* Category Card - Single Row */
.category-item li {
	background: var(--widget-card-bg);
	border-radius: 12px;
	padding: 16px 20px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	transition: var(--widget-transition);
	border: 1px solid var(--widget-border);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	min-width: 180px;
	white-space: nowrap;
}

.category-item li:hover {
	background: linear-gradient(135deg, rgba(108, 92, 231, 0.2) 0%, var(--widget-card-bg) 100%);
	transform: translateY(-4px);
	box-shadow: var(--widget-shadow-hover);
	border-color: var(--widget-primary);
}

.icon-category {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: rgba(108, 92, 231, 0.2);
	border-radius: 10px;
	transition: var(--widget-transition);
	flex-shrink: 0;
}

.category-item li:hover .icon-category {
	background: var(--widget-primary);
	transform: scale(1.1);
}

.icon-category img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	filter: brightness(0) invert(1);
	transition: var(--widget-transition);
}

.category-item li:hover .icon-category img {
	filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

/* Category Name */
.category-item li {
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

/* Navigation Arrows */
.category-wrapper::before,
.category-wrapper::after {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background: var(--widget-primary);
	border-radius: 50%;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--widget-transition);
	box-shadow: 0 4px 12px rgba(108, 92, 231, 0.5);
}

.category-wrapper::before {
	left: 5px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 24px;
}

.category-wrapper::after {
	right: 5px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"/></svg>');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 24px;
}

.category-wrapper::before:hover,
.category-wrapper::after:hover {
	background-color: var(--widget-secondary);
	transform: translateY(-50%) scale(1.1);
}

/* ══════════════════════════════════════════════════════════════════════
   🎨 WIDGET CONTAINER STYLING
   ══════════════════════════════════════════════════════════════════════ */

.widget {
	background: transparent;
	padding: 0;
	margin-bottom: 24px;
}

.widget-title {
	color: #ffffff;
	font-size: 20px;
	font-weight: bold;
	margin-bottom: 16px;
	padding-left: 12px;
	border-left: 4px solid var(--widget-primary);
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
	/* Categories stay as carousel on mobile */
	.category-item li {
		min-width: 160px;
		padding: 12px 16px;
	}
	
	.icon-category {
		width: 38px;
		height: 38px;
	}
	
	.icon-category img {
		width: 26px;
		height: 26px;
	}
	
	.widget-title {
		font-size: 18px;
	}
	
	/* Horizontal slider on mobile */
	.game-top-content .wgt-list-game-grid,
	.game-above-player .wgt-list-game-grid,
	.game-below-player .wgt-list-game-grid,
	.game-below-ad .wgt-list-game-grid,
	.game-bottom-content .wgt-list-game-grid {
		flex: 0 0 160px;
		max-width: 160px;
	}
}

/* Mobile */
@media (max-width: 480px) {
	/* Categories stay as carousel on mobile */
	.category-item {
		padding: 12px 45px;
	}
	
	.category-item li {
		min-width: 150px;
		padding: 12px 14px;
		font-size: 13px;
	}
	
	.icon-category {
		width: 36px;
		height: 36px;
	}
	
	.icon-category img {
		width: 24px;
		height: 24px;
	}
	
	.category-wrapper::before,
	.category-wrapper::after {
		width: 35px;
		height: 35px;
		background-size: 20px;
	}
	
	.widget-title {
		font-size: 16px;
		padding-left: 8px;
		border-left-width: 3px;
	}
	
	.wgt-list-game-vertical .wgt-list-thumbnail {
		flex: 0 0 80px;
		height: 80px;
	}
	
	.wgt-list-game-vertical .wgt-list-title {
		font-size: 14px;
		max-width: 20ch;
	}
	
	.wgt-list-game-vertical .wgt-list-category {
		font-size: 12px;
		max-width: 20ch;
	}
	
	/* Smaller horizontal items on small mobile */
	.game-top-content .wgt-list-game-grid,
	.game-above-player .wgt-list-game-grid,
	.game-below-player .wgt-list-game-grid,
	.game-below-ad .wgt-list-game-grid,
	.game-bottom-content .wgt-list-game-grid {
		flex: 0 0 140px;
		max-width: 140px;
	}
}

/* ══════════════════════════════════════════════════════════════════════
   ✨ LOADING ANIMATION
   ══════════════════════════════════════════════════════════════════════ */

@keyframes shimmer {
	0% {
		background-position: -1000px 0;
	}
	100% {
		background-position: 1000px 0;
	}
}

.wgt-list-game.loading {
	background: linear-gradient(90deg, 
		var(--widget-card-bg) 0%, 
		rgba(255,255,255,0.1) 50%, 
		var(--widget-card-bg) 100%
	);
	background-size: 1000px 100%;
	animation: shimmer 2s infinite;
}

/* ══════════════════════════════════════════════════════════════════════
   🎯 SIDEBAR SPECIFIC ADJUSTMENTS
   ══════════════════════════════════════════════════════════════════════ */

/* Small Sidebars (1-4): Single Column (Vertical List) */
.game-left-sidebar-1 .widget .row,
.game-left-sidebar-2 .widget .row,
.game-left-sidebar-3 .widget .row,
.game-left-sidebar-4 .widget .row,
.game-right-sidebar-1 .widget .row,
.game-right-sidebar-2 .widget .row,
.game-right-sidebar-3 .widget .row,
.game-right-sidebar-4 .widget .row {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

.game-left-sidebar-1 .wgt-list-game-grid,
.game-left-sidebar-2 .wgt-list-game-grid,
.game-left-sidebar-3 .wgt-list-game-grid,
.game-left-sidebar-4 .wgt-list-game-grid,
.game-right-sidebar-1 .wgt-list-game-grid,
.game-right-sidebar-2 .wgt-list-game-grid,
.game-right-sidebar-3 .wgt-list-game-grid,
.game-right-sidebar-4 .wgt-list-game-grid {
	padding: 0 !important;
	margin: 0 !important;
	width: 100%;
	max-width: 100%;
}

/* Full Sidebar: Keep 3-column Grid */
.game-left-sidebar-full .widget .row,
.game-right-sidebar-full .widget .row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
}

.game-left-sidebar-full .wgt-list-game-grid,
.game-right-sidebar-full .wgt-list-game-grid {
	padding: 0 !important;
	margin: 0 !important;
}

/* Responsive for Full Sidebar */
@media (max-width: 1400px) {
	.game-left-sidebar-full .widget .row,
	.game-right-sidebar-full .widget .row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.game-left-sidebar-full .widget .row,
	.game-right-sidebar-full .widget .row {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ══════════════════════════════════════════════════════════════════════
   🏁 END OF FILE
   ══════════════════════════════════════════════════════════════════════ */