.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px;
    height: 100px;
}

.global-player-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
}

.player-left {
    display: flex;
    align-items: center;
    width: 25%;
}

.player-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.player-artist {
    color: #666;
    font-size: 0.9em;
}

.player-center {
    width: 100%;
    margin: 0 auto;
    max-width: 50%; /* Keep max-width for larger screens within mobile breakpoint */
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #333;
    transition: color 0.2s;
}

.control-button:hover {
    color: #007bff;
}

#waveform {
    height: 40px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.player-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.player-right {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 25%;
    margin-right: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9em;
}

.meta-separator {
    color: #999;
}

.player-price {
    font-weight: bold;
    color: #28a745;
}

/* Ensure fixed width for price and buy button when player is not minimized */
.player-price,
.btn-buy-beat {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .global-player {
        height: auto;
        padding: 8px;
        transition: transform 0.3s ease;
    }

    .global-player.minimized {
        height: 50px;
        padding: 5px 10px;
    }

    .global-player-inner {
        flex-direction: column;
        gap: 10px;
    }

    .global-player.minimized .global-player-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .player-left, .player-center, .player-right {
        width: 100%;
        max-width: 100%;
    }

    .global-player.minimized .player-left {
        width: auto;
        flex: 1;
    }

    .global-player.minimized .player-info {
        flex: 1;
        overflow: hidden;
        min-width: 0; /* Allow content to shrink */
    }

    .global-player.minimized .player-title,
    .global-player.minimized .player-artist {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .global-player.minimized .player-title {
        max-width: 150px; /* Adjust as needed */
    }

    .global-player.minimized .player-meta,
    .global-player.minimized .player-time,
    .global-player.minimized .volume-control,
    .global-player.minimized #waveform {
        display: none;
    }

    .global-player.minimized .player-center {
        width: auto;
        margin: 0 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-grow: 1; /* Allow it to take available space */
    }

    .global-player.minimized .player-controls {
        margin: 0;
        flex-grow: 1; /* Allow controls to take available space */
        justify-content: center; /* Center the buttons */
    }

    .global-player.minimized .control-button:not(#play-pause-btn) {
        display: inline-flex; /* Make all buttons visible */
    }

    .global-player.minimized .player-right {
        width: auto;
    }

    .toggle-player {
        position: absolute;
        top: -15px;
        right: 15px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        z-index: 1001;
    }

    .toggle-player .material-symbols-outlined {
        font-size: 20px;
        transition: transform 0.3s ease;
    }

    .global-player.minimized .toggle-player .material-symbols-outlined {
        transform: rotate(0deg); /* Ajuste para seta para cima quando minimizado */
    }

    .global-player:not(.minimized) .toggle-player .material-symbols-outlined {
        transform: rotate(180deg); /* Ajuste para seta para baixo quando não minimizado */
    }

    /* Progress bar for minimized state */
    .mini-progress {
        display: none;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: rgba(0,0,0,0.1);
    }

    .global-player.minimized .mini-progress {
        display: block;
    }

    .mini-progress-bar {
        height: 100%;
        background: #007bff;
        width: 0;
        transition: width 0.1s linear;
    }
}

.toggle-player {
    display: none; /* Ocultar por padrão */
}

@media (max-width: 768px) {
    .toggle-player {
        display: flex; /* Mostrar apenas em telas menores */
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 5px;
        cursor: pointer;
        color: #666;
    }
}

.player-right {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 25%;
    }

    @media (max-width: 768px) {
        /* ... other mobile styles ... */

        .volume-control {
            display: none; /* Hide volume control on mobile */
        }

        .toggle-player {
            display: flex;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            padding: 5px;
            cursor: pointer;
            color: #666;
        }

        .global-player.minimized .player-right {
            width: auto;
        }

        .global-player.minimized .btn-buy-beat {
            display: block; /* Ensure the buy button is visible */
        }

        .global-player.minimized .player-price {
            display: none; /* Hide the price when minimized */
        }

        .global-player.minimized .toggle-player {
            margin-left: 10px;
        }
    }
