@media screen and (min-width: 768px) and (max-width: 1024px) {
    #game-list-container .col-md-6 {
        flex: 0 0 auto;
        width: 33.333% !important;
    }
    
    .game-card {
        padding: 10px;
    }
    
    .game-img {
        border-radius: 8px;
    }
    
    .rtp-section {
        gap: 8px;
        padding: 4px 8px;
    }
    
    .percent-bar-wrapper {
        height: 24px;
    }
    
    .rtp-value {
        font-size: 12px;
        min-width: 45px;
        padding: 2px 10px;
    }
    
    .pola-trigger {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .pola-popup-active {
        width: 300px;
    }
    
    .step-item {
        font-size: 10px;
    }
    
    .title-game {
        font-size: 1rem;
    }
}

/* Mobile Landscape View (max-width: 850px & landscape) */
@media screen and (max-width: 850px) and (orientation: landscape) {
    #game-list-container .col-6 {
        flex: 0 0 auto;
        width: 33.333% !important;
    }
    
    .game-card {
        padding: 8px;
    }
    
    .rtp-section {
        gap: 6px;
        padding: 3px 8px;
    }
    
    .percent-bar-wrapper {
        height: 20px;
    }
    
    .rtp-value {
        font-size: 10px;
        min-width: 38px;
        padding: 2px 8px;
    }
    
    .pola-trigger {
        font-size: 9px;
        padding: 5px 8px;
    }
    
    .pola-popup-active {
        width: 280px;
    }
    
    .pola-popup-header h4 {
        font-size: 12px;
    }
    
    .step-item {
        font-size: 9px;
        padding: 3px 0;
    }
    
    .info-gacor {
        font-size: 9px;
    }
    
    .saran {
        font-size: 9px;
    }
}

/* Mobile Portrait View (max-width: 480px) */
@media screen and (max-width: 480px) {
    .logo img {
        width: 13rem !important;
    }
    
    /* Card grid - 2 card per row */
    #game-list-container .col-6 {
        flex: 0 0 auto;
        width: 50% !important;
        padding: 0 4px;
    }
    
    .game-card {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .game-img {
        border-radius: 6px;
    }
    
    .rtp-section {
        gap: 6px;
        margin: 8px 0;
        padding: 3px 8px;
    }
    
    .percent-bar-wrapper {
        height: 22px;
    }
    
    .rtp-value {
        font-size: 10px;
        min-width: 40px;
        padding: 2px 8px;
    }
    
    .pola-trigger {
        font-size: 9px;
        padding: 6px 8px;
    }
    
    /* Popup ukuran lebih kecil */
    .pola-popup-active {
        width: 280px;
    }
    
    .pola-popup-header h4 {
        font-size: 12px;
    }
    
    .step-item {
        font-size: 9px;
        padding: 4px 0;
    }
    
    .info-gacor {
        font-size: 9px;
        padding: 6px 8px;
    }
    
    .info-gacor div {
        margin: 2px 0;
    }
    
    .saran {
        font-size: 9px;
        padding: 6px;
    }
    
    .rtp-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    /* Provider icons */
    .icon-card-bg p {
        font-size: 0.6rem !important;
        font-weight: bold !important;
    }
    
    .img-prov {
        width: 1.5rem;
    }
    
    .title-game {
        font-size: 1rem !important;
    }
    
    .item-nav-bottom {
        font-size: 0.7rem !important;
        padding: 0.4rem;
    }
    
    .icon-providers {
        top: 0.2rem !important;
        right: 0 !important;
    }
    
    .datetime-wrapper {
        font-size: 0.7rem;
    }
    
    .running-text {
        font-size: 0.7rem;
    }
    
    .btn-credit {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Mobile Small (max-width: 380px) */
@media screen and (max-width: 380px) {
    #game-list-container .col-6 {
        width: 100% !important;
    }
    
    .game-card {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .pola-popup-active {
        width: 260px;
    }
    
    .pola-popup-header h4 {
        font-size: 11px;
    }
    
    .step-item {
        font-size: 8px;
    }
}

/* Desktop - 5 card per row */
@media screen and (min-width: 1025px) {
    #game-list-container .col-lg-4 {
        flex: 0 0 auto;
        width: 20% !important;
    }
}

/* Header responsive fix */
@media screen and (max-width: 768px) {
    .header-premium {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .title-wrapper {
        position: static;
        transform: none;
        order: 1;
    }
    
    .datetime-wrapper {
        order: 2;
        text-align: center;
    }
    
    .search-wrapper {
        order: 3;
        margin-left: 0;
        width: 100%;
    }
    
    #search-game {
        width: 100%;
        border-radius: 30px;
        padding: 0.4rem 1rem;
    }
}

/* Slider responsive */
@media screen and (max-width: 768px) {
    .slider-img {
        height: auto;
    }
    
    .slider-wrapper {
        border-radius: 12px;
    }
}

/* Nav bottom responsive */
@media screen and (max-width: 480px) {
    .nav-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .item-nav-bottom i {
        font-size: 1.2rem;
    }
}

/* Popup position fix for all devices */
@media screen and (max-width: 768px) {
    .pola-popup-active {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        right: auto !important;
        max-height: 80vh;
        overflow-y: auto;
    }
}