/**
 * All Games Section Styles
 * Responsive grid with 6 items per row and smooth animations
 */

/* Main container */
.all-games-section {
    margin-bottom: 3rem;
}

.all-games-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.all-games-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Game grid container */
#all-games-container {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

/* Game card styles */
.game-card-wrapper {
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.game-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    height: 100%;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-img-container {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.game-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail {
    transform: scale(1.05);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.play-button {
    color: #fff;
    font-size: 3rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.game-card:hover .play-button {
    transform: scale(1);
}

.game-card-info {
    padding: 0.75rem;
}

.game-title {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    height: 2.34rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.game-rating {
    color: #ffc107;
}

.game-rating .fa-star-o {
    color: #ccc;
}

/* Loading indicator */
#all-games-loading {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    width: 100%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade-in animation for cards */
.game-card-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.game-card-visible {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
/* Extra small devices (phones) */
@media (max-width: 575.98px) {
    .game-card-wrapper {
        width: 50%; /* 2 per row */
    }
}

/* Small devices (landscape phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .game-card-wrapper {
        width: 33.333%; /* 3 per row */
    }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .game-card-wrapper {
        width: 25%; /* 4 per row */
    }
}

/* Large devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .game-card-wrapper {
        width: 20%; /* 5 per row */
    }
}

/* Extra large devices (large desktops) */
@media (min-width: 1200px) {
    .game-card-wrapper {
        width: 16.666%; /* 6 per row */
    }
} 