/*
 * ============================================================
 * LUXURY GLASSMORPHISM & GAMING COSMOS SYSTEM (LoveLigo Theme)
 * ============================================================
 * Premium front-end overrides designed to elevate the interface
 * to modern, professional standards. Built to be responsive for
 * both mobile and laptop displays.
 */

/* 1. Global Reset & Ambient Mesh Glow Background */
body, html {
    background-color: #06040B !important;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(217, 70, 239, 0.02) 0%, transparent 60%) !important;
    background-attachment: fixed !important;
    color: #f3f4f6;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure headings utilize high-end display typography */
h1, h2, h3, h4, h5, h6, .gaming-font {
    font-family: 'Lalezar', 'Changa', sans-serif !important;
    letter-spacing: 0.02em;
}

/* 2. Webkit Core Scrollbar Elevation */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #06040B !important; 
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08) !important; 
    border-radius: 99px !important;
    border: 2px solid #06040B !important;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.45) !important; 
}

/* 3. Automatic Glassmorphism Transformations */
/* Target Tailwind's flat dark container classes and dynamically make them frosted glass panels */
.bg-\[\#1E2A45\], .bg-\[\#2A364F\], .bg-\[\#131d33\], .bg-\[\#0B1120\] {
    background: rgba(13, 9, 24, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.02) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Hover state for non-interactive glass panels that should still react subtly */
.bg-\[\#1E2A45\]:hover, .bg-\[\#2A364F\]:hover, .bg-\[\#0B1120\]:hover {
    border-color: rgba(255, 255, 255, 0.09) !important;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.04) !important;
}

/* 4. Elegant Interactive Game Card Effects */
/* Add incredible depth and feedback to game cards on hover */
.group:hover .relative.bg-\[\#1E2A45\],
.group:hover .relative.bg-\[\#2A364F\] {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.4) !important;
    background: rgba(25, 18, 48, 0.7) !important;
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.25),
        0 0 1px rgba(139, 92, 246, 0.4),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.08) !important;
}

/* Ensure the layout grids align beautifully with proper spacing */
@media (min-width: 1024px) {
    .lg\:grid-cols-7 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* 5. Custom Sidebar & Sidebar Navigation Items */
aside a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

aside a:hover {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #ffffff !important;
    padding-right: 18px !important; /* Elegant move-right on hover in RTL */
    box-shadow: inset -4px 0 0 0 #8B5CF6;
}

/* Active sidebar item gradient */
aside a.bg-violet-600 {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%) !important;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
}

/* Categories List Styling */
aside .custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
aside .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 6. Refined Professional Search Bar Integration */
/* Elegant desktop search bar in general navigation */
.search-input-wrapper {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(12px);
    border-radius: 9999px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.search-input-wrapper:focus-within {
    background: rgba(15, 10, 25, 0.6) !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 
        0 10px 25px rgba(139, 92, 246, 0.2), 
        0 0 0 1px rgba(139, 92, 246, 0.3) !important;
    width: 14rem !important; /* Smooth expanding */
}

@media (min-width: 1024px) {
    .search-input-wrapper:focus-within {
        width: 19rem !important;
    }
}

/* 7. Super-Premium Hero Unified Search Input (Dynamic Glows) */
#hero-search-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.03) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-align: center;
}

#hero-search-input:focus {
    background: rgba(16, 11, 28, 0.75) !important;
    border-color: rgba(139, 92, 246, 0.7) !important;
    box-shadow: 
        0 20px 50px rgba(139, 92, 246, 0.3),
        0 0 15px rgba(139, 92, 246, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
    transform: scale(1.015);
}

/* Custom placeholder animation */
#hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    transition: color 0.3s ease;
}

#hero-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* 8. Fully Transparent Glass Navbar */
.nav-glass {
    background: rgba(6, 4, 11, 0.7) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}



/* Footer & Widget Styling */
.footer-widget-col h3 {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.6rem;
    font-family: 'Lalezar', sans-serif !important;
}

.footer-widget-col h3::after {
    content: '';
    position: absolute;
    right: 0;
    left: auto;
    bottom: 0;
    width: 45px;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899);
    border-radius: 99px;
}

.footer-widget-col ul li a {
    color: #9cb3cc;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    font-family: 'Changa', sans-serif;
}

.footer-widget-col ul li a:hover {
    color: #8B5CF6;
    transform: translateX(-6px); /* Fluid slide in RTL direction */
}

/* 9. High-Fidelity Button Styling */
/* Primary Action CTA buttons */
.btn-pro-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 50%, #EC4899 100%) !important;
    background-size: 200% auto !important;
    color: white !important;
    box-shadow: 
        0 4px 20px rgba(139, 92, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    border-radius: 9999px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-family: 'Changa', sans-serif;
    font-weight: 700 !important;
}

.btn-pro-primary:hover {
    background-position: right center !important;
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(139, 92, 246, 0.55),
        0 0 10px rgba(236, 72, 153, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.btn-pro-primary:active {
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

/* Glass Buttons */
.btn-pro-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #e5e7eb !important;
    border-radius: 9999px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-family: 'Changa', sans-serif;
}

.btn-pro-glass:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15) !important;
}

/* Modern Action Icons */
.btn-pro-icon {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 99px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-pro-icon:hover {
    background: rgba(139, 92, 246, 0.2) !important;
    color: white !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
    transform: translateY(-3px) rotate(8deg);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25) !important;
}

/* Play button pulse and glow animation */
.btn-play-glow {
    position: relative;
    z-index: 1;
    font-family: 'Lalezar', sans-serif;
}

.btn-play-glow::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #ff00cc, #3333ff, #00ffcc, #ff00cc);
    z-index: -1;
    background-size: 400%;
    border-radius: 9999px;
    opacity: 0;
    transition: 0.5s;
}

.btn-play-glow:hover::before {
    opacity: 1;
    animation: glowing 15s linear infinite;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* 10. Shimmer/Skeleton loading styles */
.skeleton {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Mobile responsive and Category Scrolling improvements */
@media (max-width: 768px) {
    /* Set horizontal categories padding inside container */
    .lg\:hidden.mb-8 {
        margin-right: -12px;
        margin-left: -12px;
    }
    .flex.gap-3.overflow-x-auto {
        padding-right: 12px;
        padding-left: 12px;
    }
    
    /* Make the mobile search expand cleaner */
    form[action="<?php echo DOMAIN ?>"].relative input[name="slug"] {
        font-size: 14px;
        border-radius: 12px;
    }
}

/* Ensure lazyloaded images display elegantly */
.lazyloaded {
    opacity: 1;
    transition: opacity 0.4s ease-out;
}

/* 11. ligo Modern Design Theme Overrides & Animations */
.nav-item-link {
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}



/* Luxury Right-Aligned Dark Overlay for Immersive Hero in RTL */
.hero-gradient-overlay {
    background: linear-gradient(270deg, #0A0612 0%, rgba(10, 6, 18, 0.88) 42%, rgba(10, 6, 18, 0.45) 70%, rgba(10, 6, 18, 0) 100%) !important;
}

@media (max-width: 1023px) {
    .hero-gradient-overlay {
        background: linear-gradient(180deg, rgba(10, 6, 18, 0.3) 0%, rgba(10, 6, 18, 0.9) 80%, #0A0612 100%) !important;
    }
}

/* Glowing Interactive Thumbnails inside Hero Carousel Overlay */
.hero-carousel-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.hero-carousel-card:hover {
    transform: translateY(-8px) scale(1.04);
}

.hero-carousel-card.active {
    border-color: #8B5CF6 !important;
    box-shadow: 
        0 10px 25px rgba(139, 92, 246, 0.4),
        0 0 12px rgba(139, 92, 246, 0.25) !important;
    transform: translateY(-10px) scale(1.08);
}

/* Aesthetic Category & Subtitle Accents */
.accent-border-marker {
    background: linear-gradient(180deg, #F97316 0%, #EC4899 100%);
}

/* Glassmorphic Rounded Pill Search Component */
.glass-pill-search-container {
    background: rgba(13, 9, 24, 0.5) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.4),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.03) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-pill-search-container:focus-within {
    border-color: rgba(139, 92, 246, 0.45) !important;
    box-shadow: 
        0 25px 50px rgba(139, 92, 246, 0.15),
        0 0 15px rgba(139, 92, 246, 0.08),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.05) !important;
}

/* Custom premium hover for See all links */
.see-all-link {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.see-all-link:hover {
    color: white !important;
    transform: translateX(4px);
}
.see-all-link svg {
    transition: transform 0.3s ease;
}
.see-all-link:hover svg {
    transform: translateX(3px);
}

/* Premium Arabic Gaming Font Class */
.font-gaming-arabic {
    font-family: 'Rubik Arabic', 'Changa', 'Cairo', sans-serif !important;
}

