/* Hide scrollbar for horizontal scroll */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Challenge Scroll Container */
.challenge-scroll-container {
    -webkit-overflow-scrolling: touch;
}

/* Challenge Card Styles */
.challenge-card-home {
    min-width: 190px;
    max-width: 190px;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

    .challenge-card-home:hover {
        border-color: #F07134;
    }

    .challenge-card-home::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: #F07134;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .challenge-card-home:hover::before {
        opacity: 1;
    }

/* Challenge Avatar */
.challenge-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Challenge Info */
.challenge-user-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.challenge-info {
    font-size: 1.2rem;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    text-align: start;
}

    .challenge-info i {
        font-size: 1.2rem;
        color: #474CBF;
        padding-top: 0.2rem;
    }

/* Join Button */
.challenge-join-btn {
    background: #F07134;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
}

    .challenge-join-btn:hover {
        background: #D63D00;
        transform: translateY(-2px);
        color: white;
        text-decoration: none;
    }

/* Your Challenge Text */
.challenge-owner-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Game Type Badges */
.challenge-badge-tennis {
    background: white;
    color: #854d0e; /* yellow-800 */
    border: 2px solid #facc15; /* yellow-400 */
    padding: 0.25rem 0.75rem;
    border-radius: 4rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-block;
}

.challenge-badge-padel {
    background: white;
    color: #1e40af; /* blue-800 */
    border: 2px solid #60a5fa; /* blue-400 */
    padding: 0.25rem 0.75rem;
    border-radius: 4rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

.challenge-badge-pickleball {
    background: white;
    color: #166534; /* green-800 */
    border: 2px solid #4ade80; /* green-400 */
    padding: 0.25rem 0.75rem;
    border-radius: 4rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

.challenge-badge-default {
    background: white;
    color: #1f2937; /* gray-800 */
    border: 2px solid #d1d5db; /* gray-300 */
    padding: 0.25rem 0.75rem;
    border-radius: 4rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

/* Player Count Section */
.challenge-player-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6b7280;
}

    .challenge-player-count i {
        font-size: 1.2rem;
        color: #474CBF;
    }

.challenge-slots-remaining {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

/* Last spot emphasis */
.challenge-last-spot {
    color: #ea580c; /* orange-600 */
    font-weight: 700;
    animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Skeleton Loading */
.challenge-card-skeleton {
    min-width: 140px;
    max-width: 160px;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Empty State Styles */
.challenge-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.challenge-empty-state p {
    color: #6b7280;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .challenge-avatar {
        width: 80px;
        height: 80px;
    }

    .challenge-card-home {
        min-width: 170px;
        max-width: 170px;
        padding: 1rem 0.75rem;
    }

    .challenge-user-name {
        font-size: 1.3rem;
    }

    .challenge-info {
        font-size: 1.1rem;
        gap: 0.3rem;
    }

        .challenge-info i {
            font-size: 1.1rem;
        }

    .challenge-join-btn {
        font-size: 1.3rem;
        padding: 0.4rem 0.8rem;
    }

    .challenge-empty-state {
        padding: 2rem 1rem;
    }

    .challenge-empty-state p {
        font-size: 1.1rem;
    }

    /* Game Type Badges Mobile */
    .challenge-badge-tennis,
    .challenge-badge-padel,
    .challenge-badge-pickleball,
    .challenge-badge-default {
        font-size: 1.1rem;
        padding: 0.2rem 0.5rem;
    }

    /* Player Count Mobile */
    .challenge-player-count {
        font-size: 1.1rem;
        gap: 0.3rem;
    }

        .challenge-player-count i {
            font-size: 1.1rem;
        }

    .challenge-slots-remaining {
        font-size: 0.9rem;
    }
}
