/* ============================================================================
   ENHANCED NEON GAME CAROUSEL STYLES
   ============================================================================ */

/* Main Carousel Container */
.enhanced-game-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    margin: 2rem 0;
    min-height: 600px; /* Increased to accommodate two rows */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

    .enhanced-game-carousel-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(0, 191, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(30, 144, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
        z-index: 1;
    }

/* Enhanced Navigation Arrows - FIXED: Maintain circular shape */
.enhanced-carousel-nav {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 60px;
    height: 60px;
    /* CRITICAL: Prevent compression and maintain circular shape */
    min-width: 60px;
    max-width: 60px;
    min-height: 60px;
    max-height: 60px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    /* Ensure no padding/margin affects the circle */
    padding: 0 !important;
    margin: 0;
}

    .enhanced-carousel-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent, rgba(0, 191, 255, 0.3), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .enhanced-carousel-nav:hover::before {
        opacity: 1;
    }

    .enhanced-carousel-nav:hover {
        transform: translateY(-3px) scale(1.05);
        border-color: rgba(0, 191, 255, 0.5);
        box-shadow: 0 12px 35px rgba(0, 191, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 30px rgba(0, 191, 255, 0.6);
        color: #00BFFF;
    }

    .enhanced-carousel-nav:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .enhanced-carousel-nav.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .enhanced-carousel-nav:disabled:hover {
        border-color: rgba(255, 255, 255, 0.1);
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

/* Navigation Arrow Container */
.nav-arrow-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

    .nav-arrow-container i {
        font-size: 1.4rem;
        z-index: 2;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
        transition: all 0.3s ease;
    }

.enhanced-carousel-nav:hover .nav-arrow-container i {
    filter: drop-shadow(0 0 15px rgba(0, 191, 255, 0.8));
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.6);
}

/* Neon Trail Effect */
.neon-trail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 191, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.4s ease;
    opacity: 0;
}

.enhanced-carousel-nav:hover .neon-trail {
    width: 80px;
    height: 80px;
    opacity: 0.6;
}

/* Carousel Track */
.enhanced-game-carousel-track {
    flex: 1;
    margin: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* Modified Carousel Track for Two Rows */
.carousel-content-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
    max-height: 520px; /* Accommodate two rows of 240px cards + gap */
    overflow: hidden; /* Remove horizontal scroll since we have rows now */
}

/* Alternative Flexbox approach (if you prefer) */
.carousel-content-wrapper-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0;
    max-height: 520px;
    overflow: hidden;
    align-content: flex-start;
}

/* Enhanced Neon Game Cards */
.enhanced-neon-game-card {
    position: relative;
    width: 180px;
    height: 190px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: hidden;
}

/* Neon Border Effect */
.neon-border-effect {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, #00BFFF, #1E90FF, #00CED1, #00BFFF);
    background-size: 400% 400%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: neonBorderRotate 4s linear infinite;
    z-index: 1;
}

@keyframes neonBorderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.enhanced-neon-game-card:hover .neon-border-effect,
.enhanced-neon-game-card.selected .neon-border-effect {
    opacity: 1;
}

.enhanced-neon-game-card.selected .neon-border-effect {
    opacity: 1;
    animation-duration: 2s;
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.8);
}

/* Glass Background */
.glass-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.enhanced-neon-game-card:hover .glass-background {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 191, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.enhanced-neon-game-card.selected .glass-background {
    background: rgba(0, 191, 255, 0.1);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 15px 50px rgba(0, 191, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Enhanced Game Image */
.enhanced-game-image {
    position: relative;
    width: 100%;
    height: 60%;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    z-index: 3;
}

    .enhanced-game-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        filter: brightness(0.9) contrast(1.1);
    }

.enhanced-neon-game-card:hover .enhanced-game-image img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.2);
}

/* Image Glow Effect */
.image-glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 191, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 4;
}

.enhanced-neon-game-card:hover .image-glow-effect,
.enhanced-neon-game-card.selected .image-glow-effect {
    opacity: 1;
}

/* Enhanced Game Overlay */
.enhanced-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0.9) 100% );
    z-index: 5;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Enhanced Selection Indicator */
.enhanced-selection-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 6;
}

.selection-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

    .selection-icon-container i {
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.8);
        transition: all 0.3s ease;
        z-index: 2;
    }

.enhanced-selection-indicator:hover i {
    color: #00BFFF;
    transform: scale(1.1);
}

.enhanced-selection-indicator.selected {
    background: rgba(0, 191, 255, 0.2);
    border-color: #00BFFF;
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.6);
}

    .enhanced-selection-indicator.selected i {
        color: #00BFFF;
        filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.8));
    }

/* Selection Pulse Effect */
.selection-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 191, 255, 0.3);
    animation: selectionPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes selectionPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.2;
    }
}

/* Enhanced Requirements Badge */
.enhanced-requirements {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 6;
}

.neon-requirement-badge {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: #00BFFF;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 191, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.3);
    transition: all 0.3s ease;
}

.enhanced-neon-game-card:hover .neon-requirement-badge {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 191, 255, 0.6);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

/* Enhanced Game Info */
.enhanced-game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    z-index: 6;
    text-align: center;
}

.enhanced-game-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.enhanced-neon-game-card:hover .enhanced-game-title,
.enhanced-neon-game-card.selected .enhanced-game-title {
    color: #00BFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 191, 255, 0.6), 0 0 25px rgba(0, 191, 255, 0.4);
}

.enhanced-game-category {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.enhanced-neon-game-card:hover .enhanced-game-category,
.enhanced-neon-game-card.selected .enhanced-game-category {
    color: rgba(0, 191, 255, 0.9);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

/* Hover Effect Overlay */
.hover-effect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( 45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70% );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 7;
    pointer-events: none;
    border-radius: 20px;
}

.enhanced-neon-game-card:hover .hover-effect-overlay {
    transform: translateX(100%);
}

/* Card Hover & Selection States */
.enhanced-neon-game-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 60px rgba(0, 191, 255, 0.3), 0 0 40px rgba(0, 191, 255, 0.2);
}

.enhanced-neon-game-card.selected {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 191, 255, 0.5), 0 0 50px rgba(0, 191, 255, 0.3);
}

    .enhanced-neon-game-card.selected:hover {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 25px 70px rgba(0, 191, 255, 0.6), 0 0 60px rgba(0, 191, 255, 0.4);
    }

/* Navigation Positioning */
.enhanced-nav-left {
    margin-right: 1rem;
}

.enhanced-nav-right {
    margin-left: 1rem;
}

/* Responsive Design - FIXED: Maintain circular arrows at all breakpoints */
@media (max-width: 1400px) {
    .enhanced-game-carousel-container {
        min-height: 500px;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(5, minmax(160px, 1fr));
        max-height: 450px;
    }

    .enhanced-neon-game-card {
        width: 160px;
        height: 170px;
    }
}

@media (max-width: 1200px) {
    .enhanced-game-carousel-container {
        min-height: 450px;
        padding: 1.5rem 0;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
        max-height: 400px;
        gap: 1rem;
    }

    .enhanced-neon-game-card {
        width: 140px;
        height: 150px;
    }

    .enhanced-game-title {
        font-size: 0.9rem;
    }

    /* FIXED: Maintain perfect circle */
    .enhanced-carousel-nav {
        width: 50px;
        height: 50px;
        min-width: 50px;
        max-width: 50px;
        min-height: 50px;
        max-height: 50px;
    }

    .nav-arrow-container i {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .enhanced-game-carousel-container {
        min-height: 400px;
        padding: 1rem 0;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
        max-height: 350px;
        gap: 0.75rem;
    }

    .enhanced-neon-game-card {
        width: 120px;
        height: 130px;
    }

    .enhanced-game-carousel-track {
        margin: 0 0.75rem;
    }

    /* FIXED: Maintain perfect circle */
    .enhanced-carousel-nav {
        width: 45px;
        height: 45px;
        min-width: 45px;
        max-width: 45px;
        min-height: 45px;
        max-height: 45px;
    }

    .nav-arrow-container i {
        font-size: 1.1rem;
    }

    .enhanced-game-title {
        font-size: 0.85rem;
    }

    .enhanced-selection-indicator {
        width: 32px;
        height: 32px;
    }

    .selection-icon-container i {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .enhanced-game-carousel-container {
        flex-direction: column;
        padding: 1rem;
        min-height: 320px;
        gap: 1rem;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(3, minmax(100px, 1fr));
        grid-template-rows: repeat(2, 1fr);
        max-height: 280px;
        gap: 0.5rem;
        justify-items: center;
    }

    .enhanced-neon-game-card {
        width: 100px;
        height: 110px;
    }

    /* FIXED: Perfect circle maintained on mobile */
    .enhanced-carousel-nav {
        position: relative;
        width: 44px;
        height: 44px;
        min-width: 44px;
        max-width: 44px;
        min-height: 44px;
        max-height: 44px;
        align-self: center;
        flex-shrink: 0;
    }

    .enhanced-game-carousel-track {
        margin: 0;
        order: 1;
        width: 100%;
    }

    .enhanced-nav-left {
        order: 0;
        margin-right: 0;
    }

    .enhanced-nav-right {
        order: 2;
        margin-left: 0;
    }

    .nav-arrow-container i {
        font-size: 1rem;
    }

    .enhanced-game-title {
        font-size: 0.8rem;
        line-height: 1.1;
    }

    .enhanced-game-info {
        padding: 1rem 0.5rem 0.5rem;
    }

    .enhanced-selection-indicator {
        width: 28px;
        height: 28px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .selection-icon-container i {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .enhanced-game-carousel-container {
        min-height: 280px;
        padding: 0.75rem;
        margin: 1rem 0;
        border-radius: 15px;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(2, minmax(80px, 1fr));
        grid-template-rows: repeat(2, 1fr);
        max-height: 220px;
        gap: 0.5rem;
        justify-content: center;
    }

    .enhanced-neon-game-card {
        width: 80px;
        height: 90px;
    }

    /* FIXED: Perfect circles on small screens */
    .enhanced-carousel-nav {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
        min-height: 40px;
        max-height: 40px;
    }

    .nav-arrow-container i {
        font-size: 0.9rem;
    }

    .enhanced-game-title {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
        line-height: 1;
    }

    .enhanced-game-info {
        padding: 0.75rem 0.25rem 0.25rem;
    }

    .enhanced-selection-indicator {
        width: 24px;
        height: 24px;
        top: 0.25rem;
        right: 0.25rem;
    }

    .selection-icon-container i {
        font-size: 0.7rem;
    }

    .neon-requirement-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .enhanced-game-carousel-container {
        min-height: 240px;
        padding: 0.5rem;
        margin: 0.5rem -15px; /* Full width on small screens */
        border-radius: 0;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(2, 1fr);
        max-height: 180px;
        gap: 0.25rem;
    }

    .enhanced-neon-game-card {
        width: 70px;
        height: 80px;
    }

    /* FIXED: Maintain circles on very small screens */
    .enhanced-carousel-nav {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }

    .nav-arrow-container i {
        font-size: 0.8rem;
    }

    .enhanced-game-title {
        font-size: 0.65rem;
    }

    .enhanced-game-info {
        padding: 0.5rem 0.1rem 0.1rem;
    }

    .enhanced-selection-indicator {
        width: 20px;
        height: 20px;
    }

    .selection-icon-container i {
        font-size: 0.6rem;
    }
}

/* Improved Navigation for Touch Devices */
@media (max-width: 768px) and (hover: none) {
    .enhanced-carousel-nav {
        /* Ensure touch targets are at least 44px but maintain circle */
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        max-width: 44px;
        max-height: 44px;
        /* More visible on touch devices */
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(0, 191, 255, 0.3);
    }

        .enhanced-carousel-nav:active {
            transform: scale(0.95);
            background: rgba(0, 191, 255, 0.2);
        }
}

/* Hide carousel controls entirely on very small screens if needed */
@media (max-width: 320px) {
    .enhanced-carousel-nav {
        display: none;
    }

    .enhanced-game-carousel-container {
        padding: 0.5rem 0;
    }

    .enhanced-game-carousel-track {
        margin: 0;
    }

    .carousel-content-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        justify-content: center;
        max-height: 150px;
    }

    .enhanced-neon-game-card {
        width: 60px;
        height: 70px;
    }
}

/* Additional Glow Effects */
@keyframes gameCardGlow {
    0%, 100% {
        box-shadow: 0 15px 50px rgba(0, 191, 255, 0.3), 0 0 50px rgba(0, 191, 255, 0.2);
    }

    50% {
        box-shadow: 0 15px 50px rgba(0, 191, 255, 0.5), 0 0 50px rgba(0, 191, 255, 0.4);
    }
}

.enhanced-neon-game-card.selected {
    animation: gameCardGlow 3s ease-in-out infinite;
}

/* Ensure proper z-index stacking */
.enhanced-game-carousel-container {
    z-index: 1;
}

.enhanced-carousel-nav {
    z-index: 10;
}

.enhanced-neon-game-card {
    z-index: 5;
}

    .enhanced-neon-game-card:hover {
        z-index: 15;
    }

    .enhanced-neon-game-card.selected {
        z-index: 12;
    }
