/* css/top-games-desktop.css - Premium Cinematic Top Games Grid */

/* 1. Global Reset & legacy hide */
.top-games-shell {
    display: none !important;
}

/* 2. Main Container */
.top-games-desktop-view {
    display: block;
    width: 100%;
    margin-top: 30px;
}

/* 3. Grid/Flex Container (Mobile First: Horizontal Scroll) */
.top-games-grid-modern {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding: 20px 20px 40px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch;
}

.top-games-grid-modern::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* 4. Card Base Style (Universal) */
.top-game-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    /* Mobile specific sizing */
    flex: 0 0 82vw;
    max-width: 300px;
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* Rank Badge */
.card-rank {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    font-family: 'Outfit', sans-serif;
    font-size: 4rem; /* Adjusted for mobile */
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    transition: all 0.4s ease;
}

.card-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.card-character {
    position: absolute;
    bottom: 0px;
    right: -10%;
    width: 110%;
    height: auto;
    z-index: 2;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    transform: translateY(5%);
}

.card-video {
    display: none !important;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        transparent 30%,
        transparent 60%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: 3;
}

.card-info {
    position: absolute;
    inset: 0;
    padding: 20px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
}

.card-title-wrap {
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    z-index: 5;
}

.card-title-img {
    max-width: 80%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.9));
}

.card-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    opacity: 1; /* Always visible on touch-first/horizontal scroller */
}

.card-pill {
    font-size: 0.65rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 20px;
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-card-play {
    width: 100%;
    background: var(--color-accent, #00ff9d);
    color: #000;
    text-decoration: none;
    padding: 10px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.4);
    opacity: 1; /* Visible on mobile */
    transform: translateY(0);
}

/* 5. Desktop Refinements (> 1024px) */
@media (min-width: 1025px) {
    .top-games-grid-modern {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 0;
        gap: 15px;
    }

    .top-game-card {
        flex: none;
        width: auto;
        max-width: none;
        aspect-ratio: 9 / 16;
    }

    /* Desktop Hover Effects */
    .top-game-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
        border-color: rgba(0, 255, 157, 0.4);
        z-index: 10;
    }

    .top-game-card:hover .card-rank {
        -webkit-text-stroke: 1.5px var(--color-accent, #00ff9d);
        opacity: 0.5;
        transform: scale(1.1);
    }

    .top-game-card:hover .card-poster {
        transform: scale(1.1);
        opacity: 0.7;
    }

    .top-game-card:hover .card-character {
        transform: translateY(0) scale(1.05);
        right: -5%;
    }

    .top-game-card:hover .card-title-wrap {
        transform: translateY(-10px) scale(1.1);
    }

    .btn-card-play {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .top-game-card:hover .btn-card-play {
        opacity: 1;
        transform: translateY(0);
    }

    .btn-card-play:hover {
        background: #fff;
        transform: scale(1.05);
    }

    .card-rank {
        font-size: 5rem;
    }
}
