/* scroll horizontal */
.horizontal-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding-top: 15px;
    padding-bottom: 25px;
    padding-left: 10px;
    padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

/* top 10 card */
.top-card {
    min-width: 190px;
    width: 190px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
    border: 3px solid #111;
    border-radius: 12px;
    box-shadow: 6px 6px 0px var(--teal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px var(--teal);
}

.top-card-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.top-card-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.top-card:hover .top-card-img {
    transform: scale(1.05);
}

/* badge peringkat */
.rank-badge-new {
    position: absolute;
    top: -2px;
    left: -2px;
    padding: 6px 14px;
    border: 3px solid #111;
    border-top: none;
    border-left: none;
    border-bottom-right-radius: 12px;
    font-weight: 900;
    font-size: 1.2rem;
    color: #111;
    z-index: 2;
    background-color: white;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15);
    font-style: italic;
}

/* top 3 */
.rank-1 .rank-badge-new {
    background-color: #FFD700;
    font-size: 1.4rem;
    padding: 8px 18px;
}

.rank-2 .rank-badge-new {
    background-color: #C0C0C0;
}

.rank-3 .rank-badge-new {
    background-color: #CD7F32;
    color: white;
}

.top-card-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-card-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    border-top: 2px solid #111;
    padding-top: 8px;
}

/* kustom dropdown */
select option {
    font-weight: bold;
    color: #111;
}

/* mobile */
@media (max-width: 767.98px) {
    .top-card {
        min-width: 140px;
        width: 140px;
    }
    
    .rank-badge-new {
        font-size: 1rem;
        padding: 4px 10px;
    }
    
    .rank-1 .rank-badge-new {
        font-size: 1.2rem;
        padding: 6px 14px;
    }

    /* Make the genre dropdown responsive */
    #genreSelector {
        max-width: 130px;
        font-size: 0.8rem;
        padding: 4px 25px 4px 10px;
    }
    
    .rounded-pill .btn {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        font-size: 0.9rem;
    }
    
    .toggle-group-populer {
        width: 100%;
        margin-top: 10px;
    }

    .toggle-group-populer .btn {
        text-align: center;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}