/* Gamezop Games Plugin CSS - Final Version */

/* Main Container */
.gamezop-games-container {
    width: calc(100% - 250px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    width: 100%;
}

/* Categories Sidebar - Fixed Position */
.gamezop-categories-sidebar {
    position: fixed;
    left: 20px;
    top: 120px;
    width: 230px;
    background: rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    padding: 20px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


/* Featured Slider Styles */
.gamezop-featured-section {
    width: 100%;
    margin: 30px 0;
    padding: 0;
    overflow: hidden;
}

.gamezop-featured-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    padding: 0 15px;
}

.gamezop-featured-slider-wrapper {
    width: 100%;
    position: relative;
}

.gamezop-featured-slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 50px;
}

.gamezop-featured-slider {
    width: 100%;
    margin: 0 auto;
}


.gamezop-slide {
    
}

.gamezop-featured-slider .gamezop-slide {
    box-sizing: border-box;
    padding: 0 15px;
    transition: all 0.3s ease;
}

/* Slide item sizing based on columns */
.gamezop-featured-slider .gamezop-game-card {
    width: 100%;
    margin: 0 auto;
    max-width: 300px;
}

.gamezop-slider-prev,
.gamezop-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gamezop-slider-prev {
    left: 0;
}

.gamezop-slider-next {
    right: 0;
}

.gamezop-slider-prev:hover,
.gamezop-slider-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.slick-center .gamezop-game-card {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Loading and Error States */
.gamezop-featured-loading {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

.gamezop-error {
    text-align: center;
    padding: 20px;
    color: #d63384;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .gamezop-featured-slider .gamezop-slide {
        padding: 0 8px;
    }
}

@media (max-width: 768px) {
    .gamezop-featured-slider .gamezop-slide {
        padding: 0 5px;
    }
    
    .gamezop-featured-slider .gamezop-game-card {
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .gamezop-featured-slider .gamezop-slide {
        padding: 0 10px;
    }
}


.gamezop-categories-sidebar.collapsed .gamezop-categories-content {
    display: none;
}

.gamezop-categories-sidebar.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Games Grid */
.gamezop-games-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.gamezop-games-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.gamezop-games-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.gamezop-games-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.gamezop-games-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

/* Game Card */
.gamezop-game-card {
    background: rgba(255, 255, 255, 0.34) !important;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    
}

.gamezop-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Game Image Container */
.game-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 600/492;
}

.game-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gamezop-game-card:hover .game-cover {
    transform: scale(1.05);
}

/* Game Overlay */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gamezop-game-card:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    background: #705EBC;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.play-btn:hover {
    background: #8563B1;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.favorite-btn.active {
    background: white;
}

/* Game Info */
.game-info {
    padding: 15px;
}

.game-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.game-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #fff !important;
}

.game-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Search Container */

.gamezop-search-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 10px 0;
    position: relative;
    border-radius: 8px;
}

.gamezop-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: #F4F4F459;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gamezop-search-input::placeholder {
    color: #888;
    font-weight: 400;
}

.gamezop-search-input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: #000;
    border-color: #fff;
    transform: translateY(-1px);
}

.gamezop-search-btn {
    background: #fff;
    color: white;
    border: none;
    padding: 12px 16px;
    margin-left: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gamezop-search-btn:hover {
    background: #8563B1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.gamezop-search-loading {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gamezop-search-container {
        padding: 0;
    }
    
    .gamezop-search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .gamezop-search-btn {
        padding: 10px 12px;
        font-size: 14px;
        margin-left: 8px;
    }
    
    .gamezop-search-loading {
        right: 60px;
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Categories Sidebar */
.gamezop-categories-sidebar.collapsible .gamezop-categories-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.gamezop-category-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gamezop-category-item:hover {
    background: #e3f2fd;
}

.gamezop-category-item.active {
    background: #ff6b6b;
    color: white;
}

.category-icon {
    margin-right: 10px;
    font-size: 18px;
}

.category-name {
    flex: 1;
    font-weight: 500;
}

.category-count {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

.gamezop-category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Load More Button */
.gamezop-load-more-container {
    text-align: center;
    margin: 30px 0;
}

.gamezop-load-more-btn {
    background: #fff;
    color: #505050;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gamezop-load-more-btn:hover {
    background: #705EBC;
    color : white;
}

.gamezop-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.gamezop-loading {
    color: #fff;
    font-style: italic;
    margin-top: 10px;
}

/* Favorites */
.gamezop-favorites-container {
    margin: 20px 0;
}

.gamezop-favorites-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.gamezop-favorites-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gamezop-favorites-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.gamezop-favorites-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gamezop-no-favorites {
    text-align: center;
    padding: 40px;
    color: #fff;
}

.gamezop-no-games {
    text-align: center;
    padding: 40px;
    color: #fff;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .gamezop-games-container {
        width: 100%;
        margin-left: 0;
    }
    
    .gamezop-categories-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .gamezop-games-grid[data-columns="4"],
    .gamezop-games-grid[data-columns="5"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gamezop-games-grid[data-columns="3"],
    .gamezop-games-grid[data-columns="4"],
    .gamezop-games-grid[data-columns="5"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gamezop-games-grid {
        gap: 15px;
    }
    
    .gamezop-categories-sidebar {
        max-width: 100%;
    }
    
    .gamezop-search-container {
        max-width: 100%;
    }
    
    .game-title {
        font-size: 14px;
    }
    
    .game-description {
        font-size: 13px;
    }
    
    .game-meta {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .gamezop-games-grid[data-columns="2"],
    .gamezop-games-grid[data-columns="3"],
    .gamezop-games-grid[data-columns="4"],
    .gamezop-games-grid[data-columns="5"] {
        grid-template-columns: 1fr;
    }
    
    .game-info {
        padding: 12px;
    }
    
    .favorite-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .play-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.gamezop-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ccc;
    border-top: 2px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.favorite-btn.active {
    animation: heartBeat 1s;
}

/* Error Message */
.gamezop-error-message {
    color: #dc2626;
    background: #fee2e2;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
}

/* Tooltip */
.favorite-btn::after {
    content: 'Add to favorites';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    pointer-events: none;
}

.favorite-btn.active::after {
    content: 'Remove from favorites';
}

.favorite-btn:hover::after {
    opacity: 1;
}

/* Accessibility */
.gamezop-game-card:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.5);
}

.play-btn:focus,
.favorite-btn:focus,
.gamezop-load-more-btn:focus,
.gamezop-search-btn:focus {
    outline: 2px solid #705EBC;
    outline-offset: 2px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .gamezop-game-card {
        background: #2d2d2d;
        color: #fff;
    }
    
    .game-title {
        color: #fff;
    }
    
    .game-description {
        color: #ccc;
    }
    
    .game-meta {
        color: #aaa;
    }
    
    .game-category {
        background: #1e3a8a;
        color: #93c5fd;
    }
    
    .gamezop-categories-sidebar {
        background: #1e1e1e;
        color: #fff;
    }
    
    .gamezop-category-item:hover {
        background: #1e3a8a;
    }
    
    .gamezop-search-input {
        background: #2d2d2d;
        color: #fff;
        border-color: #444;
    }
    
    .gamezop-no-games,
    .gamezop-no-favorites {
        color: #aaa;
    }
}

/* Print Styles */
@media print {
    .gamezop-game-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .game-overlay,
    .favorite-btn,
    .gamezop-load-more-container,
    .gamezop-search-container,
    .gamezop-categories-toggle {
        display: none !important;
    }
}