/* === MOBILE CSS - AJUSTES ESPECÍFICOS PARA MOBILE === */

/* Regras importantes para garantir prioridade dos estilos mobile */
@media only screen and (max-width: 768px) {
    
    /* === BANNER/CARROSSEL MOBILE === */
    .hero-section {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .carousel-enhanced {
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .carousel-item-enhanced {
        width: 100% !important;
        height: auto !important;
    }
    
    .carousel-item-enhanced img {
        width: 100% !important;
        height: 200px !important; /* Altura reduzida para mobile */
        object-fit: cover !important;
        border-radius: 0 !important;
    }
    
    .carousel-overlay {
        padding: 1rem !important;
        transform: translateY(0) !important; /* Sempre visível no mobile */
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9)) !important;
    }
    
    .carousel-overlay h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .carousel-overlay p {
        font-size: 0.9rem !important;
        margin: 0 !important;
    }
    
    /* === GRID DE JOGOS MOBILE === */
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 colunas no mobile */
        gap: 0.75rem !important;
        padding: 0.75rem !important;
        margin: 0 !important;
    }
    
    .game-item {
        padding: 0.75rem !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }
    
    .game-item img {
        width: 100% !important;
        height: 120px !important; /* Altura reduzida para mobile */
        object-fit: cover !important;
        border-radius: 8px !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* === BANNER DE TEXTO MOBILE === */
    .banner-text {
        margin: 1rem 0.75rem !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* === FILTROS DE PROVEDORA MOBILE === */
    .provider-filters {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        padding: 0.75rem !important;
        justify-content: center !important;
    }
    
    .filter-button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-width: auto !important;
        flex: 1 !important;
        max-width: 120px !important;
    }
    
    /* === BARRA DE BUSCA MOBILE === */
    .search-container {
        max-width: 100% !important;
        margin: 0 0.75rem 1rem 0.75rem !important;
    }
    
    .search-bar {
        font-size: 14px !important;
        padding: 0.75rem 0.75rem 0.75rem 2.5rem !important;
    }
    
    /* === TÍTULOS DE SEÇÃO MOBILE === */
    section h2 {
        font-size: 1.3rem !important;
        margin: 1.5rem 0 1rem 0 !important;
        padding: 0 0.75rem !important;
    }
    
    /* === CONTADOR DE JOGADORES MOBILE === */
    .players-stats {
        margin: 1rem 0.75rem !important;
    }
    
    .stats-card-advanced {
        padding: 1rem !important;
        border-radius: 12px !important;
    }
    
    .stats-number-large {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    /* === SEÇÃO DE GANHADORES MOBILE === */
    .winners-section {
        margin: 1rem 0 !important;
        padding: 0 0.75rem !important;
    }
    
    .divGanhadores {
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    
    .classGanhador {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .classGanhador img {
        width: 40px !important;
        height: 40px !important;
        border-radius: 6px !important;
    }
    
    /* === BOTÕES DE JOGO MOBILE === */
    #btjogar {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        margin-top: 0.75rem !important;
    }
    
    /* === MULTIPLICADORES MOBILE === */
    .multipliers {
        gap: 0.5rem !important;
        margin-top: 0.75rem !important;
    }
    
    .multipliers span {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
    }
    
    /* === BARRA DE PROGRESSO MOBILE === */
    .progress-container {
        height: 25px !important;
        margin-top: -5px !important;
        border-radius: 4px !important;
    }
    
    .progress-text {
        font-size: 14px !important;
    }
    
    /* === BOTÃO FLUTUANTE MOBILE === */
    .floating-button {
        bottom: 80px !important;
        right: 0.75rem !important;
        width: 45px !important;
        height: 45px !important;
    }
    
    .floating-button img {
        width: 45px !important;
        height: 45px !important;
    }
}

/* === AJUSTES PARA DISPOSITIVOS MUITO PEQUENOS === */
@media only screen and (max-width: 480px) {
    
    .carousel-item-enhanced img {
        height: 166px !important
        width: 100% !important;
        padding: 0px !important;
        object-fit: scale-down;
    }
    
   .games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas iguais */
    gap: 0.5rem !important;
    padding: 0.5rem !important;
}
    
    .game-item {
        padding: 0.5rem !important;
    }
    
    .game-item img {
                height: 228px !important;
    }
    
    .carousel-overlay h3 {
        font-size: 1.1rem !important;
    }
    
    .carousel-overlay p {
        font-size: 0.8rem !important;
    }
    
    .filter-button {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
        max-width: 100px !important;
    }
    
    .search-bar {
        font-size: 13px !important;
        padding: 0.6rem 0.6rem 0.6rem 2.2rem !important;
    }
    
    .stats-number-large {
        font-size: 1.8rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
}

/* === AJUSTES PARA DISPOSITIVOS EM ORIENTAÇÃO LANDSCAPE === */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    
    .carousel-item-enhanced img {
        height: 150px !important;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 colunas em landscape */
    }
    
    .game-item img {
        height: 80px !important;
    }
}

/* === AJUSTES PARA TABLETS PEQUENOS === */
@media only screen and (min-width: 481px) and (max-width: 768px) {
    
    .carousel-item-enhanced img {
        height: 220px !important;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    .game-item img {
        height: 140px !important;
    }
    
    .carousel-overlay h3 {
        font-size: 1.3rem !important;
    }
    
    .carousel-overlay p {
        font-size: 1rem !important;
    }
}

/* === OTIMIZAÇÕES DE PERFORMANCE PARA MOBILE === */
@media only screen and (max-width: 768px) {
    
    .carousel-item-enhanced img,
    .game-item img {
        will-change: auto !important; /* Desabilita will-change no mobile para melhor performance */
    }
    
    .game-item {
        animation: none !important; /* Remove animações complexas no mobile */
        transition: transform 0.2s ease !important;
    }
    
    .game-item:hover {
        transform: translateY(-2px) !important; /* Hover mais sutil no mobile */
        padding: 22px !important;
        padding-bottom: 0px !important;
    }
    
    /* Reduz sombras para melhor performance */
    .carousel-enhanced,
    .game-item,
    .stats-card-advanced {
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        padding: 10px !important;
        padding-bottom: 0px !important;
    }
}

/* === SUPORTE PARA TELAS DE ALTA DENSIDADE (RETINA) === */
@media only screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2),
       only screen and (max-width: 768px) and (min-resolution: 192dpi) {
    
    .carousel-item-enhanced img,
    .game-item img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        height: auto !important;
    }
}

/* === AJUSTES PARA NAVEGADORES QUE NÃO SUPORTAM BACKDROP-FILTER === */
@supports not (backdrop-filter: blur(20px)) {
    @media only screen and (max-width: 768px) {
        .carousel-overlay,
        .game-item,
        .stats-card-advanced {
            background: rgba(0, 0, 0, 0.8) !important;
        }
    }
}
