/**
 * Games Block Styles
 * Styling for game cards, filters, and interactive elements
 */

/* Games Section Container */
.games-section {
    margin: 40px 0;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.games-title {
    font-size: 1.8rem;
    color: #FDE04E;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.games-view-all {
    background: linear-gradient(180deg, #006165, #006165), linear-gradient(180deg, #fff4e1, #fff873);
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    color: #fff4e1;
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.games-view-all:hover {
    background: linear-gradient(180deg, #007a7f, #007a7f);
    transform: translateY(-2px);
}

/* Filter Buttons */
.games-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff4e1;
    border: 1px solid rgba(253, 224, 78, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: #FDE04E;
    color: #000;
    border-color: #FDE04E;
}

/* Sort Controls */
.games-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.sort-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-btn {
    background: none;
    color: #fff4e1;
    border: none;
    padding: 8px 0;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.sort-btn:hover,
.sort-btn.active {
    color: #FDE04E;
}

.sort-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #FDE04E;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Game Card */
.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(253, 224, 78, 0.1);
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(253, 224, 78, 0.3);
    border-color: rgba(253, 224, 78, 0.5);
}

.game-image-container {
    position: relative;
    overflow: hidden;
}

.game-image {
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

/* Game Type Badge */
.game-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #FDE04E;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.game-type-badge.crash {
    background: rgba(255, 68, 68, 0.9);
    color: #fff;
}

.game-type-badge.slot {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
}

.game-type-badge.arcade {
    background: rgba(168, 85, 247, 0.9);
    color: #fff;
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 15px;
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    background: linear-gradient(180deg, #ffca27, #fff873 50%, #ffca27);
    border: 1px solid #fff4e1;
    box-shadow: 0 0 15px 0 #ffc880;
    color: #000;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px 0 #ffc880;
}

.demo-btn {
    background: transparent;
    border: 1px solid #fff4e1;
    color: #fff4e1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.demo-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Game Info */
.game-info {
    padding: 15px;
}

.game-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.game-subtitle {
    font-size: 14px;
    color: #ccc;
    margin: 0 0 10px 0;
}

.game-features {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(253, 224, 78, 0.1);
    color: #FDE04E;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid rgba(253, 224, 78, 0.3);
}

/* Time Duration */
.game-duration {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Call to Action Button */
.games-cta {
    text-align: center;
    margin-top: 40px;
}

.games-cta-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: #000;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.games-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Loading States */
.game-card.loading {
    opacity: 0.7;
}

.game-card.loading .game-image {
    filter: blur(2px);
}

/* Filter Animation States */
.game-card.filter-hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.game-card.filter-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.game-card.filter-animating {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* No Games Message */
.no-games-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Show More Button */
.show-more-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff4e1;
    border: 1px solid rgba(253, 224, 78, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto;
    font-size: 16px;
}

.show-more-btn:hover {
    background: rgba(253, 224, 78, 0.1);
    border-color: #FDE04E;
    color: #FDE04E;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .games-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .games-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .sort-buttons {
        justify-content: center;
    }
    
    .games-filters {
        justify-content: center;
    }
    
    .game-info {
        padding: 12px;
    }
    
    .play-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .game-title {
        font-size: 14px;
    }
    
    .game-subtitle {
        font-size: 12px;
    }
    
    .games-title {
        font-size: 1.5rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Desktop Optimizations */
@media (min-width: 1025px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .game-info {
        padding: 20px;
    }
}

/* Hover Effects for Desktop Only */
@media (min-width: 1025px) {
    .filter-btn:hover {
        transform: translateY(-2px);
    }
    
    .sort-btn:hover {
        transform: translateY(-1px);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .game-card {
        border: 2px solid #FDE04E;
    }
    
    .play-btn {
        background: #FFFF00;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .filter-btn.active {
        background: #FFFF00;
        color: #000000;
        border: 2px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .game-card,
    .play-overlay,
    .game-image,
    .play-btn,
    .filter-btn {
        transition: none;
    }
    
    .game-card:hover {
        transform: none;
    }
    
    .popular-badge {
        animation: none;
    }
}
