/* ===== NAVEGAÇÃO DE CATEGORIAS - DESIGN MODERNO E MINIMALISTA ===== */

.categories-nav {
    padding: 2rem 0;
    margin-bottom: 2rem;
    animation: slideInFromLeft 1s ease-out 0.5s both;
}

.categories-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-scrollbar: none;
    padding: 0 20px;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 44px;
    padding: 0 16px;
    white-space: nowrap;
    font-size: 0.9rem;
    scroll-snap-align: start;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.category-btn i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #10b981;
}

.category-btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.category-btn:hover {
    transform: translateY(-2px);
}

.category-btn:active {
    transform: translateY(0);
}

.category-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.category-btn.active i {
    color: #ffffff;
    transform: scale(1.1);
}

.category-btn:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-btn:not(.active):hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* ===== GRID DE JOGOS COM CATEGORIAS ===== */
.games-section-with-categories {
    padding: 0 20px 2rem;
    transition: all 0.7s ease;
    animation: fadeInSlideUp 1s ease-out 0.7s both;
}

.games-grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .games-grid-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .games-grid-categories {
        grid-template-columns: repeat(4, 1fr);
    }
}

.game-card-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s ease;
    animation: fadeInSlideUp 0.5s ease-out both;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #059669);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-card-category:hover::before {
    transform: scaleX(1);
}

.game-card-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.game-image-container {
    position: relative;
    height: 160px;
    overflow: hidden;
    transition: all 0.5s ease;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.game-card-category:hover .game-image {
    transform: scale(1.05);
}

.game-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.game-price-badge i {
    font-size: 0.8rem;
}

.game-card-category:hover .game-price-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.game-card-category:hover .game-overlay {
    opacity: 1;
}

.game-content {
    padding: 20px;
    transition: all 0.3s ease;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card-category:hover .game-content {
    transform: translateY(-2px);
}

.game-title-category {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.game-card-category:hover .game-title-category {
    color: #10b981;
}

.game-prize-info {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-prize-info i {
    font-size: 0.8rem;
}

.game-card-category:hover .game-prize-info {
    color: #fbbf24;
}

.game-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.game-card-category:hover .game-description {
    color: rgba(255, 255, 255, 0.9);
}

.game-play-btn {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.game-play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-play-btn:hover::before {
    left: 100%;
}

.game-play-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

@media (min-width: 1024px) {
    .game-play-btn {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    .game-title-category {
        font-size: 1.1rem;
    }
}

.game-play-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.game-play-btn:hover i {
    transform: translateX(2px);
}

.game-play-btn:active {
    transform: translateY(0);
}

/* Botão de saldo insuficiente */
.insufficient-balance {
    text-align: center;
}

.insufficient-balance p {
    color: #ef4444;
    margin-bottom: 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.insufficient-balance .btn-secondary {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.insufficient-balance .btn-secondary:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ===== MENSAGENS DE ESTADO ===== */
.no-games-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    padding: 40px 20px;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.no-games-message i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.loading-message {
    text-align: center;
    color: #10b981;
    font-size: 1.1rem;
    padding: 40px 20px;
    margin: 2rem 0;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loading-message::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: #10b981;
    animation: spin 1s ease-in-out infinite;
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .categories-nav {
        padding: 1rem 0;
    }
    
    .categories-container {
        padding: 0 15px;
        gap: 8px;
    }
    
    .category-btn {
        font-size: 0.85rem;
        padding: 0 12px;
        height: 40px;
        gap: 6px;
    }
    
    .category-btn i {
        font-size: 0.9rem;
    }
    
    .games-section-with-categories {
        padding: 0 15px 2rem;
    }
    
    .games-grid-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-image-container {
        height: 140px;
    }
    
    .game-content {
        padding: 16px;
    }
    
    .game-title-category {
        font-size: 1.1rem;
    }
    
    .game-play-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .categories-container {
        padding: 0 10px;
        gap: 6px;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 0 10px;
        height: 36px;
        gap: 4px;
    }
    
    .category-btn i {
        font-size: 0.8rem;
    }
    
    .games-section-with-categories {
        padding: 0 10px 2rem;
    }
    
    .games-grid-categories {
        gap: 16px;
    }
    
    .game-image-container {
        height: 120px;
    }
    
    .game-content {
        padding: 14px;
    }
    
    .game-title-category {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .game-prize-info {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .game-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
        -webkit-line-clamp: 2;
    }
    
    .game-play-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .game-price-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }
    
    .no-games-message,
    .loading-message {
        padding: 30px 15px;
        font-size: 1rem;
    }
    
    .no-games-message i {
        font-size: 1.5rem;
    }
}

@media (max-width: 360px) {
    .category-btn {
        font-size: 0.75rem;
        padding: 0 8px;
        height: 32px;
    }
    
    .game-content {
        padding: 12px;
    }
    
    .game-title-category {
        font-size: 0.95rem;
    }
    
    .game-play-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* ===== EFEITOS ESPECIAIS ===== */
.game-card-category:hover {
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1);
}

.category-btn.active {
    box-shadow: 
        0 4px 20px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(16, 185, 129, 0.2);
}

/* Animação de entrada escalonada para os cards */
.game-card-category:nth-child(1) { animation-delay: 0.1s; }
.game-card-category:nth-child(2) { animation-delay: 0.2s; }
.game-card-category:nth-child(3) { animation-delay: 0.3s; }
.game-card-category:nth-child(4) { animation-delay: 0.4s; }
.game-card-category:nth-child(5) { animation-delay: 0.5s; }
.game-card-category:nth-child(6) { animation-delay: 0.6s; }
.game-card-category:nth-child(7) { animation-delay: 0.7s; }
.game-card-category:nth-child(8) { animation-delay: 0.8s; }