/* Game Cards CSS - Royal Reels 10 */

/* Fix for game cards wrapped in anchor tags */
.games-grid a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: inherit;
    overflow: hidden;
    position: relative;
}

/* Make sure game cards maintain proper aspect ratio */
.game-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
    overflow: hidden;
}

/* Different styling for slot games vs live games */
.games-grid .slot-game {
    height: auto;
    width: 100%;
}

.games-grid .live-game {
    height: auto;
    width: 100%;
}

/* Add hover effect */
.games-grid a:hover .game-card {
    transform: translateY(-5px);
}

/* Fix play button positioning */
.game-card .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* Add visible play button styling */
.game-card .play-button::before {
    content: "\25B6"; /* Unicode play triangle */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Show play button only on hover for mobile */
@media (max-width: 767px) {
    .game-card:hover .play-button::before {
        opacity: 1;
    }
}

/* Hide play button completely on desktop */
@media (min-width: 768px) {
    .game-card .play-button {
        display: none;
    }
}

/* Make sure images behave properly */
.game-card img {
    width: 100%;
    object-fit: contain;
    position: relative;
}

/* Specific styling for slot games and live games */
.slot-game img {
    aspect-ratio: 500/667;
}

.live-game img {
    aspect-ratio: 220/294;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1/1) {
    .slot-game img {
        height: auto;
    }
    
    .live-game img {
        height: auto;
    }
}

/* Ensure proper sizing and layout for desktop */
@media (min-width: 768px) {
    .games-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    /* Adjust card height to accommodate image dimensions */
    .games-grid .game-card {
        width: 100%;
    }
    
    /* Prevent image distortion */
    .games-grid .game-card img {
        max-width: 100%;
        width: 100%;
        object-fit: contain;
    }
}

/* Ensure proper sizing and layout for mobile */
@media (max-width: 767px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .games-grid a .game-card {
        width: 100%;
        height: 100%;
        margin: 0;
    }
    
    .games-grid a .game-card img {
        object-fit: cover;
        height: 120px;
        width: 100%;
    }
    
    .games-grid a .game-card .game-content {
        padding: 8px;
    }
    
    .games-grid a .game-card .game-content h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .games-grid a .game-card .game-content p {
        font-size: 12px;
        line-height: 1.2;
        margin: 0;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .games-grid a .game-card img {
        height: 110px;
    }
    
    .games-grid a .game-card .game-content h3 {
        font-size: 13px;
    }
} 